From 1685a691aa5b5cdfa30d377c5f233512ae6cf2cd Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sat, 7 Oct 2023 05:01:40 +0300 Subject: [PATCH] Fix ScriptEntityCancel (#395) --- dlls/scripted.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/scripted.cpp b/dlls/scripted.cpp index f5bc9c04f8..fef534ba0a 100644 --- a/dlls/scripted.cpp +++ b/dlls/scripted.cpp @@ -622,8 +622,8 @@ void ScriptEntityCancel( edict_t *pentCine ) // make sure they are a scripted_sequence if (FClassnameIs( pentCine, "scripted_sequence" ) || FClassnameIs( pentCine, "scripted_action" )) { - ((CCineMonster *)VARS(pentCine))->m_iState = STATE_OFF; CCineMonster *pCineTarget = GetClassPtr( (CCineMonster *)VARS( pentCine ) ); + pCineTarget->m_iState = STATE_OFF; // make sure they have a monster in mind for the script CBaseEntity *pEntity = pCineTarget->m_hTargetEnt;