From 55ab679a81a0f4155fb5ef3aad52e967ad25a76c Mon Sep 17 00:00:00 2001 From: "Jonathan G." Date: Sun, 19 May 2024 23:50:58 -0700 Subject: [PATCH] port: give Cloaking Device at respawn if cheat is active --- src/game/player.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/game/player.c b/src/game/player.c index ddb73c726..ae75a636c 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -1100,6 +1100,15 @@ void playerSpawn(void) } } else { #ifndef PLATFORM_N64 + if (cheatIsActive(CHEAT_CLOAKINGDEVICE)) { + invGiveSingleWeapon(WEAPON_CLOAKINGDEVICE); +#if VERSION >= VERSION_PAL_FINAL + bgunSetAmmoQuantity(AMMOTYPE_CLOAK, TICKS(7200)); +#else + bgunSetAmmoQuantity(AMMOTYPE_CLOAK, 7200); +#endif + } + if (cheatIsActive(CHEAT_PERFECTDARKNESS)) { invGiveSingleWeapon(WEAPON_NIGHTVISION); }