-
Notifications
You must be signed in to change notification settings - Fork 81
[GEN][ZH] Fix using uninitialized memory 'mask' in getHumanPlayerMask() #1114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Retail GameIn the circle I have a waypoint that should clear the fog but no player is specified. Both of the cases the script runs in the debug window, but nothing happens PR #1114There is no difference between the result in game, don't know how to get the debugger to run without using the WB |
This code can be called in test map: The player mask works correctly now, but the shroud reveal still is bugged. |
I have now put the fix behind !RETAIL_COMPATIBLE_CRC to play this safe. |
So what does the script do now if a player is not selected in the script slot? I am unsure as to what the expected behavior should be in this case other than tell the mapper/player that the script is misconfigured? |
061bd82
to
24eb628
Compare
The expected behaviour is, according to code, all human players should see shroud or reveal at the waypoint with the given radius. |
It feels wrong that when no player is selected in the script, ALL players are selected? Then I feel like there should be an option for "All Players" |
Yes it is strange. But that it is a different conversation for another time. |
This change fixes using uninitialized memory 'mask' in getHumanPlayerMask()
This can never have worked. This code is reachable through
ScriptActions::doRevealMapAtWaypoint
andScriptActions::doShroudMapAtWaypoint
, which are accessible in the Map scripts.It perhaps is not possible to setup the scripts without specifying a player, in which case this code is unreachable. If it was reachable, the behaviour would be undefined.I looked at WorldBuilder and it the script action asks for a player to select. But it is possible to add the script without a player. I do not know if the script works then. It shows a question mark, indicating that something is misconfigured in it.