SERVER: Fix 'Requires Power' spawnflag not doing anything on Zap-O-Matic

This commit is contained in:
Steam Deck User 2023-03-07 17:48:58 -05:00
parent 1321afa1ee
commit 848541ca28

View file

@ -25,6 +25,8 @@
*/ */
#define TRAP_SPAWNFLAG_REQUIRESPOWER 1
// //
// -------------------- // --------------------
// Electric Trap // Electric Trap
@ -269,6 +271,10 @@ void() zapper_switch =
if (!self.calc_time) if (!self.calc_time)
self.calc_time = 60; self.calc_time = 60;
// Requires Power
if (self.spawnflags & TRAP_SPAWNFLAG_REQUIRESPOWER)
self.requirespower = true;
self.solid = SOLID_TRIGGER; self.solid = SOLID_TRIGGER;
precache_model(self.model); precache_model(self.model);
precache_sound("sounds/machines/elec_shock.wav"); precache_sound("sounds/machines/elec_shock.wav");