From f8fd2c5190962f424fc0db84fabbc22f28104038 Mon Sep 17 00:00:00 2001 From: Latapostrophe Date: Sat, 26 Jan 2019 19:40:12 +0100 Subject: [PATCH] Changed condition to being mid-air, changed print and changed the kick to a return --- src/d_netcmd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 41886d70..a015b8e7 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -2496,9 +2496,9 @@ static void Command_Respawn(void) return; } - if (players[consoleplayer].kartstuff[k_spinouttimer] && !P_IsObjectOnGround(players[consoleplayer].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore. + if (players[consoleplayer].mo && !P_IsObjectOnGround(players[consoleplayer].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore. { - CONS_Printf(M_GetText("Cannot use this while hurt.\n")); + CONS_Printf(M_GetText("You must be on the floor to use this.\n")); return; } @@ -2523,8 +2523,8 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum) { INT32 respawnplayer = READINT32(*cp); - // You can't respawn someone else or cheat your way by removing the send checks above :) Nice try, there. - if ((respawnplayer != playernum) || (players[respawnplayer].mo && players[respawnplayer].kartstuff[k_spinouttimer] && !P_IsObjectOnGround(players[respawnplayer].mo))) // srb2kart: "|| (!G_RaceGametype())" + // You can't respawn someone else. Nice try, there. + if (respawnplayer != playernum) // srb2kart: "|| (!G_RaceGametype())" { CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]); if (server) @@ -2538,6 +2538,10 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum) return; } + // incase the above checks were modified to allow sending a respawn on these occasions: + if (players[respawnplayer].mo && !P_IsObjectOnGround(players[respawnplayer].mo)) + return; + if (players[respawnplayer].mo) P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 10000); }