SXF_IS<TARGET/MASTER/TRACER> Flags
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8215
- 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:
SXF_IS<TARGET/MASTER/TRACER> Flags
Based off of http://forum.zdoom.org/viewtopic.php?f=15&t=49295
Here's the pull request.
All it does is set the spawned actor as the calling actor's respective pointer(s).
Here's the pull request.
All it does is set the spawned actor as the calling actor's respective pointer(s).
Re: SXF_IS<TARGET/MASTER/TRACER> Flags
Didn't want to double post in the other thread so I'm posting here instead.
I think I realized a potential problem. How dangerous is it having two monsters as each other's master? Because now it's possible for that to happen by specifying SXF_SETMASTER|SXF_ISMASTER. Shouldn't there be a safety check of some sort?
I think I realized a potential problem. How dangerous is it having two monsters as each other's master? Because now it's possible for that to happen by specifying SXF_SETMASTER|SXF_ISMASTER. Shouldn't there be a safety check of some sort?
- 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: SXF_IS<TARGET/MASTER/TRACER> Flags
Is there some function that climbs up a chain of Master pointers? I think that's the only place it'd be an issue.
- Major Cooke
- Posts: 8215
- 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: SXF_IS<TARGET/MASTER/TRACER> Flags
Read.
Short version, it'll be fine as long as you don't attempt to do anything too spectacular or stupid with it.
And remember, SXF_ORIGINATOR does not affect setting of master for the calling actor. It only affects transference to the spawned child.
Short version, it'll be fine as long as you don't attempt to do anything too spectacular or stupid with it.
And remember, SXF_ORIGINATOR does not affect setting of master for the calling actor. It only affects transference to the spawned child.
Re: SXF_IS<TARGET/MASTER/TRACER> Flags
I'm sorry, but could you tell me why you linked me to the A_TransferPointer page? I was talking about A_SpawnItemEx specifically.
I also realized something even more dangerous: what if both calling actor and spawning actor are missiles and you specify SXF_SETTARGET|SXF_ISTARGET?
But back to the page you linked, is this what you wanted me to read?:
I also realized something even more dangerous: what if both calling actor and spawning actor are missiles and you specify SXF_SETTARGET|SXF_ISTARGET?
But back to the page you linked, is this what you wanted me to read?:
IIRC A_SpawnItemEx doesn't have such safety checks.A_TransferPointer page wrote:By default MASTER and TARGET become null if values are assigned that would cause infinite relationships. (Missiles targeting each other, masters mastering each other.)
The following flags can manipulate and disable the safe guards to allow for more complex relationships:
PTROP_UNSAFETARGET (1) - Don't null assignments that result in an infinite chain of missiles referencing each other
PTROP_UNSAFEMASTER (2) - Don't null assignments that result in an infinite chain of actors referencing each other
PTROP_NOSAFEGUARDS (4) - Same as putting in PTROP_UNSAFETARGET|PTROP_UNSAFEMASTER, or 3 (3 and 4 do the same thing, which is redundant).
- Major Cooke
- Posts: 8215
- 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: SXF_IS<TARGET/MASTER/TRACER> Flags
The point is, it's not too terribly dangerous if you're careful. Just don't do anything stupid or spectacular and you'll be fine.
Re: SXF_IS<TARGET/MASTER/TRACER> Flags
Heh, you don't have to tell me that.
By the way, I noticed you changed your mind about the 'originator'.
How come?
By the way, I noticed you changed your mind about the 'originator'.
How come?
- Major Cooke
- Posts: 8215
- 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: SXF_IS<TARGET/MASTER/TRACER> Flags
The moment I opened the pull request, I closed it. It still shows up in the log regardless. Doesn't mean its in.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: SXF_IS<TARGET/MASTER/TRACER> Flags
The changelog doesn't filter the pull requests from actual repo contents. Which IMO is a bug in itself, but since I got no access to the server I cannot fix it.
