func_buyzone: ensure that our team value is set within SpawnKey()

This commit is contained in:
Marco Cawthorne 2023-01-19 19:53:16 -08:00
parent d0ebfb8205
commit 6c9170ee74
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -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)
{