Added Assault,Defender,Sniper Components,Entities. Added ShieldAbility,Sprintability-Component (not implemented). Changed BoostSystem to use a childed Boost to the player. All friendly fire is 0 damage.

This commit is contained in:
verysecrethero
2016-02-18 10:40:09 +01:00
parent c3ed429377
commit 7f489b3569
19 changed files with 125 additions and 32 deletions
+3 -2
View File
@@ -30,8 +30,9 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
ComponentWrapper cHealth = e.Victim["Health"];
double& health = cHealth["Health"];
if (e.Victim.HasComponent("BoostDefender")) {
e.Damage -= (double)e.Victim["BoostDefender"]["StrengthOfEffect"];
auto playerBoostDefenderEntity = e.Victim.FirstChildByName("BoostDefender");
if (playerBoostDefenderEntity.Valid()) {
e.Damage -= (double)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"];
}
health -= e.Damage;