]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
ode: Add more #ifdefs to ensure ODE is fully disabled without -DUSEODE
[xonotic/darkplaces.git] / sv_user.c
index 9395be62acf37d7fea8d4e6a0fe97010530e55e3..ff1bdbc3b6ab0f8d742e3ffb321266b4a867759b 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -718,7 +718,7 @@ static void SV_ReadClientMove (void)
                }
                // as requested by FrikaC, cursor_trace_ent is reset to world if the
                // entity is free at time of receipt
-               if (PRVM_EDICT_NUM(move->cursor_entitynumber)->priv.server->free)
+               if (PRVM_EDICT_NUM(move->cursor_entitynumber)->free)
                        move->cursor_entitynumber = 0;
                if (sv_message.badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__);
        }
@@ -811,7 +811,8 @@ static void SV_ExecuteClientMoves(void)
                                move->time = bound(sv.time - 1, move->time, sv.time); // prevent slowhack/speedhack combos
                                move->time = max(move->time, host_client->cmd.time); // prevent backstepping of time
                                // bones_was_here: limit moveframetime to a multiple of sv.frametime to match inputtimeout behaviour
-                               moveframetime = min(move->time - host_client->cmd.time, min(0.1, sys_ticrate.value > 0.0 ? sv.frametime * ceil(sv_clmovement_inputtimeout.value / sv.frametime) : sv_clmovement_inputtimeout.value));
+                               moveframetime = min(move->time - host_client->cmd.time, min(0.1, sys_ticrate.value > 0.0 && sv.frametime > 0.0 ? sv.frametime * ceil(sv_clmovement_inputtimeout.value / sv.frametime) : sv_clmovement_inputtimeout.value));
+
 
                                // discard (treat like lost) moves with too low distance from
                                // the previous one to prevent hacks using float inaccuracy