chimera
chimera copied to clipboard
gametype variable is not refreshing correctly on map load
I think this may just be a timing issue.
Basically, I wrote a quick and dirty lua script
function onMapLoad()
console_out(gametype);
console_out(server_type);
console_out(map);
end
onMapLoad();
set_callback("map load", "onMapLoad")
I then joined a race server, and checked the console.
The server_type
, and map
values are correct, however the gametype
value is "nil".
I then leave a game, and the mapload
callback fires again, and my gametype
is now "race".
I though maybe it might just be that map load
is triggering too early, though when I moved from map load
to tick
, it was still showing nil, so this likely means that either the signature is incorrect, or it is being fetched before the value changes.
Apologies I'm not experienced in C++, so I may not be too much help with debugging or digging into what the issue may be.