findmaprotation fix

master
Lee Salzman 2013-04-30 21:43:34 +03:00
parent ac8f782b2a
commit 53dc27c77b
1 changed files with 2 additions and 2 deletions

View File

@ -472,14 +472,14 @@ namespace server
int findmaprotation(int mode, const char *map)
{
for(int i = curmaprotation; i < maprotations.length(); i++)
for(int i = max(curmaprotation, 0); i < maprotations.length(); i++)
{
maprotation &rot = maprotations[i];
if(!rot.modes) break;
if(rot.match(mode, map)) return i;
}
int start;
for(start = curmaprotation - 1; start >= 0; start--) if(!maprotations[start].modes) break;
for(start = max(curmaprotation, 0) - 1; start >= 0; start--) if(!maprotations[start].modes) break;
start++;
for(int i = start; i < curmaprotation; i++)
{