From 6c9170ee7408030ad6c64638339cb4a8e870fa72 Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Thu, 19 Jan 2023 19:53:16 -0800 Subject: [PATCH] func_buyzone: ensure that our team value is set within SpawnKey() --- src/server/func_buyzone.qc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/server/func_buyzone.qc b/src/server/func_buyzone.qc index f7b9469..5c33015 100644 --- a/src/server/func_buyzone.qc +++ b/src/server/func_buyzone.qc @@ -47,6 +47,7 @@ func_buyzone:NSBrushTrigger virtual void(entity) Touch; virtual void(void) Respawn; + virtual void(string, string) SpawnKey; }; void @@ -60,6 +61,18 @@ func_buyzone::Respawn(void) InitBrushTrigger(); } +void +func_buyzone::SpawnKey(string strKey, string strValue) +{ + switch (strKey) { + case "team": + team = stoi(strValue); + break; + default: + super::SpawnKey(strKey, strValue); + } +} + void func_buyzone::Touch(entity eToucher) {