From: <pat...@us...> - 2015-05-09 20:31:25
|
Revision: 390 http://sourceforge.net/p/simspark/svn/390 Author: patmac369 Date: 2015-05-09 20:31:23 +0000 (Sat, 09 May 2015) Log Message: ----------- Fixing a bug with free kicks where as soon as the ball was touched, and the playmode transitioned from free kick to play on, the ball was still moved back to the location of the free kick preventing the ball from being directly kicked out of a free kick. Also ensuring that the ball position for free kicks is updated correctly as this wasn't happening right after the ball was placed back at the center of the field after a goal was scored. Modified Paths: -------------- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp Modified: trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp =================================================================== --- trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2015-05-09 15:29:18 UTC (rev 389) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2015-05-09 20:31:23 UTC (rev 390) @@ -93,6 +93,9 @@ mBallBody->SetVelocity(Vector3f(0,0,0)); mBallBody->SetAngularVelocity(Vector3f(0,0,0)); mBallBody->Enable(); + // Set the free kick position to where we have moved the ball so as to not + // accidentally use an old ball position for the next free kick. + mFreeKickPos = Vector3f(pos.x(), pos.y(), mBallRadius); } /* Uses only Ball and Players positions and detects overcrowind near ball and areas and @@ -1141,7 +1144,6 @@ mRightPenaltyArea.minVec[1] : mRightPenaltyArea.maxVec[1]; } - MoveBall(mFreeKickPos); //-------------------------- // move away opponent team This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |