by FDARI » Tue Mar 22, 2011 4:51 pm
Included in
http://forum.zdoom.org/viewtopic.php?f=34&t=29292 (using either patch 2 or patch 3)
I wish to discuss a possible feature. I'll readily write the code for it later, if there is any chance that it will be accepted. (Provided that it does not turn out to be overly difficult afterall.)
You might want infighting to be fully enabled, and still be able to make an actor distinguish between being shot by a friend and being shot by an enemy. Damage-type hacks are possible. A more explicit way of doing it, without using damage type to represent faction (unnatural use), would be to extend A_JumpIfTargetInLOS with a flag: JLOSF_FRIENDNOJUMP. It should also apply to A_JumpIfInTargetLOS, and may be possible to combine with JLOSF_CHECKMASTER and/or JLOSF_PROJECTILE.
Keep in mind, though, that not jumping is not proof that you're targeting a friend. It could also imply that your target is not in sight, not alive, or that you have no target.
Some consideration of the originating actor might be required. It is possible that the flag FRIENDNOJUMP will have effect only if both actors are qualified as players or monsters.
Included in [url]http://forum.zdoom.org/viewtopic.php?f=34&t=29292[/url] (using either patch 2 or patch 3)
I wish to discuss a possible feature. I'll readily write the code for it later, if there is any chance that it will be accepted. (Provided that it does not turn out to be overly difficult afterall.)
You might want infighting to be fully enabled, and still be able to make an actor distinguish between being shot by a friend and being shot by an enemy. Damage-type hacks are possible. A more explicit way of doing it, without using damage type to represent faction (unnatural use), would be to extend A_JumpIfTargetInLOS with a flag: JLOSF_FRIENDNOJUMP. It should also apply to A_JumpIfInTargetLOS, and may be possible to combine with JLOSF_CHECKMASTER and/or JLOSF_PROJECTILE.
Keep in mind, though, that not jumping is not proof that you're targeting a friend. It could also imply that your target is not in sight, not alive, or that you have no target.
Some consideration of the originating actor might be required. It is possible that the flag FRIENDNOJUMP will have effect only if both actors are qualified as players or monsters.