DEFINE_ACTION_FUNCTION(AActor, A_M_FireMissile) { // [BC] AActor *pMissile; // [BC] Don't do this in client mode. if (( NETWORK_GetState( ) == NETSTATE_CLIENT ) || ( CLIENTDEMO_IsPlaying( ))) { return; } if (self->target == NULL) return; if (self->CheckMeleeRange ()) { // If too close, punch it MarinePunch(self, 1); } else { A_FaceTarget (self); pMissile = P_SpawnMissile (self, self->target, PClass::FindClass("Rocket")); // [BC] If we're the server, tell clients to spawn this missile. if (( pMissile ) && ( NETWORK_GetState( ) == NETSTATE_SERVER )) SERVERCOMMANDS_SpawnMissile( pMissile ); } }
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Punch) { ACTION_PARAM_START(1); ACTION_PARAM_INT(mult, 0); MarinePunch(self, mult); }
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_M_Punch) { PARAM_ACTION_PROLOGUE; PARAM_INT(mult); MarinePunch(self, mult); return 0; }
DEFINE_ACTION_FUNCTION(AActor, A_M_FireMissile) { PARAM_ACTION_PROLOGUE; if (self->target == NULL) return 0; if (self->CheckMeleeRange ()) { // If too close, punch it MarinePunch(self, 1); } else { A_FaceTarget (self); P_SpawnMissile (self, self->target, PClass::FindActor("Rocket")); } return 0; }