Phazorknight / Cogito

Immersive Sim Template Project for GODOT 4
MIT License
717 stars 81 forks source link

Weapon wielding status not properly reset after death #134

Closed samaritan-sw closed 3 months ago

samaritan-sw commented 3 months ago

After dying with a weapon in hand, you respawn empty-handed. If you then pick up a weapon and try to wield it with a hotkey, nothing will happen on screen but the log will say "Putting away [weapon]". You have to push the hotkey a second time to get the weapon to equip properly.

Repro steps:

I'm not too familiar with Cogito yet, but I suspect the issue is with the is_being_wielded property in WieldableItemPD.gd persisting after death - maybe it should always be set to false on startup, or at least check for a wieldable item in the default slot before setting itself to true?

Phazorknight commented 3 months ago

Thanks for flagging this! Will look into it, but what you mentioned is probably on the right track.

Phazorknight commented 3 months ago

Could you take a look at https://github.com/Phazorknight/Cogito/commit/b40272a6831969a808899cf128e487cadea33ed9 and see if that fixes this for you?

samaritan-sw commented 3 months ago

Yep, that seems to have done it! 👍

Phazorknight commented 3 months ago

Sweet, closing this!