Raptor007 / aq2-tng

Action Quake 2: The Next Generation. Raptor007's sandbox for testing changes. When verified stable, this code is pushed to the official aq2-tng repo:
https://github.com/aq2-tng/aq2-tng/tree/bots
4 stars 2 forks source link

Votemap breaks if the winning map isn't actually found #84

Open Raptor007 opened 4 years ago

Raptor007 commented 4 years ago

If you put a map into action.ini that doesn't exist, and it gets voted for, any player who voted for that map is no longer able to vote.

When loading the maplist, it should probably filter out any maps that don't actually exist.

Raptor007 commented 4 years ago

I won't be able to determine if map files exist in advance because some maps may be in pak files, like the q2dmX maps. It should be allowed to have those maps in your rotation.

AQ2 ExitLevel (g_main.c) uses ServerCommand gamemap to change to level.changemap. It would be a good idea to detect if the level should have changed but didn't, and perform some cleanup such as properly clearing client votes. Maybe it shouldn't clear level.changemap in ExitLevel, and instead check/clear it in SpawnEntities (g_spawn.c) or G_RunFrame (g_main.c)?