A_RadiusGive Overhaul
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
A_RadiusGive Overhaul
Pull Request.
Fixed a lot of things wrong with A_RadiusGive, and added some goodies. See the pull request for more info.
If you're wondering, KILLED != CORPSE at all times. If you want true results of who is truly dead and whose not, use RGF_KILLED.
One thing I forgot to mention in the request is RGF_GIVESELF, the pointer flags and the species processing comes first. RGF_GIVESELF will always succeed now.
Fixed a lot of things wrong with A_RadiusGive, and added some goodies. See the pull request for more info.
If you're wondering, KILLED != CORPSE at all times. If you want true results of who is truly dead and whose not, use RGF_KILLED.
One thing I forgot to mention in the request is RGF_GIVESELF, the pointer flags and the species processing comes first. RGF_GIVESELF will always succeed now.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_RadiusGive Overhaul
One note:
MF_SPECIAL is NOT the same as being an inventory item. Strife's Spectres also use this flag.
MF_SPECIAL is NOT the same as being an inventory item. Strife's Spectres also use this flag.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: A_RadiusGive Overhaul
Fixing now.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_RadiusGive Overhaul
Seems like you'd have to check the inheritance chain.
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: A_RadiusGive Overhaul
Only reason to do that is for state jumps, I think.
Graf: Fixed. No longer uses MF_SPECIAL, now uses thing->IsKindOf(RUNTIME_CLASS(AInventory)) instead.
Graf: Fixed. No longer uses MF_SPECIAL, now uses thing->IsKindOf(RUNTIME_CLASS(AInventory)) instead.
Re: A_RadiusGive Overhaul
Amazing! You truly are the best!
Can map-wide radiuses work reliably now, as well?
Can map-wide radiuses work reliably now, as well?
- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: A_RadiusGive Overhaul
They were working fine for me to begin with.
And, I'm not the best. Once they pointed out that it was flawed logic, the problem was much easier to fix than thought.
And, I'm not the best. Once they pointed out that it was flawed logic, the problem was much easier to fix than thought.

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49223
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: A_RadiusGive Overhaul
Merged, although I'll freely admit that I only superficially reviewed the code - it can only get better from what was there... 

- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: A_RadiusGive Overhaul
You can always tell me how I can improve upon it and I'll do my best to do so.
I had the uneasy feeling that a bunch of booleans would be frowned upon, but I didn't want to make as much of a mess.
I had the uneasy feeling that a bunch of booleans would be frowned upon, but I didn't want to make as much of a mess.
- Xtyfe
- Posts: 1490
- Joined: Fri Dec 14, 2007 6:29 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
Re: A_RadiusGive Overhaul
Oh wow, this is very useful for me. Thanks for fixing it up 

- Major Cooke
- Posts: 8206
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: GZBoomer Town
- Contact:
Re: A_RadiusGive Overhaul
Not a problem! I've updated the wiki too.
It should be noted I didn't touch the radius code. I'm going nowhere near it as I'm rather horrible at that kind of thing.
It should be noted I didn't touch the radius code. I'm going nowhere near it as I'm rather horrible at that kind of thing.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: A_RadiusGive Overhaul
Oh right, I forgot you could do this. Nevermind me.Major Cooke wrote:thing->IsKindOf(RUNTIME_CLASS(AInventory))
