diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 994c04e0e..0a5f7ebef 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3574,7 +3574,10 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum) INT32 respawnplayer = READINT32(*cp); // You can't respawn someone else. Nice try, there. - if (respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].position) // srb2kart: "|| (!(gametyperules & GTR_CIRCUIT))" + // Unless it's a bot. They can respawn whenever they feel like it, if the server says so. + if (players[respawnplayer].bot + ? playernum != serverplayer + : respawnplayer != playernum || P_PlayerInPain(&players[respawnplayer]) || spbplace == players[respawnplayer].position) { CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]); if (server) @@ -3589,7 +3592,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum) return; P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 1, DMG_INSTAKILL); - demo_extradata[playernum] |= DXD_RESPAWN; + demo_extradata[respawnplayer] |= DXD_RESPAWN; } } diff --git a/src/k_bot.cpp b/src/k_bot.cpp index 52292ac4f..317e63a77 100644 --- a/src/k_bot.cpp +++ b/src/k_bot.cpp @@ -1587,11 +1587,12 @@ void K_BotTicker(const player_t *player) if (bd->respawnconfirm >= BOTRESPAWNCONFIRM || player->speed < 10*FRACUNIT) { - // Now a clean function! Neat, eh? - //K_SetRespawnAtNextWaypoint(player); - // WHAT ARE YOU DOING??? RACE ALREADY! - P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL); + // ... + // FINE, I'LL SEND A RESPAWN COMMAND ON YOUR BEHALF! + char buf[4], *cp = buf; + WRITEINT32(cp, player - players); + SendNetXCmdForPlayer(consoleplayer, XD_RESPAWN, buf, sizeof(buf)); } return; }