From: <pat...@us...> - 2015-05-09 15:29:20
|
Revision: 389 http://sourceforge.net/p/simspark/svn/389 Author: patmac369 Date: 2015-05-09 15:29:18 +0000 (Sat, 09 May 2015) Log Message: ----------- Making penalty shootout kickoffs direct. 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-04-23 01:45:03 UTC (rev 388) +++ trunk/rcssserver3d/plugin/soccer/soccerruleaspect/soccerruleaspect.cpp 2015-05-09 15:29:18 UTC (rev 389) @@ -1440,14 +1440,19 @@ return false; } - /* don't allow goals directly from kickoff + /* don't allow goals directly from kickoff (penalty shot kickoffs are + * direct) * * todo it is allowed in FIFA rules, so we should get rid of it e.g. by * adding noise to the beam effector so that kickoff kicks cannot be * precisely planned */ boost::shared_ptr<AgentAspect> agent; - if (WasLastKickFromKickOff(agent)) + boost::shared_ptr<GameControlServer> game_control; + if (WasLastKickFromKickOff(agent) + && (SoccerBase::GetGameControlServer(*this, game_control) + && game_control->GetAgentCount() > 2) // todo: remove this when there is a "penalty" playmode + && !mPenaltyShootout) { PunishKickOffFoul(agent); // Return true so that we know the ball is in the goal and don't check This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |