findmaprotation fix
parent
ac8f782b2a
commit
53dc27c77b
|
@ -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++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue