Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
movelib.qh
Go to the documentation of this file.
1#pragma once
2
3#ifdef SVQC
4.vector moveto;
5
10vector movelib_dragvec(entity this, float drag, float exp_);
11
16float movelib_dragflt(float fspeed,float drag,float exp_);
17
23vector movelib_inertmove_byspeed(entity this, vector vel_new, float vel_max, float newmin, float oldmax);
24
25vector movelib_inertmove(entity this, vector new_vel, float new_bias);
26
28void movelib_move(entity this, vector force, float max_velocity, float drag, float theMass, float breakforce);
29
30/*
31void movelib_move_simple(vector newdir,float velo,float blendrate)
32{
33 this.velocity = this.velocity * (1 - blendrate) + (newdir * blendrate) * velo;
34}
35*/
36#define movelib_move_simple(e,newdir,velo,blendrate) \
37 e.velocity = e.velocity * (1 - blendrate) + (newdir * blendrate) * velo
38
39#define movelib_move_simple_gravity(e,newdir,velo,blendrate) \
40 if(IS_ONGROUND(e)) movelib_move_simple(e,newdir,velo,blendrate)
41
42void movelib_brake_simple(entity this, float force);
43
48#endif
49
50void movelib_groundalign4point(entity this, float spring_length, float spring_up, float blendrate, float _max);
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
vector movelib_dragvec(entity this, float drag, float exp_)
Simulate drag this.velocity = movelib_dragvec(this.velocity,0.02,0.5);.
Definition movelib.qc:10
float movelib_lastupdate
Definition movelib.qh:27
void movelib_groundalign4point(entity this, float spring_length, float spring_up, float blendrate, float _max)
Pitches and rolls the entity to match the gound.
Definition movelib.qc:186
void movelib_brake_simple(entity this, float force)
Definition movelib.qc:167
float movelib_dragflt(float fspeed, float drag, float exp_)
Simulate drag this.velocity *= movelib_dragflt(somespeed,0.01,0.7);.
Definition movelib.qc:26
vector movelib_inertmove_byspeed(entity this, vector vel_new, float vel_max, float newmin, float oldmax)
Do a inertia simulation based on velocity.
Definition movelib.qc:42
void movelib_move(entity this, vector force, float max_velocity, float drag, float theMass, float breakforce)
Definition movelib.qc:58
vector movelib_inertmove(entity this, vector new_vel, float new_bias)
Definition movelib.qc:53
vector
Definition self.qh:92
vector moveto
Definition zombie.qc:17