case 8: note = +4; break; // e
case 9: note = -1; break; // B
}
- if(pl.BUTTON_CROUCH)
+ if(PHYS_INPUT_BUTTON_CROUCH(pl))
note -= 12;
- if(pl.BUTTON_JUMP)
+ if(PHYS_INPUT_BUTTON_JUMP(pl))
note += 12;
if(hittype & HITTYPE_SECONDARY)
note += 7;
if (vdist((actor.origin - actor.enemy.origin), <, WEP_CVAR(tuba, radius)))
{
if (random() > 0.5)
- actor.BUTTON_ATCK = 1;
+ PHYS_INPUT_BUTTON_ATCK(actor) = true;
else
- actor.BUTTON_ATCK2 = 1;
+ PHYS_INPUT_BUTTON_ATCK2(actor) = true;
}
}
METHOD(Tuba, wr_checkammo1, bool(Tuba this)) { return true; }
METHOD(Tuba, wr_checkammo2, bool(Tuba this)) { return true; }
-METHOD(Tuba, wr_suicidemessage, int(Tuba this))
+METHOD(Tuba, wr_suicidemessage, Notification(Tuba this))
{
if (w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_SUICIDE;
else
return WEAPON_TUBA_SUICIDE;
}
-METHOD(Tuba, wr_killmessage, int(Tuba this))
+METHOD(Tuba, wr_killmessage, Notification(Tuba this))
{
if (w_deathtype & HITTYPE_BOUNCE)
return WEAPON_KLEINBOTTLE_MURDER;
tubasound(this.enemy, 1);
}
-void Ent_TubaNote_StopSound()
-{SELFPARAM();
+void Ent_TubaNote_StopSound(entity this)
+{
this.enemy.nextthink = time;
this.enemy = NULL;
}
+void Ent_TubaNote_StopSound_self() { Ent_TubaNote_StopSound(self); }
+
NET_HANDLE(ENT_CLIENT_TUBANOTE, bool isNew)
{
bool upd = false;
if (this.enemy) {
if (n != this.note || i != this.tuba_instrument || isNew) {
- Ent_TubaNote_StopSound();
+ Ent_TubaNote_StopSound(this);
}
} else {
this.enemy = new(tuba_note);
}
}
- this.think = Ent_TubaNote_StopSound;
+ this.think = Ent_TubaNote_StopSound_self;
this.entremove = Ent_TubaNote_StopSound;
this.enemy.think = Ent_TubaNote_Think;
this.enemy.nextthink = time + 10;