From 4d5363b08fc94f8d52c1633b14a9192602083227 Mon Sep 17 00:00:00 2001 From: moto Date: Mon, 9 May 2022 15:47:40 -0400 Subject: [PATCH] Server: Restore Box Glow for FTE, fix Power-Up timeout --- source/server/entities/machines.qc | 4 ---- source/server/entities/powerups.qc | 14 ++++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/source/server/entities/machines.qc b/source/server/entities/machines.qc index 958e7827..3ff27e46 100644 --- a/source/server/entities/machines.qc +++ b/source/server/entities/machines.qc @@ -1383,7 +1383,6 @@ void() findboxspot = newspot.angles_y += 90; // Spawn the Box Glow if permitted - #ifndef PC if (!(self.owner.spawnflags & 2)) { local entity g; @@ -1393,7 +1392,6 @@ void() findboxspot = setorigin(g,newspot.origin); g.angles = newspot.angles; } - #endif // Remove teddy remove(self); @@ -1732,7 +1730,6 @@ void() mystery_box = setmodel (self, "models/machines/mystery.mdl"); setsize (self, VEC_HULL2_MIN, VEC_HULL2_MAX); - #ifndef PC if (!(self.spawnflags & 2)) { local entity g; @@ -1742,7 +1739,6 @@ void() mystery_box = setorigin(g,self.origin); g.angles = self.angles; } - #endif self.touch = mystery_touch; boxOrigin = self.origin; diff --git a/source/server/entities/powerups.qc b/source/server/entities/powerups.qc index 44df78c6..47db184e 100644 --- a/source/server/entities/powerups.qc +++ b/source/server/entities/powerups.qc @@ -243,7 +243,6 @@ void(vector org) PU_NukeExplode = setorigin(explosion, org); explosion.think = PU_NukeExplosionThink; explosion.nextthink = time + 0.10; - explosion.ltime = time + 3; } // @@ -457,10 +456,6 @@ void() PU_Flash = { // Toggle the Power-Up model on and off if (self.hitcount % 2) { - // Store model - if (!self.oldmodel) - self.oldmodel = self.model; - // Disappear setmodel(self, ""); } @@ -584,9 +579,7 @@ void(vector where, float type) Spawn_Powerup = sparkle.origin = where; setorigin(sparkle, sparkle.origin); - #ifndef PC setmodel(sparkle,"models/sprites/sprkle.spr"); - #endif sparkle.think = PU_SparkleThink; sparkle.nextthink = time + 0.1; @@ -605,9 +598,14 @@ void(vector where, float type) Spawn_Powerup = } // Assign the Power-Up model and sound - setmodel(powerup, PU_ModelPath(powerup.walktype)); + powerup.model = powerup.oldmodel = PU_ModelPath(powerup.walktype); + setmodel(powerup, powerup.model); powerup.powerup_vo = PU_VoiceoverPath(powerup.walktype); + // Time out + powerup.think = PU_Flash; + powerup.nextthink = time + 15; + // Finally assign collision function powerup.touch = PU_Touch;