From f3adb75d555a260b7f539c3a59fe8edb58b9c22b Mon Sep 17 00:00:00 2001 From: INeedGames Date: Wed, 11 Oct 2023 19:33:43 -0600 Subject: [PATCH] Fix possible infinite loop Possibility of an exploiter killing an enemy and disconnecting within the `wait` window to trigger an infinite loop. --- .../AntiCheat/PT6/storage/t6/scripts/mp/_customcallbacks.gsc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GameFiles/AntiCheat/PT6/storage/t6/scripts/mp/_customcallbacks.gsc b/GameFiles/AntiCheat/PT6/storage/t6/scripts/mp/_customcallbacks.gsc index 133a6a59f..5e62645db 100644 --- a/GameFiles/AntiCheat/PT6/storage/t6/scripts/mp/_customcallbacks.gsc +++ b/GameFiles/AntiCheat/PT6/storage/t6/scripts/mp/_customcallbacks.gsc @@ -143,6 +143,8 @@ waitForFrameThread() waitForAdditionalAngles( logString, beforeFrameCount, afterFrameCount ) { + self endon( "disconnect" ); + currentIndex = self.currentAnglePosition; wait( 0.05 * afterFrameCount ); @@ -260,4 +262,4 @@ Callback_PlayerDisconnect() { level notify( "disconnected", self ); self [[maps\mp\gametypes\_globallogic_player::callback_playerdisconnect]](); -} \ No newline at end of file +}