Server now broadcasts certain input commands to all other clients (for stuff like shooting)

This commit is contained in:
2016-02-09 19:37:42 +01:00
parent d5647ce89c
commit d83190290f
6 changed files with 48 additions and 22 deletions
+1 -7
View File
@@ -9,7 +9,6 @@
#include "Core/System.h"
#include "Core/EPlayerDamage.h"
#include "Core/EShoot.h"
#include "Core/EPlayerSpawned.h"
#include "Input/EInputCommand.h"
#include "Core/EntityFile.h"
#include "Core/EntityFileParser.h"
@@ -28,16 +27,11 @@ public:
private:
IRenderer* m_Renderer;
// State
EntityWrapper m_LocalPlayer = EntityWrapper::Invalid;
// Events
EventRelay<WeaponSystem, Events::PlayerSpawned> m_EPlayerSpawned;
bool WeaponSystem::OnPlayerSpawned(const Events::PlayerSpawned& e);
EventRelay<WeaponSystem, Events::Shoot> m_EShoot;
bool WeaponSystem::OnShoot(Events::Shoot& e);
EventRelay<WeaponSystem, Events::InputCommand> m_EInputCommand;
bool WeaponSystem::OnInputCommand(const Events::InputCommand& e);
bool WeaponSystem::OnInputCommand(Events::InputCommand& e);
};
#endif