X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=sv_user.c;h=6d9a39d103bea67b4dbb088581d4827044d8db63;hb=34d9f62cf707eb7d02f463cb919799291e114698;hp=26686d44f7d99f3d9ab969e78bef3fc979b83345;hpb=6be8ab8711e2862b29cbd5f27a9ace1e2d4510b9;p=xonotic%2Fdarkplaces.git diff --git a/sv_user.c b/sv_user.c index 26686d44..6d9a39d1 100644 --- a/sv_user.c +++ b/sv_user.c @@ -58,7 +58,7 @@ void SV_SetIdealPitch (void) bottom[1] = top[1]; bottom[2] = top[2] - 160; - tr = SV_Move (top, vec3_origin, vec3_origin, bottom, MOVE_NOMONSTERS, host_client->edict, SUPERCONTENTS_SOLID); + tr = SV_TraceLine(top, bottom, MOVE_NOMONSTERS, host_client->edict, SUPERCONTENTS_SOLID); // if looking at a wall, leave ideal the way is was if (tr.startsolid) return; @@ -124,7 +124,7 @@ void SV_UserFriction (void) start[2] = host_client->edict->fields.server->origin[2] + host_client->edict->fields.server->mins[2]; stop[2] = start[2] - 34; - trace = SV_Move (start, vec3_origin, vec3_origin, stop, MOVE_NOMONSTERS, host_client->edict, SV_GenericHitSuperContentsMask(host_client->edict)); + trace = SV_TraceLine(start, stop, MOVE_NOMONSTERS, host_client->edict, SV_GenericHitSuperContentsMask(host_client->edict)); if (trace.fraction == 1.0) friction = sv_friction.value*sv_edgefriction.value; @@ -165,6 +165,7 @@ void SV_Accelerate (void) host_client->edict->fields.server->velocity[i] += accelspeed*wishdir[i]; } +extern cvar_t sv_gameplayfix_q2airaccelerate; void SV_AirAccelerate (vec3_t wishveloc) { int i; @@ -177,7 +178,7 @@ void SV_AirAccelerate (vec3_t wishveloc) addspeed = wishspd - currentspeed; if (addspeed <= 0) return; - accelspeed = (sv_airaccelerate.value < 0 ? sv_accelerate.value : sv_airaccelerate.value)*wishspeed * sv.frametime; + accelspeed = (sv_airaccelerate.value < 0 ? sv_accelerate.value : sv_airaccelerate.value)*(sv_gameplayfix_q2airaccelerate.integer ? wishspd : wishspeed) * sv.frametime; if (accelspeed > addspeed) accelspeed = addspeed; @@ -392,7 +393,7 @@ void SV_ClientThink (void) if (host_client->edict->fields.server->movetype == MOVETYPE_NONE) return; - onground = (int)host_client->edict->fields.server->flags & FL_ONGROUND; + onground = ((int)host_client->edict->fields.server->flags & FL_ONGROUND) != 0; DropPunchAngle (); @@ -590,8 +591,7 @@ void SV_ExecuteClientMoves(void) // discard (treat like lost) moves with too low distance from // the previous one to prevent hacks using float inaccuracy // clients will see this as packet loss in the netgraph - if(sv_clmovement_maxnetfps.value > 0) - if(moveframetime + 0.0001 < 1 / sv_clmovement_maxnetfps.value) + if(moveframetime < 0.0005) continue; //Con_Printf("movesequence = %i (%i lost), moveframetime = %f\n", move->sequence, move->sequence ? move->sequence - host_client->movesequence - 1 : 0, moveframetime);