1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

Revert a2edf52: SQOpsLimiter does a more precise job (#11754)

This commit is contained in:
Loïc Guilloux
2024-01-12 17:04:43 +01:00
committed by GitHub
parent 1101b04371
commit 28efa65e0c
4 changed files with 30 additions and 11 deletions

View File

@@ -2026,5 +2026,12 @@ function Regression::Start()
print(" IsEventWaiting: false");
this.Math();
/* Check Valuate() is actually limited, MUST BE THE LAST TEST. */
print("--Valuate() with excessive CPU usage--")
local list = AIList();
list.AddItem(0, 0);
local Infinite = function(id) { while(true); }
list.Valuate(Infinite);
}

View File

@@ -9587,4 +9587,23 @@ ERROR: IsEnd() is invalid as Begin() is never called
-1 > 2147483647: false
-2147483648 > 2147483647: false
13725 > -2147483648: true
--Valuate() with excessive CPU usage--
Your script made an error: excessive CPU usage in valuator function
*FUNCTION [unknown()] regression/main.nut line [2034]
*FUNCTION [Valuate()] NATIVE line [-1]
*FUNCTION [Start()] regression/main.nut line [2035]
[id] 0
[this] TABLE
[Infinite] CLOSURE
[list] INSTANCE
[this] INSTANCE
Your script made an error: excessive CPU usage in valuator function
*FUNCTION [Start()] regression/main.nut line [2035]
[Infinite] CLOSURE
[list] INSTANCE
[this] INSTANCE
ERROR: The script died unexpectedly.