From 2340e30c2de9b07ed05bd419b806a568831636c0 Mon Sep 17 00:00:00 2001 From: INSANEMODE Date: Sun, 4 Jun 2023 19:07:52 -0500 Subject: [PATCH] gameinterface additions (#306) * -add waittill_any_timeout to _integration_t6.gsc - thread event handler calls in monitorEvents * - add WaitTillAnyTimeout to iw5 - remove unneeded thread from event handlers - change WaitTillAnyTimeout in t6 to use a wrapper --- GameFiles/GameInterface/_integration_iw5.gsc | 7 ++++++- GameFiles/GameInterface/_integration_t6.gsc | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/GameFiles/GameInterface/_integration_iw5.gsc b/GameFiles/GameInterface/_integration_iw5.gsc index 16140fd84..4619656cb 100644 --- a/GameFiles/GameInterface/_integration_iw5.gsc +++ b/GameFiles/GameInterface/_integration_iw5.gsc @@ -20,7 +20,7 @@ Setup() level.overrideMethods[level.commonFunctions.waittillNotifyOrTimeout] = ::WaitillNotifyOrTimeoutWrapper; level.overrideMethods[level.commonFunctions.isBot] = ::IsBotWrapper; level.overrideMethods[level.commonFunctions.getXuid] = ::GetXuidWrapper; - + level.overrideMethods[level.commonFunctions.waitTillAnyTimeout] = ::WaitTillAnyTimeout; RegisterClientCommands(); level notify( level.notifyTypes.gameFunctionsInitialized ); @@ -71,6 +71,11 @@ GetXuidWrapper() return self GetXUID(); } +WaitTillAnyTimeout( timeOut, string1, string2, string3, string4, string5 ) +{ + return common_scripts\utility::waittill_any_timeout( timeOut, string1, string2, string3, string4, string5 ); +} + ////////////////////////////////// // Command Implementations ///////////////////////////////// diff --git a/GameFiles/GameInterface/_integration_t6.gsc b/GameFiles/GameInterface/_integration_t6.gsc index 8476f6060..e049b9cc4 100644 --- a/GameFiles/GameInterface/_integration_t6.gsc +++ b/GameFiles/GameInterface/_integration_t6.gsc @@ -27,6 +27,7 @@ Setup() level.overrideMethods[level.commonFunctions.waittillNotifyOrTimeout] = ::WaitillNotifyOrTimeoutWrapper; level.overrideMethods[level.commonFunctions.isBot] = ::IsBotWrapper; level.overrideMethods[level.commonFunctions.getXuid] = ::GetXuidWrapper; + level.overrideMethods[level.commonFunctions.waitTillAnyTimeout] = ::WaitTillAnyTimeout; RegisterClientCommands(); @@ -98,6 +99,11 @@ GetXuidWrapper() return self GetXUID(); } +WaitTillAnyTimeout( timeOut, string1, string2, string3, string4, string5 ) +{ + return common_scripts\utility::waittill_any_timeout( timeOut, string1, string2, string3, string4, string5 ); +} + ////////////////////////////////// // Command Implementations /////////////////////////////////