CheckProximity still detects some items such as weapons and ammo even after they're picked up. For weapons specifically, it appears that for any weapon that is present in the map once it loads is prone to this, but any that are summoned within the level appear to function as intended.
From what I've tested, items such as health, armor, and most ammo types appear to be unaffected by this though I was getting some strange results involving the Shotgun Shells ammo pickup.
I've attached a file to load up that performs a check for any nearby Shotguns in the map.
CheckProximity and picked up items
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.
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.
CheckProximity and picked up items
- Attachments
-
- checkprox_test.pk3
- (992 Bytes) Downloaded 32 times
Re: CheckProximity and picked up items
CheckProximity() iterates on thinkers, not only on remaining level items. For historical reasons position of actor isn't changed when weapon is picked up. That's why it is found by proximity test.
Of course it's not a big deal to set position after pickup to some very large (or very small) value outside of level bound. Unfortunately it's quite hard to predict what side effects it may or may not cause.
Of course it's not a big deal to set position after pickup to some very large (or very small) value outside of level bound. Unfortunately it's quite hard to predict what side effects it may or may not cause.
Re: CheckProximity and picked up items
I see. Would there be any sort of work around currently that can mediate this problem? Something similar to CheckProximity or a custom ACS function perhaps?
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: CheckProximity and picked up items
Could there be an option to skip all actors that have an owner / don't have a physical body in the playsim?
(Or maybe not even make it an option - are there any mods that deliberately take advantage of this behaviour?)
(Or maybe not even make it an option - are there any mods that deliberately take advantage of this behaviour?)
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: CheckProximity and picked up items
A function that scans the map for items should never pick an owned item. Any theoretical mod depending on such a quirk has to be considered broken.
Re: CheckProximity and picked up items
I think it should be fixed like this. Made a pull request just to be sure.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: CheckProximity and picked up items
That looks correct.