NBlood icon indicating copy to clipboard operation
NBlood copied to clipboard

BLOOD: save host, join, and multiplayer settings on use. Load on start.

Open zZeck opened this issue 3 years ago • 4 comments

Makes it much more convenient when the game saves last used settings. That way don't have to keep entering friend's IP address, and preferred game settings. The save load code is similar in style to what is used in loadsave.cpp for saving games.

A step toward loading config of choice from file potentially.

zZeck avatar Jan 30 '22 07:01 zZeck

Is it possible for this to use the OSD system for saving/loading instead of managing the cfg files manually within menu.cpp?

carnivoroussociety avatar Feb 20 '22 15:02 carnivoroussociety

Is it possible for this to use the OSD system for saving/loading instead of managing the cfg files manually within menu.cpp?

What do you have in mind? I have not looked at the OSD code much.

zZeck avatar Feb 20 '22 19:02 zZeck

So both zNetAddressBuffer/zNetPortBuffer are stored as a CVAR, which are automatically save/load handled within nblood_cvars.cfg

Something like this { "net_address","sets network address used for multiplayer menu", (void *)zNetAddressBuffer, CVAR_STRING|CVAR_FUNCPTR, 0, 16 }, Which works without needing to manually manage cfg files. I've done something like this for my own fork https://github.com/carnivoroussociety/NotBlood/commit/1cf33a8741d6b4c435475872766aeebd86334c61.

carnivoroussociety avatar Feb 20 '22 22:02 carnivoroussociety

Saving host/port feature has now been merged with OSD functionality.

carnivoroussociety avatar Mar 19 '22 12:03 carnivoroussociety