From 957a8cb11759cbe4f12c97ba8478e4de5afb62a1 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Thu, 2 Feb 2017 21:34:26 +0200 Subject: [PATCH] Count resurrect cheat as respawn --- src/m_cheat.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index 2f99ea61c..958f1a168 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -49,6 +49,7 @@ #include "a_morph.h" #include "g_levellocals.h" #include "virtual.h" +#include "events.h" // [RH] Actually handle the cheat. The cheat code in st_stuff.c now just // writes some bytes to the network data stream, and the network code @@ -347,6 +348,12 @@ void cht_DoCheat (player_t *player, int cheat) P_UndoPlayerMorph(player, player); } + // player is now alive. + // fire E_PlayerRespawned and start the ACS SCRIPT_Respawn. + E_PlayerRespawned(player - players); + // + FBehavior::StaticStartTypedScripts(SCRIPT_Respawn, player->mo, true); + } } break;