I am looking for methods to do the two following operations: 1- Find the nearest opponent(s) to a player given its positions. 2- Find if an opponent is in line of sight, but passing through walls. 3- Find opponent nearest to the line of sight.
For 1 I think I must use SV_AreaEntities (alias G_ENTITIES_IN_A_BOX or trap_EntitiesInBox), but I can't find how this may return the nearest opponent, it seems to only return all entities (I need to filter out all but players and sort by distance). For 2 I think that SV_Trace must be used, but how to pass through walls but not players? I saw that passEntityNum is an argument, but how to set that to walls? About 3 I have no idea at all... If you have any pointer that could give me a clue on how to do these operations I would be very glad to hear. Also I am a bit rusty with vectors so if you have a tutorial or two explaining how ioquake3 manage its vectors operations (which I have no experience with), it would also be very helpful. Thank you for reading me.
_______________________________________________ ioquake3 mailing list ioquake3@lists.ioquake.org http://lists.ioquake.org/listinfo.cgi/ioquake3-ioquake.org By sending this message I agree to love ioquake3 and libsdl.