mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Fixed a JS error message when corpses were attacked (because they had no
armour). This was SVN commit r3418.
This commit is contained in:
parent
4dbeb2ed6c
commit
c29c222936
1 changed files with 3 additions and 1 deletions
|
|
@ -470,8 +470,10 @@ function performHeal( evt )
|
|||
|
||||
function damage( dmg, inflictor )
|
||||
{
|
||||
this.last_combat_time = getGameTime();
|
||||
if(!this.traits.armour) return; // corpses have no armour, everything else should
|
||||
|
||||
this.last_combat_time = getGameTime();
|
||||
|
||||
// Apply armour and work out how much damage we actually take
|
||||
crushDamage = parseInt(dmg.crush - this.traits.armour.value * this.traits.armour.crush);
|
||||
if ( crushDamage < 0 ) crushDamage = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue