Closed darkshade9 closed 2 years ago
It sounds like you're doing it correctly. You also need to create links between nodes, but this shouldn't effect whether or not it writes the file.
If it's on a Linux system, make sure the user running q2proded has write and execute permission on the terrain directory, and has the current working directory the same place as its executable.
Let me know if 0e063ac solves the problem. I would prefer to set a default value rather than always ignore the variable.
This should also fix map locations and IP banlists on servers without +set game action
.
If for some reason this does not fix it (maybe Q2 overrides that default) another idea would be:
const char *game_str = game_dir->string;
if( ! game_str[0] ) // Assuming it's empty by default.
game_str = "action";
... and then replace game_dir->string
with game_str
in the rest of the function.
I think https://github.com/Raptor007/aq2-tng/commit/0e063ac73328f4c4e275970a23efe46d51e47d17 will work just fine. I also added one other instance where the game_dir is blank unless set
Thanks, good catch!
For later cleanup: It looks like "game" is used in enough places that it should probably be treated like most other cvars: declared once in g_main.c, gi.cvar called once in g_save.c, and extern in g_local.h to provide all other access to it.
Turning botdebug on and creating nodes, I issue the
sv savenodes
command and it claims to save the node table, but the ltk file never appears to get written toterrain
. Is it possible I'm missing a step? Using the latest commit from thebots
branch.