Graphics Reference
In-Depth Information
if ( focusPlayerScript.GetCurrentLap() >
tempRC.GetCurrentLap() )
isAhead = true;
// is the focussed player on the same lap, but at a higher
// waypoint number?
if ( focusPlayerScript.GetCurrentLap() ==
tempRC.GetCurrentLap() &&
focusPlayerScript.GetCurrentWaypointNum() > tempRC.
GetCurrentWaypointNum() && !tempRC.IsLapDone() )
isAhead = true;
// is the focussed player on the same lap, same waypoint,
// but closer to it?
if ( focusPlayerScript.GetCurrentLap() ==
tempRC.GetCurrentLap() &&
focusPlayerScript.GetCurrentWaypointNum() ==
tempRC.GetCurrentWaypointNum() && focusPlayerScript.
GetCurrentWaypointDist() < tempRC.GetCurrentWaypointDist()
&& !tempRC.IsLapDone() )
isAhead = true;
// has the player completed a lap and is getting ready to
// move onto the next one?
if ( focusPlayerScript.GetCurrentLap() ==
tempRC.GetCurrentLap() &&
focusPlayerScript.GetCurrentWaypointNum() ==
tempRC.GetCurrentWaypointNum() && ( focusPlayerScript.IsLapDone() ==
true && tempRC.IsLapDone() == false ) )
isAhead = true;
if ( focusPlayerScript.GetCurrentLap() ==
tempRC.GetCurrentLap() && ( focusPlayerScript.IsLapDone() ==
true && !tempRC.IsLapDone() ) )
isAhead = true;
if ( isAhead )
{
myPos--;
}
}
}
return myPos;
}
public void StartRace()
{
raceRunning=true;
UpdateRacersRaceState();
}
public void StopRace()
{
raceRunning=false;
UpdateRacersRaceState();
Search WWH ::




Custom Search