X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmovelib.qc;h=8a6235127cbcd5d721a9020d3609219b62979974;hb=85d7b75eec365a4da388894e6ef783d81e5ec688;hp=dd3f43f9fe6549ce4dbe1ed8344603746e192c8c;hpb=0e7ed909bffb4ff21f0c68d163edfc17487e380a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/movelib.qc b/qcsrc/server/movelib.qc index dd3f43f9f..8a6235127 100644 --- a/qcsrc/server/movelib.qc +++ b/qcsrc/server/movelib.qc @@ -1,3 +1,4 @@ +#ifdef SVQC .vector moveto; /** @@ -89,10 +90,10 @@ void movelib_move(vector force,float max_velocity,float drag,float theMass,float if (self.waterlevel > 1) { self.velocity = self.velocity + force * (acceleration * deltatime); - self.velocity = self.velocity + '0 0 0.05' * sv_gravity * deltatime; + self.velocity = self.velocity + '0 0 0.05' * autocvar_sv_gravity * deltatime; } else - self.velocity = self.velocity + '0 0 -1' * sv_gravity * deltatime; + self.velocity = self.velocity + '0 0 -1' * autocvar_sv_gravity * deltatime; mspeed = vlen(self.velocity); @@ -137,7 +138,7 @@ void movelib_update(vector dir,float force) old_speed = vlen(self.velocity); old_dir = normalize(self.velocity); - //ggravity = (sv_gravity / self.mass) * '0 0 100'; + //ggravity = (autocvar_sv_gravity / self.mass) * '0 0 100'; acceleration = (force / self.mass) * dir; //acceleration -= old_dir * (old_speed / self.mass); acceleration -= ggravity; @@ -161,10 +162,14 @@ void movelib_update(vector dir,float force) } */ +/* void movelib_move_simple(vector newdir,float velo,float blendrate) { self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo; } +*/ +#define movelib_move_simple(newdir,velo,blendrate) \ + self.velocity = self.velocity * (1 - blendrate) + (newdir * blendrate) * velo void movelib_beak_simple(float force) { @@ -183,6 +188,8 @@ void movelib_beak_simple(float force) 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. **/ +#endif + void movelib_groundalign4point(float spring_length, float spring_up, float blendrate) { vector a, b, c, d, e, r, push_angle, ahead, side;