Wrong orientation for some levers
Posted: Sat May 09, 2020 7:54 pm
While playing some DFU today I noticed in the dungeon "Ruins of Old Barbona's Place", some of the levers have the wrong Action Rotation axis. Instead of rotating about the Z-axis they rotate about the X-axis, which ends up looking like this:
From retracing the callstack where the Action Rotation is applied to the lever's Action Script, it looks to me like the axis is coming straight from the data files. Am I assuming right this is an error in the DF data files?
I also tried to verify this by visiting the location in the original DF but it is suprisingly tedious to get to that specific location in that specific dungeon, so after a while I gave up on that. On that note - do you guys have some sort of testing environment set up for situations like these? If so, how does it work?
But back to the original problem - I'm not sure if the same error occurs in the original DF or not but would it be a viable workaround to force the Action Rotation to be on the Z-Axis in case the rotation is being applied to a lever object? If so, can we uniquely identify a lever object by its Model Description "C0Z"?
From the code it looks like this wouldn't be the only workaround like this anyways - there are such workarounds for Coffin lids & wheels already in place (RDBLayout.cs:1044+).
EDIT: Ok, it seems "C0Z" is used by a wall segment that is moved by the lever as well, so not exactly unique to the lever it seems. I could still work around that - at least for that instance - but no idea what other objects have that same description so thats probably not a good idea. I suppose identifying it by its mesh ID might work.
From retracing the callstack where the Action Rotation is applied to the lever's Action Script, it looks to me like the axis is coming straight from the data files. Am I assuming right this is an error in the DF data files?
I also tried to verify this by visiting the location in the original DF but it is suprisingly tedious to get to that specific location in that specific dungeon, so after a while I gave up on that. On that note - do you guys have some sort of testing environment set up for situations like these? If so, how does it work?
But back to the original problem - I'm not sure if the same error occurs in the original DF or not but would it be a viable workaround to force the Action Rotation to be on the Z-Axis in case the rotation is being applied to a lever object? If so, can we uniquely identify a lever object by its Model Description "C0Z"?
From the code it looks like this wouldn't be the only workaround like this anyways - there are such workarounds for Coffin lids & wheels already in place (RDBLayout.cs:1044+).
EDIT: Ok, it seems "C0Z" is used by a wall segment that is moved by the lever as well, so not exactly unique to the lever it seems. I could still work around that - at least for that instance - but no idea what other objects have that same description so thats probably not a good idea. I suppose identifying it by its mesh ID might work.