SXF_IS<TARGET/MASTER/TRACER> Flags

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: SXF_IS<TARGET/MASTER/TRACER> Flags

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Graf Zahl » Mon Aug 10, 2015 5:39 am

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.

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Major Cooke » Mon Aug 10, 2015 5:25 am

The moment I opened the pull request, I closed it. It still shows up in the log regardless. Doesn't mean its in.

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Fishytza » Mon Aug 10, 2015 5:21 am

Heh, you don't have to tell me that.

By the way, I noticed you changed your mind about the 'originator'.
How come?

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Major Cooke » Mon Aug 10, 2015 5:15 am

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

by Fishytza » Mon Aug 10, 2015 12:35 am

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?:
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).
IIRC A_SpawnItemEx doesn't have such safety checks.

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Major Cooke » Sun Aug 09, 2015 10:12 pm

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.

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by NeuralStunner » Sun Aug 09, 2015 4:25 pm

Is there some function that climbs up a chain of Master pointers? I think that's the only place it'd be an issue.

Re: SXF_IS<TARGET/MASTER/TRACER> Flags

by Fishytza » Sun Aug 09, 2015 4:13 pm

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?

SXF_IS<TARGET/MASTER/TRACER> Flags

by Major Cooke » Sun Aug 09, 2015 1:09 pm

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).

Top