More damage cheats

This commit is contained in:
Antonio Martinez 2025-06-02 12:47:38 -04:00
parent 80c02ca6db
commit 32f40ca013
4 changed files with 94 additions and 4 deletions

View file

@ -559,6 +559,14 @@ void D_RegisterClientCommands(void)
COM_AddDebugCommand("scale", Command_Scale_f);
COM_AddDebugCommand("gravflip", Command_Gravflip_f);
COM_AddDebugCommand("hurtme", Command_Hurtme_f);
COM_AddDebugCommand("stumble", Command_Stumble_f);
COM_AddDebugCommand("tumble", Command_Tumble_f);
COM_AddDebugCommand("whumble", Command_Whumble_f);
COM_AddDebugCommand("explode", Command_Explode_f);
COM_AddDebugCommand("spinout", Command_Spinout_f);
COM_AddDebugCommand("wipeout", Command_Wipeout_f);
COM_AddDebugCommand("sting", Command_Sting_f);
COM_AddDebugCommand("kill", Command_Kill_f);
COM_AddDebugCommand("teleport", Command_Teleport_f);
COM_AddDebugCommand("rteleport", Command_RTeleport_f);
COM_AddDebugCommand("skynum", Command_Skynum_f);
@ -5924,10 +5932,13 @@ static void Got_Cheat(const UINT8 **cp, INT32 playernum)
if (!P_MobjWasRemoved(player->mo))
{
P_DamageMobj(player->mo, NULL, NULL, damage, DMG_NORMAL);
if (damage >= DMG_INSTAKILL)
P_KillMobj(player->mo, NULL, NULL, (UINT8)damage);
else
P_DamageMobj(player->mo, NULL, NULL, 1, (UINT8)damage);
}
CV_CheaterWarning(targetPlayer, va("%d damage to me", damage));
CV_CheaterWarning(targetPlayer, va("damage (flags=%d) to me", damage));
break;
}

View file

@ -5449,7 +5449,7 @@ void K_DebtStingPlayer(player_t *player, mobj_t *source)
{
INT32 length = TICRATE;
if (source->player)
if (source && !P_MobjWasRemoved(source) && source->player)
{
length += (4 * (source->player->kartweight - player->kartweight));
}

View file

@ -115,13 +115,82 @@ void Command_Hurtme_f(void)
if (COM_Argc() < 2)
{
CONS_Printf(M_GetText("hurtme <damage>: Damage yourself by a specific amount\n"));
CONS_Printf(M_GetText("hurtme <damage>: Damage yourself with specific flags\n"));
CONS_Printf(M_GetText("Norm 0 Wipe 1 Expl 2 Tumb 3 Stng 4\n"));
CONS_Printf(M_GetText("Krma 5 Volt 6 Stmb 7 Whmb 8\n"));
CONS_Printf(M_GetText("Ikll 128 Dpit 129 Crsh 130 Spec 131 Time 132\n"));
CONS_Printf(M_GetText("Wmbo 16 Stel 32 Hslf 64\n"));
return;
}
D_Cheat(consoleplayer, CHEAT_HURT, atoi(COM_Argv(1)));
}
void Command_Spinout_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_NORMAL);
}
void Command_Wipeout_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_WIPEOUT);
}
void Command_Explode_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_EXPLODE);
}
void Command_Sting_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_STING);
}
void Command_Tumble_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_TUMBLE);
}
void Command_Stumble_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_STUMBLE);
}
void Command_Whumble_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_WHUMBLE);
}
void Command_Kill_f(void)
{
REQUIRE_CHEATS;
REQUIRE_INLEVEL;
D_Cheat(consoleplayer, CHEAT_HURT, DMG_INSTAKILL);
}
void Command_RTeleport_f(void)
{
float x = atof(COM_Argv(1));

View file

@ -80,6 +80,16 @@ void Command_Devmode_f(void);
void Command_Scale_f(void);
void Command_Gravflip_f(void);
void Command_Hurtme_f(void);
void Command_Stumble_f(void);
void Command_Whumble_f(void);
void Command_Tumble_f(void);
void Command_Explode_f(void);
void Command_Spinout_f(void);
void Command_Wipeout_f(void);
void Command_Sting_f(void);
void Command_Kill_f(void);
void Command_Teleport_f(void);
void Command_RTeleport_f(void);
void Command_Skynum_f(void);