HM-CODE / Haunted-Memories

A repository for Haunted Memories code.
http://www.haunted-memories.net/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

Obfuscate does not deactivate properly if activated twice #110

Closed Bradamante closed 12 years ago

Bradamante commented 12 years ago

When a player +activates Obfuscate 3 while it is already active. _LASTTX gets overwritten by the second use of it, and records the "invis" txlevel in the lasttx. Then when they deactivate, the code cannot clear it properly, and the player winds up accidentally hidden in poses and look and cannot deactivate the hiding.

Per Loki, the best fix would be to check whether they already have the Invis txlevel, and not to change _LASTTX if that is the case. That way there's always a fallback.

hmmorpheus commented 12 years ago

Fix here:

https://github.com/hmmorpheus/Haunted-Memories/blob/master/softcode/vampire/obf-activate.txt

nivthefox commented 12 years ago

Momo's fix didn't work; however, I've implemented a new fix. This is now complete.