Flag for A_FaceTarget
Moderator: GZDoom Developers
- GhostKillahZero
- Posts: 742
- Joined: Wed Nov 13, 2013 4:41 pm
- Location: 343 Industries Headquarters
- Contact:
Flag for A_FaceTarget
FAF_CLOSEST - like the name implies, actors with this flag will target other actors closest to them.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Flag for A_FaceTarget
The function is called "A_FaceTarget", i.e. the point is to face the TARGET, not some random actor. What's the use case?
- 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
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.
I'd rather just use a BlockThingsIterator there myself.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Flag for A_FaceTarget
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.