Enabled server broadcasting PlayerDamage events to other players to make damage indicators work
This commit is contained in:
@@ -23,6 +23,10 @@ void HealthSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& cHea
|
||||
|
||||
bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
|
||||
{
|
||||
if (!IsServer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ComponentWrapper cHealth = e.Victim["Health"];
|
||||
double& health = cHealth["Health"];
|
||||
health -= e.Damage;
|
||||
|
||||
Reference in New Issue
Block a user