AmProsius / gothic-1-community-patch

Gothic 1 Community Patch
Other
49 stars 4 forks source link

Consumables are not removed on interruption #239

Open AmProsius opened 3 years ago

AmProsius commented 3 years ago

Describe the bug When the player character consumes an item and is interrupted while the animation plays, the effect of the item is applied, but the item is not removed from the inventory.

Expected behavior When the player character consumes an item and is interrupted while the animation plays, the item will now correctly be removed from the inventory.

Additional context Bug provided by Blubbler.

AmProsius commented 3 years ago

I haven't checked yet, but the bug might be fixed by Union, because the item duplication while smithing/frying is also fixed.

szapp commented 3 years ago

It seems that there might not be an easy way to fix it. I have not looked at this at all, but I think the on_state function (where any consumable effects are triggered) is called on animation onset while the item is only removed when the animation played to a specific frame.

Now changing the time of triggering the on_state function to when the animation has finished would lead to the opposite, much more severe problem: The consumable is gone but the effect was not applied. This may be unfortunate for one-time bonuses, but very bad for health increase: In a fight with quickly attacking enemies the player could never restock the health because the animation would always be interrupted.

An alternative which might be impossible would be to tie the triggering of the on_state function to the frame of when the item is removed. Whether this is possible I don't know.

pawbuj1981 commented 3 years ago

I believe every game has some glitch like this mentioned above. I wouldn't touch sucha a things, it may leads to further problems.

BTW there is lack of progress from last 17 days. Is everything fine with a project ?

AmProsius commented 3 years ago

BTW there is lack of progress from last 17 days. Is everything fine with a project ?

Yes, everything's fine. The project pauses for private reasons at the moment, but will continue in the third quarter of 2021.

pawbuj1981 commented 3 years ago

Please check new Union zBugFixes, PackStringFix which fixes msome inventory bugs like item disseaperance.