|
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 | movelib_move_simple(e, newdir, velo, blendrate) |
| #define | movelib_move_simple_gravity(e, newdir, velo, blendrate) |
Functions | |
| void | movelib_brake_simple (entity this, float force) |
| float | movelib_dragflt (float fspeed, float drag, float exp_) |
| Simulate drag this.velocity *= movelib_dragflt(somespeed,0.01,0.7);. | |
| vector | movelib_dragvec (entity this, float drag, float exp_) |
| Simulate drag this.velocity = movelib_dragvec(this.velocity,0.02,0.5);. | |
| void | movelib_groundalign4point (entity this, float spring_length, float spring_up, float blendrate, float _max) |
| Pitches and rolls the entity to match the gound. | |
| vector | movelib_inertmove (entity this, vector new_vel, float new_bias) |
| vector | movelib_inertmove_byspeed (entity this, vector vel_new, float vel_max, float newmin, float oldmax) |
| Do a inertia simulation based on velocity. | |
| void | movelib_move (entity this, vector force, float max_velocity, float drag, float theMass, float breakforce) |
Variables | |
| float | movelib_lastupdate |
| vector | moveto |
| #define movelib_move_simple | ( | e, | |
| newdir, | |||
| velo, | |||
| blendrate ) |
Definition at line 36 of file movelib.qh.
Referenced by ewheel_move_enemy(), ewheel_move_path(), Monster_Move(), and spiderbot_frame().
| #define movelib_move_simple_gravity | ( | e, | |
| newdir, | |||
| velo, | |||
| blendrate ) |
Definition at line 39 of file movelib.qh.
Referenced by Monster_Move_2D().
Definition at line 167 of file movelib.qc.
References entity(), max(), normalize(), vector, velocity, and vlen().
Referenced by ewheel_move_enemy(), ewheel_move_idle(), Monster_Move(), Monster_Move_2D(), and spiderbot_frame().
Simulate drag this.velocity *= movelib_dragflt(somespeed,0.01,0.7);.
Definition at line 26 of file movelib.qc.
Simulate drag this.velocity = movelib_dragvec(this.velocity,0.02,0.5);.
Definition at line 10 of file movelib.qc.
References entity(), vector, velocity, and vlen().
Referenced by movelib_move().
| void movelib_groundalign4point | ( | entity | this, |
| float | spring_length, | ||
| float | spring_up, | ||
| float | blendrate, | ||
| float | _max ) |
Pitches and rolls the entity to match the gound.
Yed need to set v_up and v_forward (generally by calling makevectors) before calling this.
Definition at line 186 of file movelib.qc.
References absmax, absmin, angles, entity(), maxs, MOVE_NORMAL, origin, trace_endpos, trace_fraction, v_forward, v_right, v_up, and vector.
Referenced by spiderbot_frame(), and walker_draw().
| vector movelib_inertmove_byspeed | ( | entity | this, |
| vector | vel_new, | ||
| float | vel_max, | ||
| float | newmin, | ||
| float | oldmax ) |
Do a inertia simulation based on velocity.
Basicaly, this allows you to simulate loss of steering with higher speed. this.velocity = movelib_inertmove_byspeed(this.velocity,newvel,1000,0.1,0.9);
Definition at line 42 of file movelib.qc.
| void movelib_move | ( | entity | this, |
| vector | force, | ||
| float | max_velocity, | ||
| float | drag, | ||
| float | theMass, | ||
| float | breakforce ) |
Definition at line 58 of file movelib.qc.
References autocvar_sv_gravity, entity(), IS_ONGROUND, movelib_dragvec(), movelib_lastupdate, normalize(), time, vector, velocity, vlen(), and waterlevel.
| float movelib_lastupdate |
Definition at line 27 of file movelib.qh.
Referenced by movelib_move().
| vector moveto |
Definition at line 4 of file movelib.qh.