Merge remote-tracking branch 'origin/master' into havok
Conflicts: src/GameWorld.cpp vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
@@ -19,12 +19,14 @@ bool Systems::DamageSystem::OnDamage( const Events::Damage &event )
|
||||
return false;
|
||||
auto health = m_World->GetComponent<Components::Health>(event.Entity);
|
||||
health->Amount -= event.Amount;
|
||||
//if(health->Amount <= 0)
|
||||
//{
|
||||
// Events::OnDead e;
|
||||
// e.Entity = event.Entity;
|
||||
// EventBroker->Publish(e);
|
||||
//}
|
||||
if(health->Amount <= 0)
|
||||
{
|
||||
Events::Dead e;
|
||||
e.Entity = event.Entity;
|
||||
EventBroker->Publish(e);
|
||||
}
|
||||
|
||||
|
||||
LOG_INFO("Damaged entity %i, Health left: %f", event.Entity, health->Amount);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user