by Kate » Sun Dec 23, 2007 12:46 pm
A patch against r628: This adds in mostly complete sight checking for friendlies and thing_hate with a_lookex, fixes a crash caused when trying to look up a sound target immediately after unsetting it (a mistake on my part, sorry), and adds a new function: A_JumpIfTargetInLOS. It takes 2 parameters: a jump target and optionally an fov, the fov parameter works just like it does with A_LookEx (leaving it 0 disables the fov check altogether and just sees if the actor can potentially see it's target regardless of current facing direction), but it only makes sense with monsters. The action function though will also jump as appropriate if the player has a target under their crosshair so you can also use it on weapons and inventory to figure out if the player is aiming at a suitable target.
Note: Due to the way sight/sound code is done, monster attacks do not ever get processed by the sound target code, so maxheardist and LOF_NOSOUNDCHECK will only affect a monster's ability to hear players making noise, they will always be deaf to each other (unless of course you use A_NoiseAlert calls appropriately, in which case the hearing range/check flags should function properly).
A patch against r628: This adds in mostly complete sight checking for friendlies and thing_hate with a_lookex, fixes a crash caused when trying to look up a sound target immediately after unsetting it (a mistake on my part, sorry), and adds a new function: A_JumpIfTargetInLOS. It takes 2 parameters: a jump target and optionally an fov, the fov parameter works just like it does with A_LookEx (leaving it 0 disables the fov check altogether and just sees if the actor can potentially see it's target regardless of current facing direction), but it only makes sense with monsters. The action function though will also jump as appropriate if the player has a target under their crosshair so you can also use it on weapons and inventory to figure out if the player is aiming at a suitable target.
Note: Due to the way sight/sound code is done, monster attacks do not ever get processed by the sound target code, so [i]maxheardist[/i] and [i]LOF_NOSOUNDCHECK[/i] will only affect a monster's ability to hear players making noise, they will always be deaf to each other (unless of course you use A_NoiseAlert calls appropriately, in which case the hearing range/check flags should function properly).