Merge remote-tracking branch 'origin/master' into havok

Conflicts:
	src/GameWorld.cpp
	vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
ViktorLjung
2014-06-05 06:01:49 +02:00
parent 56e6545f0f
commit e4a59cec61
31 changed files with 288 additions and 130 deletions
+8 -6
View File
@@ -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;
}