|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Go to the source code of this file.
Macros | |
| #define | steerlib_pull(ent, point) |
| Uniform pull towards a point. | |
| #define | steerlib_push(ent, point) |
| Uniform push from a point. | |
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. | |
| vector | steerlib_attract (entity this, vector point, float maximal_distance) |
| Pull toward a point increasing the pull the closer we get. | |
| 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. | |
| 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. | |
| vector | steerlib_repel (entity this, vector point, float maximal_distance) |
| Move away from a point. | |
| vector | steerlib_standoff (entity this, vector point, float ideal_distance) |
| Try to keep at ideal_distance away from point. | |
| 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. | |
| vector | steerlib_traceavoid (entity this, float pitch, float length) |
| Steer towards the direction least obstructed. | |
| vector | steerlib_traceavoid_flat (entity this, float pitch, float length, vector vofs) |
| Steer towards the direction least obstructed. | |
| vector | steerlib_wander (entity this, float range, float threshold, vector oldpoint) |
| A random heading in a forward semicircle. | |
Variables | |
| float | flock_id |
| flocking by .flock_id Group will move towards the unified direction while keeping close to eachother. | |
| #define steerlib_pull | ( | ent, | |
| point ) |
Uniform pull towards a point.
Definition at line 8 of file steerlib.qc.
Referenced by walker_rocket_loop2(), walker_rocket_loop3(), and walker_rocket_think().
| #define steerlib_push | ( | ent, | |
| point ) |
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 dir, entity(), location_isok(), MOVE_NORMAL, NULL, trace_endpos, trace_fraction, and vector.
Referenced by steerlib_beamsteer().
Pull toward a point, The further away, the stronger the pull.
Definition at line 27 of file steerlib.qc.
References bound(), entity(), normalize(), origin, vector, and vlen().
Referenced by ewheel_move_enemy(), steerlib_flock(), steerlib_flock2d(), and steerlib_swarm().
Pull toward a point increasing the pull the closer we get.
Definition at line 37 of file steerlib.qc.
References bound(), entity(), normalize(), origin, vector, and vlen().
| 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(), entity(), normalize(), origin, vector, and vlen().
Referenced by ewheel_move_path(), Monster_Move(), walker_move_path(), and walker_move_to().
| 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, entity(), makevectors, maxs, mins, MOVE_NOMONSTERS, normalize(), origin, trace_fraction, v_forward, v_right, vectoangles(), and vector.
Dodge a point NOTE: doesn't work well.
Definition at line 143 of file steerlib.qc.
| 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.
| 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.
Move away from a point.
Definition at line 89 of file steerlib.qc.
References bound(), entity(), normalize(), origin, vector, and vlen().
Referenced by steerlib_flock(), steerlib_flock2d(), and steerlib_swarm().
Try to keep at ideal_distance away from point.
Definition at line 100 of file steerlib.qc.
References entity(), normalize(), origin, vector, and vlen().
| 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.
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 entity(), MOVE_NOMONSTERS, origin, pitch, trace_fraction, v_forward, v_right, v_up, and vector.
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 entity(), MOVE_NOMONSTERS, normalize(), origin, pitch, trace_fraction, v_forward, v_right, and vector.
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(), entity(), normalize(), origin, randomvec(), v_forward, vdist, and vector.
| 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.