mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-21 19:32:21 +00:00
SERVER: Add Spawnflag to skip Perk-A-Cola leave animation
This commit is contained in:
parent
71bbdd29d1
commit
67d9815be4
1 changed files with 7 additions and 0 deletions
|
@ -51,6 +51,7 @@ void(entity person) W_HideCrosshair;
|
|||
#define PERK_SPAWNFLAG_DOUBLETAPV1 1024
|
||||
|
||||
#define PERK_SPAWNFLAG_ALLOWPRONE 2048
|
||||
#define PERK_SPAWNFLAG_SILENTLEAVE 4096
|
||||
|
||||
#define PERK_JUGGERNOG_HEALTH 160
|
||||
|
||||
|
@ -188,6 +189,8 @@ void(vector where, float time_alive) SpawnSpark =
|
|||
void() Perk_StopLeaveAnimation =
|
||||
{
|
||||
self.velocity = 0;
|
||||
self.think = SUB_Null;
|
||||
self.nextthink = 0;
|
||||
|
||||
setmodel(self, ""); // We don't want to remove Revive in the event of a Soft_Restart..
|
||||
SpawnSpark(self.origin, 0.65); // Spawn a Spark at the position
|
||||
|
@ -243,6 +246,10 @@ void() Perk_MachineGoAway =
|
|||
|
||||
// Same with angle
|
||||
self.movement = self.angles;
|
||||
|
||||
// Skip the animation if silent leave is on
|
||||
if (self.spawnflags & PERK_SPAWNFLAG_SILENTLEAVE)
|
||||
Perk_StopLeaveAnimation();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue