Flag for A_FaceTarget

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
GhostKillahZero
Posts: 742
Joined: Wed Nov 13, 2013 4:41 pm
Location: 343 Industries Headquarters
Contact:

Flag for A_FaceTarget

Post by GhostKillahZero »

FAF_CLOSEST - like the name implies, actors with this flag will target other actors closest to them.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flag for A_FaceTarget

Post by Graf Zahl »

The function is called "A_FaceTarget", i.e. the point is to face the TARGET, not some random actor. What's the use case?
User avatar
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: Flag for A_FaceTarget

Post by Matt »

Seems like the intent is that the caller would *find* the nearest actor and target it.

I'd rather just use a BlockThingsIterator there myself.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Flag for A_FaceTarget

Post by Graf Zahl »

Or make a different function. Just a quick note that although this may sound simple, it can end up a costly operation because the only way to do it is a blockmap search that's spreading ever further out if nothing is found.
Post Reply

Return to “Feature Suggestions [GZDoom]”