Ammosharing over network test WIP

This commit is contained in:
viktorljung
2016-03-12 17:01:46 +01:00
parent 01cb3afb4b
commit 4ba011a098
7 changed files with 941 additions and 833 deletions
+3
View File
@@ -6,6 +6,7 @@
#include "Core/EntityFile.h"
#include "Core/EPlayerDamage.h"
#include "Common.h"
#include "SpawnerSystem.h"
class BoostSystem : public System
{
@@ -17,5 +18,7 @@ private:
bool OnPlayerDamage(Events::PlayerDamage& e);
std::string DetermineClass(EntityWrapper player);
void giveAmmo(EntityWrapper giver, EntityWrapper receiver);
};
#endif
@@ -37,7 +37,7 @@ private:
bool playerInFirstPerson(EntityWrapper player);
bool dealDamage(ComponentWrapper cWeapon, WeaponInfo& wi);
void giveAmmo(ComponentWrapper cWeapon, WeaponInfo& wi, EntityWrapper receiver);
// void giveAmmo(ComponentWrapper cWeapon, WeaponInfo& wi, EntityWrapper receiver);
void CheckAmmo(ComponentWrapper cWeapon, WeaponInfo& wi);
@@ -305,6 +305,8 @@ private:
wi.ThirdPersonEntity = thirdPersonWeapon;
wi.ThirdPersonPlayerModel = thirdPersonWeapon.FirstParentWithComponent("Model");
player["Player"]["CurrentWeapon"] = cWeapon.Info.Name;
OnEquip(cWeapon, wi);
}