Quote:
Originally Posted by Chandler
I'd do this:
PHP Code:
public function Hurt(hurtDamage, attackersAccount, hurtGani)
if (this.clientr.hp > 0 && !this.clientr.dead && !level.nopk && !this.client.nopk)
{
this.clientr.hp -= abs(temp.hurtDamage);
if (temp.hurtGani)
this.setAni("hurt", "");
clientr.lastattacker = temp.attackersAccount;
if (this.clientr.hp <= 0)
this.doDeath(temp.attackersAccount);
this.showHp(7);
}
public function doDeath(attackersAccount)
{
this.clientr.dead = true;
this.clientr.hp = 0;
this.Kill(temp.attackersAccount);
}
|
Ugh, that makes my eyes
bleed. Your brackets should be inline with the block, not with the contents. You've missed out a load of brackets anyway, and you've mixed all sorts of conditional checks which are totally unrelated to each other in one line. :/ Bleugh.