void player_nail2() { self->s.v.frame = 104; self->think = ( func_t ) player_nail1; self->s.v.nextthink = g_globalvars.time + 0.1; if ( !self->s.v.button0 || intermission_running || self->s.v.impulse ) { self->walkframe = 0; player_run(); return; } set_idealtime(); muzzleflash(); self->s.v.weaponframe = self->s.v.weaponframe + 1; if ( self->s.v.weaponframe >= 9 ) self->s.v.weaponframe = 1; SuperDamageSound(); W_FireSpikes( -4 ); self->attack_finished = g_globalvars.time + 0.2; AmmoUsed (self); }
void player_light2() { self->s.v.frame = 106; self->think = ( func_t ) player_light1; self->s.v.nextthink = g_globalvars.time + 0.1; if ( !self->s.v.button0 || intermission_running || self->s.v.impulse ) { if (lgc_enabled()) { lgc_register_fire_stop(self); } self->walkframe = 0; player_run(); return; } set_idealtime(); muzzleflash(); self->s.v.weaponframe = self->s.v.weaponframe + 1; if ( self->s.v.weaponframe >= 5 ) self->s.v.weaponframe = 1; SuperDamageSound(); W_FireLightning(); self->attack_finished = g_globalvars.time + 0.2; }
/* ============ W_WeaponFrame Called every frame so impulse events can be handled as well as possible ============ */ void W_WeaponFrame() { if ( g_globalvars.time < self->attack_finished ) return; ImpulseCommands(); // check for attack if ( self->s.v.button0 ) { SuperDamageSound(); W_Attack(); } }