+
+ // gun model leaning code
+
+ // TODO 1: Fix bug where model does a 360* turn when YAW jumps around the 0 - 360 rotation border.
+ // [18:53:17] <@div0> search for AnglesFromVectors and AngleVectors
+ // [18:53:27] <@div0> I am quite sure interpolation (lerp) uses it
+
+ // TODO 2: Implement limits (weapon model must not lean past a certain limit)
+
+ // TODO 3: Cvar everything once the first TODOs are ready.
+
+ if(viewmodel_push_x < cl.viewangles[PITCH])
+ viewmodel_push_x += (cl.viewangles[PITCH] - viewmodel_push_x) * 0.01;
+ else if(viewmodel_push_x > cl.viewangles[PITCH])
+ viewmodel_push_x -= (viewmodel_push_x - cl.viewangles[PITCH]) * 0.01;
+
+ if(viewmodel_push_y < cl.viewangles[YAW])
+ viewmodel_push_y += (cl.viewangles[YAW] - viewmodel_push_y) * 0.01;
+ else if(viewmodel_push_y > cl.viewangles[YAW])
+ viewmodel_push_y -= (viewmodel_push_y - cl.viewangles[YAW]) * 0.01;
+
+ VectorSet(gunangles, viewmodel_push_x, viewmodel_push_y, viewangles[2]);