From: <lpa...@us...> - 2012-04-15 13:38:12
|
Revision: 8210 http://planeshift.svn.sourceforge.net/planeshift/?rev=8210&view=rev Author: lpancallo Date: 2012-04-15 13:38:06 +0000 (Sun, 15 Apr 2012) Log Message: ----------- fixed jump movement Modified Paths: -------------- trunk/src/client/psmovement.cpp Modified: trunk/src/client/psmovement.cpp =================================================================== --- trunk/src/client/psmovement.cpp 2012-04-15 13:17:04 UTC (rev 8209) +++ trunk/src/client/psmovement.cpp 2012-04-15 13:38:06 UTC (rev 8210) @@ -34,7 +34,7 @@ #include "effects/pseffectmanager.h" -#define MOVE_DEBUG +//#define MOVE_DEBUG #define RUNTO_EPSILON 0.75f #define USE_EXPERIMENTAL_AUTOMOVE 0 @@ -555,10 +555,11 @@ * and to give the limited ability to turn or glide mid-flight. */ onGround = actor->Movement().IsOnGround(); + + // Apply mode's modifier + vel *= actormode->modifier; if (onGround) // Normal { - // Apply mode's modifier - vel *= actormode->modifier; #ifdef MOVE_DEBUG printf("On Ground: Applying velocity modifier (%.2f,%.2f,%.2f),(%.2f,%.2f,%.2f)\n", @@ -590,10 +591,9 @@ vel.rotate.x,vel.rotate.y,vel.rotate.z); #endif - // Talad : commented out to fix the jump stopping mid-air (forward inertia) // Add to existing velocity - //if (vel.move.y <= 0 && (vel.move.x != 0 || vel.move.z != 0)) - // actor->Movement().SetVelocity(csVector3(vel.move.x,0,vel.move.z)); + if (vel.move.y <= 0 && (vel.move.x != 0 || vel.move.z != 0)) + actor->Movement().SetVelocity(csVector3(vel.move.x,0,vel.move.z)); // Set rotation actor->Movement().SetAngularVelocity( vel.rotate ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |