rem: var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path); curr_hit.play(); 
add: if(getGUIGlobal().newRandomSound) { var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path); curr_hit.play(); } 
context: function performAttack( evt ){	this.lastCombatTime = getGameTime();		var curr_hit = getGUIGlobal().newRandomSound("voice", "hit", this.traits.audio.path);	curr_hit.play();	// Attack logic.	var dmg = new DamageType();	if ( this.getRunState() )	{		console.write("" + this + " doing a charge attack!");		var a = this.actions.attack.charge;		dmg.crush = a.crush;		dmg.hack = a.hack;		dmg.pierce = a.pierce;		this.setRun( false );	}	else	{		var a = this.actions.attack.melee;		dmg.crush = a.crush;		dmg.hack = a.hack;		dmg.pierce = a.pierce;	}		// Add flank penalty	var bonus = 1.0;	if(evt.target.traits.flankPenalty)		bonus += (evt.target.getAttackDirections()-1) * evt.target.traits.flankPenalty.value;	bonus += getElevationBonus(this.getHeight() - evt.target.getHeight());	dmg.crush *= bonus;	dmg.hack *= bonus;	dmg.pierce *= bonus;	evt.target.damage( dmg, this );	}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1070/7ebf03ee23f78bffc09cccdf7924bf492162a6ec/entity_functions.js/buggy/binaries/data/mods/official/scripts/entity_functions.js