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
SCI32: Fix QFG4 cave tentacle #1463
Conversation
dc48fe2
to
8d84f34
Compare
Grr. Separate caching wasn't redundant. After a mage player uses the cloth, the handsOn() allows them to adjust the slider to an inappropriate speed before casting levitate. Not an obvious exploit or a dangerous one. It'd just cause hero to outpace the tentacle and get it stuck in an edge case. |
Fixed. The patch sets its own speed for crossing after handsOff(). Caching takes place when the cloth is used. |
*sigh* Bytes were available,.. Caching takes place when the cloth is used AND just before crossing. Technically if the slider is adjusted between using the cloth and an abort... the second cache in state 5 is skipped, and the new value will be discarded, restoring the original speed instead. I think I've sharpened that edge case enough. =) |
0f99b7d
to
616299e
Compare
Yes. Vertical levitation scripts exist, but they do not carry hero across from left to right. With those, hero levitates down to the pit floor, manually walks to the other side, then levitates up via a separate casting. From the wiki
Fighters and rogues each have a second script (crossByHandLeft, tightRopeLeft) to travel *horizontally* over the pit in the opposite direction, from the left side. Mages do not.
When sLevitateOverPit starts, it advances through states 0-3 then does handsOn(). script 710 - sLevitateOverPit::changeState()
So skipping directly to state 5 with register=0 set for rightward movement (from the left side) should never happen.
script 710 - sLevitateOverPit::handleEvent()
sLevitateOverPit only responds to events in state 3, when the cloth has been unfurled.
Levitate delegates its effects to scripts within each room. Room 710 does schedule other levitation scripts, distinct from the horizontal crossing.
From the wiki
script 21 - levitateSpell::doVerb(4)
If not specifically using the cloth to float leftward, g73_mouseDownHandler and g6_regions get sent event 89. regions is an EventHandler List with one element, rm710. (ancestry: Rgn/Room/GloryRm)
script 710 - rm710::doVerb(89)
None of those scripts reference sLevitateOverPit. They send hero up and down independently. |
Fixes wriggling and retraction when hero travels over the pit, bug #10615 Supersedes commit 259f262
I've added instructions in the OP to test the room under endgame conditions - when the pit floor is accessible, along with all those other vertical Levitate effects. |
Great work, well done! :) Merging |
Fixes wriggling and retraction when hero travels over the pit, bug #10615
Wriggle
This supersedes an arithmetic workaround added in commit 259f262.
Fighter
Mage
To test the room at the beginning of the game...
As I experimented with different patches, I found I got different results after playing through the first two rooms to get there naturally (or restored a natural savegame). And medium speeds could be symptomatic when fast and slow were fine. I kept adjusting the patches' delay/speed value until I got consistent results.
To test the room at the end of the game...
You can then levitate down & up, standing on either side of the pit floor.
Clicking the cloth on hero only works if standing on the upper right.
Casting Levitate while the cloth is unfurled sends hero left.
Using the cloth at any other position yields a generic message, accomplishing nothing.
"You spread out the square of cloth for a moment."