[Fixed] "Give artifacts" cheat failing in certain situations

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

"Give artifacts" cheat failing in certain situations

Postby Rachael » Wed Apr 06, 2022 7:05 pm

https://github.com/coelckers/gzdoom/blo ... #L210-L211

The "give artifacts" cheat fails if the item is a usable-from-inventory artifact, but has only a max amount of 1.

This is due to the check in the linked lines above, where it checks if def.MaxAmount > 1 when deciding whether to give the artifact.

I would suggest, instead, to change that check to def.bAutoActivate == false - I think that would likely produce the intended outcome of the check.

Fixing this issue would prevent the need for gross hacks like this:
Spoiler:
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: "Give artifacts" cheat failing in certain situations

Postby Rachael » Fri Apr 08, 2022 6:15 am

Well the main reason I posted this was to see if it would break anything doing the proposed fix. If I am not going to get any response I will assume no.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: "Give artifacts" cheat failing in certain situations

Postby Gez » Fri Apr 08, 2022 7:35 am

If it only affects a cheat code, it's probably not too critical anyway. But you could use if (def.MaxAmount > 1 || def.bAutoActivate == false) just to be safe.
Gez
 
 
 
Joined: 06 Jul 2007


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests