- fixed: CheckForResurrection should check whether the active translation is actually a blood translation before resetting it, not assuming that GenericCrush is a single state with infinite duration.

This commit is contained in:
Christoph Oelckers 2015-03-27 18:29:57 +01:00
parent 15e0f19fdb
commit 25e5ac7e2a

View file

@ -44,6 +44,7 @@
#include "thingdef/thingdef.h" #include "thingdef/thingdef.h"
#include "d_dehacked.h" #include "d_dehacked.h"
#include "g_level.h" #include "g_level.h"
#include "r_data/r_translate.h"
#include "teaminfo.h" #include "teaminfo.h"
#include "gi.h" #include "gi.h"
@ -2615,7 +2616,7 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
S_Sound(corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE); S_Sound(corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
info = corpsehit->GetDefault(); info = corpsehit->GetDefault();
if (corpsehit->state == corpsehit->FindState(NAME_GenericCrush)) if (GetTranslationType(corpsehit->Translation) == TRANSLATION_Blood)
{ {
corpsehit->Translation = info->Translation; // Clean up bloodcolor translation from crushed corpses corpsehit->Translation = info->Translation; // Clean up bloodcolor translation from crushed corpses
} }