Fixed in client for shoot event. Weapon system now damages health on any target not only players.

This commit is contained in:
Jocke
2016-01-24 11:36:01 +01:00
parent a28748b35d
commit 97d70f8e32
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ void WeaponSystem::Update(double dt)
continue;
}
//if its a player, do PlayerDamage event
const bool hasPlayerComponent = m_World->HasComponent(pickDataFromShot.Entity, "Player");
if (hasPlayerComponent) {
const bool hasHealthComponent = m_World->HasComponent(pickDataFromShot.Entity, "Health");
if (hasHealthComponent) {
Events::PlayerDamage ePlayerDamage;
//TODO: damage based on weapontype/class?
//TODO: multiple shots at the same time? (shotgunner)