View Issue Details

IDProjectCategoryView StatusLast Update
0009820New issuesScriptingpublic2018-03-06 11:42
Reportereinheit-101Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0009820: onClientHUDRender() does not trigger when MTA is minimized
Description

onClientRender and onClientPreRender work when MTA is minimized, onClientHUDRender does not.
If that is intended behaviour then the according info in the Wiki is missing.

Steps To Reproduce

local numberz = 0

addEventHandler("onClientHUDRender", root, function()
numberz = numberz + 1
outputChatBox(numberz)
end)

-- Minimize MTA and re-open it after 10 seconds, you will see that "numberz" did not move forward in that time.
-- use the same code with other "render" events and you will see that the code is executed even when MTA is minimized.

Additional Information

I found this "bug" when i used onClientPreRender to store information in a table and then do something with that information a little bit later in onClientHUDRender and delete that table.
The problem is: When the player minimizes MTA, onClientPreRender still fills the table with information, but it will never be processed until the player re-opens MTA.
This creates a very, very large table when MTA is minimized for a certain time. If MTA is minimized for too long, the table will be so large that MTA interrupts the script because
it detects an infinite/too long execution as soon as onClientHUDRender starts working again.

TagsNo tags attached.

Activities

Saml1er

2018-03-06 02:23

viewer   ~~0026450

Isn't this how pretty much every game works? DirectX device is lost once you minimize MTA, because you simply don't need to do process any graphics.

einheit-101

2018-03-06 11:42

reporter   ~~0026451

Then why do onClientRender and onClientPreRender continue to work?

Issue History

Date Modified Username Field Change