From: Mircea Kitsune Date: Tue, 22 May 2012 11:13:12 +0000 (+0300) Subject: Make the train turn in the direction it's facing (still turning stays broken). Note... X-Git-Tag: xonotic-v0.8.0~295^2~46 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=59b35a449164dffe4792f254f519d27298af4bf4;p=xonotic%2Fxonotic-data.pk3dir.git Make the train turn in the direction it's facing (still turning stays broken). Note that this is done by setting self.angles each tick, whereas self.avelocity would be smoother, but I can't figure the maths for that --- diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index a4c5bc072..9547be60f 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -206,6 +206,7 @@ void SUB_CalcMove_controller_think (void) veloc = veloc * (1 / sys_frametime); // so it arrives for the next frame } self.owner.velocity = veloc; + self.owner.angles = vectoangles(delta + 2 * delta2 * phasepos); self.nextthink = nexttick; } else { // derivative: delta + 2 * delta2 (e.g. for angle positioning)