mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-23 03:36:38 +00:00
Fixed a bug with units not dying during playtesting in the scenario editor.
This was SVN commit r4801.
This commit is contained in:
@@ -566,8 +566,10 @@ function performAttack( evt )
|
||||
{
|
||||
this.lastCombatTime = getGameTime();
|
||||
|
||||
var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path);
|
||||
curr_hit.play();
|
||||
if(getGUIGlobal().newRandomSound) {
|
||||
var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path);
|
||||
curr_hit.play();
|
||||
}
|
||||
|
||||
// Attack logic.
|
||||
var dmg = new DamageType();
|
||||
@@ -970,8 +972,11 @@ function damage( dmg, inflictor )
|
||||
// Make him cry out in pain.
|
||||
if (this.traits.audio && this.traits.audio.path)
|
||||
{
|
||||
curr_pain = getGUIGlobal().newRandomSound("voice", "pain", this.traits.audio.path);
|
||||
if (curr_pain) curr_pain.play();
|
||||
if(getGUIGlobal().newRandomSound) {
|
||||
curr_pain = getGUIGlobal().newRandomSound(
|
||||
"voice", "pain", this.traits.audio.path);
|
||||
if (curr_pain) curr_pain.play();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user