From ccdc1719ae8d41a412cf52540ac9804cac3ba166 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sun, 16 Oct 2022 15:16:02 -0500 Subject: [PATCH] Fixed negated conditionals not being recognized by hudanimations.txt --- sp/src/vgui2/vgui_controls/AnimationController.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sp/src/vgui2/vgui_controls/AnimationController.cpp b/sp/src/vgui2/vgui_controls/AnimationController.cpp index 886b4291..bc2b1774 100644 --- a/sp/src/vgui2/vgui_controls/AnimationController.cpp +++ b/sp/src/vgui2/vgui_controls/AnimationController.cpp @@ -357,7 +357,12 @@ bool AnimationController::ParseScriptFile(char *pMem, int length) // get the open brace or a conditional pMem = ParseFile(pMem, token, NULL); +#ifdef MAPBASE + // Fixes ! conditionals + if ( Q_stristr( token, "[$" ) || Q_stristr( token, "[!$" ) ) +#else if ( Q_stristr( token, "[$" ) ) +#endif { bAccepted = EvaluateConditional( token ); @@ -622,7 +627,12 @@ bool AnimationController::ParseScriptFile(char *pMem, int length) // Look ahead one token for a conditional char *peek = ParseFile(pMem, token, NULL); +#ifdef MAPBASE + // Fixes ! conditionals + if ( Q_stristr( token, "[$" ) || Q_stristr( token, "[!$" ) ) +#else if ( Q_stristr( token, "[$" ) ) +#endif { if ( !EvaluateConditional( token ) ) {