Merge remote-tracking branch 'origin/master' into AssaultBoost
# Conflicts: # resources/Schema/Components.xsd
This commit is contained in:
@@ -21,9 +21,12 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
|
||||
e.Damage -= (double)e.Player["BoostDefender"]["StrengthOfEffect"];
|
||||
}
|
||||
health -= e.Damage;
|
||||
|
||||
|
||||
if (health <= 0.0) {
|
||||
m_World->DeleteEntity(e.Player.ID);
|
||||
Events::PlayerDeath ePlayerDeath;
|
||||
ePlayerDeath.Player = e.Player;
|
||||
m_EventBroker->Publish(ePlayerDeath);
|
||||
//Note: we will delete the entity in PlayerDeathSystem
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -33,8 +36,8 @@ bool HealthSystem::OnPlayerHealthPickup(Events::PlayerHealthPickup& e)
|
||||
{
|
||||
ComponentWrapper cHealth = e.Player["Health"];
|
||||
double& health = cHealth["Health"];
|
||||
//NOTE: its possible to get more than MaxHealth health
|
||||
health += e.HealthAmount;
|
||||
health = std::min(health, (double)cHealth["MaxHealth"]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user