stohrendorf / CroftEngine

An open-source Tomb Raider 1 engine remake
Other
281 stars 18 forks source link

don't do anything if the keyhole already had its key inserted #237

Closed stohrendorf closed 2 years ago

stohrendorf commented 2 years ago

fixes CE-540

stohrendorf commented 2 years ago

Thanks for mentioning the saves, didn't really think about that. But as the trigger state is already saved to the saves, this will (hopefully) only prevent multiple insertions of the keys, also for already saved games, as successfully inserting the key will set the trigger state to "active", which is now checked as a prerequisite. Blame me if it breaks things.

serishema commented 2 years ago

yup, I agree with that assessment. If you have an example of a level where you could insert keys twice, I can test it.

stohrendorf commented 2 years ago

Best option I can currently think of is to add some cheats in the gameflow scripts and then run to the first door in city of vilcabamba.

serishema commented 2 years ago

I gave it a try on the first door in vilcabamca. It didn't work. Seems to require a if(m_state.triggerState == TriggerState::Deactivated) return; as well to get the desired effect, but I don't know if this is correct.

stohrendorf commented 2 years ago

That's correct, totally forgot there's a special triggerKey handler that deactivates the keyhole.