|
Xonotic
|
Include dependency graph for steerlib.qc:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | steerlib_pull(ent, point) normalize(point - (ent).origin) |
| Uniform pull towards a point. More... | |
| #define | steerlib_push(ent, point) normalize((ent).origin - point) |
| Uniform push from a point. More... | |
Functions | |
| float | beamsweep (entity this, vector from, vector dir, float length, float step, float step_up, float step_down) |
| vector | steerlib_arrive (entity this, vector point, float maximal_distance) |
| Pull toward a point, The further away, the stronger the pull. More... | |
| vector | steerlib_attract (entity this, vector point, float maximal_distance) |
| Pull toward a point increasing the pull the closer we get. More... | |
| vector | steerlib_attract2 (entity this, vector point, float min_influense, float max_distance, float max_influense) |
| vector | steerlib_beamsteer (entity this, vector dir, float length, float step, float step_up, float step_down) |
| vector | steerlib_dodge (entity this, vector point, vector dodge_dir, float min_distance) |
| Dodge a point NOTE: doesn't work well. More... | |
| vector | steerlib_flock (entity this, float _radius, float standoff, float separation_force, float flock_force) |
| vector | steerlib_flock2d (entity this, float _radius, float standoff, float separation_force, float flock_force) |
| flocking by .flock_id Group will move towards the unified direction while keeping close to eachother. More... | |
| vector | steerlib_repel (entity this, vector point, float maximal_distance) |
| Move away from a point. More... | |
| vector | steerlib_standoff (entity this, vector point, float ideal_distance) |
| Try to keep at ideal_distance away from point. More... | |
| vector | steerlib_swarm (entity this, float _radius, float standoff, float separation_force, float swarm_force) |
| All members want to be in the center, and keep away from eachother. More... | |
| vector | steerlib_traceavoid (entity this, float pitch, float length) |
| Steer towards the direction least obstructed. More... | |
| vector | steerlib_traceavoid_flat (entity this, float pitch, float length, vector vofs) |
| Steer towards the direction least obstructed. More... | |
| vector | steerlib_wander (entity this, float range, float threshold, vector oldpoint) |
| A random heading in a forward semicircle. More... | |
Variables | |
| float | flock_id |
| flocking by .flock_id Group will move towards the unified direction while keeping close to eachother. More... | |
Uniform pull towards a point.
Definition at line 8 of file steerlib.qc.
Uniform push from a point.
Definition at line 17 of file steerlib.qc.
| float beamsweep | ( | entity | this, |
| vector | from, | ||
| vector | dir, | ||
| float | length, | ||
| float | step, | ||
| float | step_up, | ||
| float | step_down | ||
| ) |
Definition at line 310 of file steerlib.qc.
References location_isok(), MOVE_NORMAL, NULL, trace_endpos, trace_fraction, and vector().
Referenced by steerlib_beamsteer().
Here is the call graph for this function:
Here is the caller graph for this function:Pull toward a point, The further away, the stronger the pull.
Definition at line 27 of file steerlib.qc.
References bound(), direction, normalize(), origin, vector(), and vlen().
Referenced by steerlib_flock(), steerlib_flock2d(), and steerlib_swarm().
Here is the call graph for this function:
Here is the caller graph for this function:Pull toward a point increasing the pull the closer we get.
Definition at line 37 of file steerlib.qc.
References bound(), direction, normalize(), origin, vector(), and vlen().
Here is the call graph for this function:| vector steerlib_attract2 | ( | entity | this, |
| vector | point, | ||
| float | min_influense, | ||
| float | max_distance, | ||
| float | max_influense | ||
| ) |
Definition at line 45 of file steerlib.qc.
References bound(), direction, normalize(), origin, vector(), and vlen().
Referenced by Monster_Move().
Here is the call graph for this function:
Here is the caller graph for this function:| vector steerlib_beamsteer | ( | entity | this, |
| vector | dir, | ||
| float | length, | ||
| float | step, | ||
| float | step_up, | ||
| float | step_down | ||
| ) |
Definition at line 347 of file steerlib.qc.
References beamsweep(), dir, makevectors, maxs, mins, MOVE_NOMONSTERS, normalize(), origin, trace_fraction, v_forward, v_right, vectoangles(), and vector().
Here is the call graph for this function:Dodge a point NOTE: doesn't work well.
Definition at line 143 of file steerlib.qc.
References max(), origin, and vlen().
Here is the call graph for this function:| vector steerlib_flock | ( | entity | this, |
| float | _radius, | ||
| float | standoff, | ||
| float | separation_force, | ||
| float | flock_force | ||
| ) |
Definition at line 157 of file steerlib.qc.
References entity(), origin, steerlib_arrive(), steerlib_repel(), and vector().
Here is the call graph for this function:| vector steerlib_flock2d | ( | entity | this, |
| float | _radius, | ||
| float | standoff, | ||
| float | separation_force, | ||
| float | flock_force | ||
| ) |
flocking by .flock_id Group will move towards the unified direction while keeping close to eachother.
xy only version (for ground movers).
Definition at line 182 of file steerlib.qc.
References entity(), origin, steerlib_arrive(), steerlib_repel(), and vector().
Here is the call graph for this function:Move away from a point.
Definition at line 89 of file steerlib.qc.
References bound(), direction, normalize(), origin, vector(), and vlen().
Referenced by steerlib_flock(), steerlib_flock2d(), and steerlib_swarm().
Here is the call graph for this function:
Here is the caller graph for this function:Try to keep at ideal_distance away from point.
Definition at line 100 of file steerlib.qc.
References direction, normalize(), origin, vector(), and vlen().
Here is the call graph for this function:| vector steerlib_swarm | ( | entity | this, |
| float | _radius, | ||
| float | standoff, | ||
| float | separation_force, | ||
| float | swarm_force | ||
| ) |
All members want to be in the center, and keep away from eachother.
The further from the center the more they want to be there.
This results in a aligned movement (?!) much like flocking.
Definition at line 212 of file steerlib.qc.
References entity(), origin, steerlib_arrive(), steerlib_repel(), and vector().
Here is the call graph for this function:Steer towards the direction least obstructed.
Run four tracelines in a forward funnel, bias each diretion negative if something is found there. You need to call makevectors() (or equivalent) before this function to set v_forward and v_right
Definition at line 240 of file steerlib.qc.
References MOVE_NOMONSTERS, origin, pitch, trace_fraction, v_forward, v_right, v_up, and vector().
Here is the call graph for this function:Steer towards the direction least obstructed.
Run tracelines in a forward trident, bias each direction negative if something is found there. You need to call makevectors() (or equivalent) before this function to set v_forward and v_right
Definition at line 282 of file steerlib.qc.
References MOVE_NOMONSTERS, normalize(), origin, pitch, trace_fraction, v_forward, v_right, and vector().
Here is the call graph for this function:A random heading in a forward semicircle.
usage: this.target = steerlib_wander(256, 32, this.target)
where range is the circle radius and threshold is how close we need to be to pick a new heading. Assumes v_forward is set by makevectors
Definition at line 125 of file steerlib.qc.
References bound(), normalize(), origin, randomvec(), v_forward, vdist, and vector().
Here is the call graph for this function:| float flock_id |
flocking by .flock_id Group will move towards the unified direction while keeping close to eachother.
Definition at line 156 of file steerlib.qc.