heerhaan / SimTECH

Web application to simulate motorsport series in by the magic of 🪄RNG🪄
GNU General Public License v3.0
4 stars 0 forks source link

Implement team orders based on main/support #47

Open heerhaan opened 7 months ago

heerhaan commented 7 months ago

Support drivers should move out of the way for main drivers. Currently being a main driver only results in a slight car benefit, opposite of course for supporting drivers.

See method HandlePositionGain in the race component:

Old code was this, there was a problem with this though. Gods know what it was though. // Driver above is teammate AND support driver AND attacker is main driver, swap time! //if (defendingDriver.SeasonTeamId == driver.SeasonTeamId // && driver.Role == TeamRole.Main // && defendingDriver.Role == TeamRole.Support) //{ // lastScore.RacerEvents |= RacerEvent.Swap; // defendingDriver.LapScores.Last().RacerEvents |= RacerEvent.Swap; //} //else

heerhaan commented 2 weeks ago

Well, it exists. Does it also work though?