1
0
forked from 0ad/0ad

Fixed a JS error message when corpses were attacked (because they had no

armour).

This was SVN commit r3418.
This commit is contained in:
Matei 2006-01-23 10:36:18 +00:00
parent 4dbeb2ed6c
commit c29c222936

View File

@ -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;