Description
Changing game in the console should switch Quetoo to a different game folder on the next map. For example, game banana should switch to the banana folder.
That switch has two parts:
- The server should load
game.dll from the new folder.
- The client should load
cgame.dll from the new folder.
Right now one or both parts can fail. The server may still load the old game.dll, and the client may still keep the old cgame.dll.
This can leave the game in a mixed state: server logic comes from one game folder, but the client HUD, UI, and prediction come from another.
Steps to Reproduce
- For testing, copy
lib/default and rename the copy to lib/banana.
- Launch Quetoo with the default game module.
- Open the console and type:
game banana.
- Load a map:
map warehouse.
- Check the console output for which
game.dll was loaded.
- Check whether the log loads
game.dll and cgame.dll from lib/banana.
Expected Behavior
After changing game and loading a map:
- The server should switch to the new game folder before it loads
game.dll.
- The server should load
lib/banana/game.dll.
- The client should see that the server is using
banana.
- The client should reload cgame and load
lib/banana/cgame.dll.
Actual Behavior
The server may load the old game module, lib/default/game.dll, because the new game folder is added too late.
The client may also keep the old cgame module, lib/default/cgame.dll. Console only shows cgame.dll loading once at startup from lib/default; after switching to banana, there is no later lib/banana/cgame.dll load line.
Environment
- OS: Windows 11
- Quetoo version: 9966
- Build type: Release
Logs / Output
HTTP server listening on port 1998
Parsed 24 maps from maps.lst
...
Game initialization...
Loading C:\best_game_ever\quetoo\lib/default/game.dll...
Version: x86_64-pc-windows 9966
Game module initialized
...
Client game initialization...
Loading C:\best_game_ever\quetoo\lib/default/cgame.dll...
Version: 9966 x86_64-pc-windows
Client game initialized
Quetoo 9966 initialized
...
map warehouse
Server initialization...
Game initialization...
Loading C:\best_game_ever\quetoo\lib/default/game.dll...
Version: x86_64-pc-windows 9966
Game module initialized
Game initialized, starting...
Loaded map warehouse, 99 entities.
Server initialized
...
game
game "default" (server, latched)
The game module name
game banana
game will be changed for next game.
map warehouse
Disconnecting from localhost...
Server initialization...
Game initialization...
Loading C:\best_game_ever\quetoo\lib/default/game.dll...
Version: x86_64-pc-windows 9966
Game module initialized
Game initialized, starting...
Loaded map warehouse, 99 entities.
Server initialized
Adding path C:\best_game_ever\quetoo\lib/banana..
Adding path C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/banana..
Using C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/banana for writing.
...
map edge
Server initialization...
Loaded map edge, 82 entities.
Server initialized
...
game
game "banana" ["default"] (server, latched)
The game module name
...
game default
game will be changed for next game.
map warehouse
Disconnecting from localhost...
Server initialization...
Game initialization...
Loading C:\best_game_ever\quetoo\lib/banana/game.dll...
Version: x86_64-pc-windows 9966
Game module initialized
Game initialized, starting...
Loaded map warehouse, 99 entities.
Server initialized
Adding path C:\best_game_ever\quetoo\lib/default..
Adding path C:\best_game_ever\quetoo\share/default..
Adding path C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/default..
Using C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/default for writing.
...
game banana
game will be changed for next game.
map warehouse
Disconnecting from localhost...
Server initialization...
Game initialization...
Loading C:\best_game_ever\quetoo\lib/default/game.dll...
Version: x86_64-pc-windows 9966
Game module initialized
Game initialized, starting...
Loaded map warehouse, 99 entities.
Server initialized
Adding path C:\best_game_ever\quetoo\lib/banana..
Adding path C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/banana..
Using C:\Users\potato\AppData\Roaming\WickedOldGames\Quetoo/banana for writing.
...
Description
Changing
gamein the console should switch Quetoo to a different game folder on the next map. For example,game bananashould switch to thebananafolder.That switch has two parts:
game.dllfrom the new folder.cgame.dllfrom the new folder.Right now one or both parts can fail. The server may still load the old
game.dll, and the client may still keep the oldcgame.dll.This can leave the game in a mixed state: server logic comes from one game folder, but the client HUD, UI, and prediction come from another.
Steps to Reproduce
lib/defaultand rename the copy tolib/banana.game banana.map warehouse.game.dllwas loaded.game.dllandcgame.dllfromlib/banana.Expected Behavior
After changing
gameand loading a map:game.dll.lib/banana/game.dll.banana.lib/banana/cgame.dll.Actual Behavior
The server may load the old game module,
lib/default/game.dll, because the new game folder is added too late.The client may also keep the old cgame module,
lib/default/cgame.dll. Console only showscgame.dllloading once at startup fromlib/default; after switching tobanana, there is no laterlib/banana/cgame.dllload line.Environment
Logs / Output