Hi all,
IIUC every map change is a 'fresh beginning', the engine re-loads ALL variables and functions from the dat, including built-ins, and 'entry point' functions. I have a situation where 'it appears' that a function behaves differently, depending on whether the server has just had a map change, or has just been restarted. This AFAIK, should be impossible, so I'd appreciate some feedback as to what might be going on. Here's the details:
I defined SV_RunClientCommand in the progs, which IIUC simply tells the engine to use it, instead of it's internal SV_RunClientCommand.
Code: Select all
//at the bottom of client.qc
void() SV_RunClientCommand =
{
// This is where code that overrides player movement would go, removed for diagnostic purposes
runstandardplayerphysics(self); // IIUC this means that all movement code is sent back to the engine, unmodified.
};
Here's the actions I took, and the 'results'.
1: Write the 'substitute' SV_RunClientCommand (as above), compile, run the (fte) server, then run the (fte) client, and connect to 'local host'.
RESULT: This produces the 'fall through the floor/map' bug as described above.
2. Rename 'SV_RunClientCommand' to 'SV_RunClientCommand2', compile, and in the (still running) server, change map
RESULT: The player DOESN'T fall through the floor (ie as would be expected), because we are using the engines internal SV_RunClientCommand, because ours no longer exists (ie the renamed SV_RunClientCommand2, as above). Bug aside, this makes sense, however:
3. Rename 'SV_RunClientCommand2' back to 'SV_RunClientCommand', compile and in the (still running ) server, change map.
RESULT: Now .. for some reason... everything (appears to) work perfectly! The server *is* using the SV_RunClientCommand in the progs ( I put some dprints into it to confirm), but players are NOT falling through the floor.. the bug is gone(!?).. however:
4. Close server exe, restart it, reconnect to localhost w client.
RESULT: .. bug re-appears! .. we're back to the player falling through the floor, again!!?!
I repeated the above steps many times (because it doesnt make sense, and in case I had made a mistake) , but got the same results.
Can anyone offer any ideas as to what might be going on?
OneManClan