The COPYROBOT "[name]" command has, since 2.80X, used a sorted list of robots by name to select a robot to copy. COPYROBOT "[name]" selects the first robot named "[name]" in this list. This list is sorted on load using qsort, which is unstable, meaning any robot named "[name]" on the board could potentially be selected and that the robot that is actually selected is dependent on a given platform's qsort implementation.
This affects The Evil Midnight Bomber vs. The City, where on the board "Die Fledermaus 1", there are a set of door robots with the same name and all but one use COPYROBOT "[name]". These robots are more likely than not to copy themselves/each other instead of the correct robot, resulting in the door only partially opening later.
Before 2.80X, MegaZeux implemented COPYROBOT "[name]" by searching a non-sorted robot list for the first matching name. This would always choose the robot with the lowest robot ID (which wasn't necessarily consistent either, but was harder to break). This approach could fix older games like The Evil Midnight Bomber but might cause issues of its own due to 2.90+ not optimizing robot IDs. It is also slower.
This issue also affects RID*/ROBOT_ID_*, which use the same function as COPYROBOT "[name]" to select a robot.
Report ID | 709 | Title | COPYROBOT "[name]", RID* target is non-deterministic |
Product | MegaZeux Bugs | Status | UNFILED (Severity 0 - None Assigned) |
Version | 2.91b | Fixed in | - |
Introduced In Version | 2.80X | Operating System | All platforms |
Page 1 of 1
Report ID #709: COPYROBOT "[name]", RID* target is non-deterministic
#1 Lachesis
Posted 19 January 2018 - 11:02 PM
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
1 User(s) are reading this issue
1 Guests and 0 Anonymous Users
Powered by IP.Tracker 1.3.2 © 2024 IPS, Inc.