Fix a GP starting order bug I noticed when time was involved.
Did a GP where points didn't matter (only time) and noticed the sorting didn't work correctly at the start of a race. Expanded the operator< to account for time when points are equal. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11016 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
cb2cd9505b
commit
36cd82b0eb
@ -274,7 +274,9 @@ private:
|
||||
|
||||
friend bool operator< (const KartStatus& left, const KartStatus& right)
|
||||
{
|
||||
return (left.m_score < right.m_score);
|
||||
return (left.m_score < right.m_score) ||
|
||||
(left.m_score == right.m_score &&
|
||||
left.m_overall_time > right.m_overall_time);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user