From: divverent Date: Sun, 2 May 2010 14:05:43 +0000 (+0000) Subject: Final checking and cleanup on my end. Imo this should be ready for testing. X-Git-Tag: xonotic-v0.1.0preview~230^2~343 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e8fa6f5aec617b5c1e13ad4de2ffa4a412f3a6e8;p=xonotic%2Fdarkplaces.git Final checking and cleanup on my end. Imo this should be ready for testing. I'm not very good with C and this is my first code for Darkplaces. Therefore my coding may not be that great, so if anyone with more experience could check and optimize this I would be grateful. Please message me on IRC for anything regarding this patch (Taoki). From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10134 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/view.c b/view.c index f542c7a5..90a62c6f 100644 --- a/view.c +++ b/view.c @@ -536,11 +536,6 @@ void V_CalcRefdef (void) float ef_speed = cl.realframetime * cl_leanmodel_up_speed.value; // gun model leaning code - - // TODO 1 (done): Fix bug where model does a 360* turn when YAW jumps around the 0 - 360 rotation border - // TODO 2 (done): Implement limits (weapon model must not lean past a certain limit) - // TODO 3 (done): Cvar everything once the first TODOs are ready - if(cl_leanmodel_up.value && cl_leanmodel_up_speed.value * ef_speed < 1) // bad things happen if this goes over 1, so prevent the effect { // prevent the gun from doing a 360* rotation when going around the 0 <-> 360 border @@ -596,7 +591,7 @@ void V_CalcRefdef (void) VectorSet(gunangles, viewmodel_push_x, viewmodel_push_y, viewangles[2]); // gun model following code - + // TODO: make the weapon model not shake when looking around horizontally (due to X axis vs. Y axis) if(cl_followmodel_side.value && cl_followmodel_side_speed.value * ef_speed < 1) // bad things happen if this goes over 1, so prevent the effect { if(gunorg_follow[0] < vieworg[0]) @@ -658,7 +653,6 @@ void V_CalcRefdef (void) VectorCopy(gunorg_follow, gunorg); // gun model bobbing code - double xyspeed, bob; xyspeed = sqrt(cl.movement_velocity[0]*cl.movement_velocity[0] + cl.movement_velocity[1]*cl.movement_velocity[1]);