]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
greatly improved pointfile command, it now shows a huge beam crosshair at the site...
[xonotic/darkplaces.git] / sv_user.c
index 06ef02ead23551ec2911446549cb3ca1189c06b2..152ec7849a9199a54748c4d2d22dec22eef75eb4 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -534,7 +534,7 @@ nextmsg:
                ret = NET_GetMessage (host_client->netconnection);
                if (ret == -1)
                {
-                       Sys_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n");
+                       Con_Printf ("SV_ReadClientMessage: NET_GetMessage failed\n");
                        return false;
                }
                if (!ret)
@@ -550,7 +550,7 @@ nextmsg:
 
                        if (msg_badread)
                        {
-                               Sys_Printf ("SV_ReadClientMessage: badread\n");
+                               Con_Printf ("SV_ReadClientMessage: badread\n");
                                return false;
                        }
 
@@ -571,7 +571,7 @@ nextmsg:
                                goto nextmsg;
 
                        default:
-                               Sys_Printf ("SV_ReadClientMessage: unknown command char %i\n", cmd);
+                               Con_Printf ("SV_ReadClientMessage: unknown command char %i\n", cmd);
                                return false;
 
                        case clc_nop:
@@ -602,7 +602,7 @@ nextmsg:
                                        Cmd_ExecuteString (s, src_client);
                                }
                                else
-                                       Con_DPrintf("%s tried to %s\n", host_client->name, s);
+                                       Con_Printf("%s tried to %s\n", host_client->name, s);
                                break;
 
                        case clc_disconnect:
@@ -642,8 +642,7 @@ void SV_RunClients (void)
 
                if (!SV_ReadClientMessage ())
                {
-                       // client misbehaved...
-                       SV_DropClient (false);
+                       SV_DropClient (false); // client misbehaved...
                        continue;
                }
 
@@ -665,6 +664,15 @@ void SV_RunClients (void)
                        }
                        else
                                SV_ClientThink ();
+
+                       SV_CheckVelocity (sv_player);
+
+                       // LordHavoc: a hack to ensure that the (rather silly) id1 quakec
+                       // player_run/player_stand1 does not horribly malfunction if the
+                       // velocity becomes a number that is both == 0 and != 0
+                       // (sounds to me like NaN but to be absolutely safe...)
+                       if (DotProduct(sv_player->v->velocity, sv_player->v->velocity) < 0.0001)
+                               VectorClear(sv_player->v->velocity);
                }
        }
 }