From 83d95c15cb75998fe2429c9a49a3e766fec63ccb Mon Sep 17 00:00:00 2001 From: Izuru Yakumo Date: Fri, 18 Jul 2025 10:40:09 -0300 Subject: [PATCH] Introduce 'HERETIC_GODMODE' (the one that kills you) --- code/game/g_cmds.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/code/game/g_cmds.c b/code/game/g_cmds.c index 3a14e51..1cd89eb 100644 --- a/code/game/g_cmds.c +++ b/code/game/g_cmds.c @@ -512,11 +512,15 @@ void Cmd_Give_f (gentity_t *ent) ================== Cmd_God_f -Sets client to godmode +Sets client to godmode, however +if HERETIC_GODMODE is defined at compile time, +it functions exactly like Raven Software's Heretic, +killing the player. argv(0) god ================== */ +#ifndef HERETIC_GODMODE void Cmd_God_f (gentity_t *ent) { char *msg; @@ -533,8 +537,19 @@ void Cmd_God_f (gentity_t *ent) trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); } +#else +void Cmd_God_f (gentity_t *ent) +{ + char *msg; - + if ( !CheatsOk( ent ) ) { + return; + } + player_die (ent, ent, ent, 100000, MOD_TRIGGER_HURT); + msg = "You're not going to get away with this\n"; + trap_SendServerCommand( ent-g_entities, va("print \"%s\"", msg)); +} +#endif /* ================== Cmd_Notarget_f