File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
GeneralsMD/Code/GameEngine/Source/Common/RTS Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2534,6 +2534,29 @@ void Team::updateGenericScripts()
25342534 continue ;
25352535 }
25362536
2537+ #if !RETAIL_COMPATIBLE_SCRIPTING
2538+ // TheSuperHackers @feature Mauller/TanSo 30/03/2026 Evaluate all script properties on generic scripts
2539+ Player* currentPlayer = getControllingPlayer ();
2540+ GameDifficulty difficulty = TheScriptEngine->getGlobalDifficulty ();
2541+ if (currentPlayer) {
2542+ difficulty = currentPlayer->getPlayerDifficulty ();
2543+ }
2544+ switch (difficulty) {
2545+ case DIFFICULTY_EASY: if (!script->isEasy ()) continue ; break ;
2546+ case DIFFICULTY_NORMAL: if (!script->isNormal ()) continue ; break ;
2547+ case DIFFICULTY_HARD: if (!script->isHard ()) continue ; break ;
2548+ }
2549+
2550+ if (TheGameLogic->getFrame () < script->getFrameToEvaluate ()) {
2551+ continue ;
2552+ }
2553+
2554+ Int delaySeconds = script->getDelayEvalSeconds ();
2555+ if (delaySeconds > 0 ) {
2556+ script->setFrameToEvaluate (TheGameLogic->getFrame () + delaySeconds * LOGICFRAMES_PER_SECOND);
2557+ }
2558+ #endif
2559+
25372560 if (TheScriptEngine->evaluateConditions (script, this )) {
25382561 if (script->isOneShot ()) {
25392562 script->setActive (false );
You can’t perform that action at this time.
0 commit comments