1

Topic: Map rotation problem

Hi,

I think I found a bug in the 0.3.4 version of the teewars server.

My server.cfg has the following lines:
sv_maprotation=pro_dm1 groundhive mvtwdm02 dm1 jdm1a max1 deep
sv_map=dm1

The server will rotate the maps as follow:
dm1 -> groundhive -> mvtwdm02 -> dm1 -> groundhive -> mvtwdm02 -> ...

This is due to a bug in the file "src/game/server/gs_game.cpp".
To find the next map, the server is trying to find the current map in the
sv_maprotation variable and will take the next one. In my case, it will
search for "dm1" and will find the "dm1" in the "pro_dm1" mapname sad

The search in question is at line 76:
const char *s = strstr(config.sv_maprotation, config.sv_map);

One solution could be to insert a separator before the first map and search
for "<separator>mapname". Or to use STL vectors to store the maps and
search for the mapname.

2

Re: Map rotation problem

Correct.
http://ix.teewars.com/trac/ticket/309