X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=sv_user.c;h=e17108cbbceaa7e7ba6da06b5c2ffcade1e242d1;hb=e47d52795a830dd0bee4f3c2dd83b4540128f0d8;hp=15b521d5740759283ee938395344f0ed44d1f5d2;hpb=a57baa2e50392b2f2d30623101af36deb0486a19;p=xonotic%2Fdarkplaces.git diff --git a/sv_user.c b/sv_user.c index 15b521d5..e17108cb 100644 --- a/sv_user.c +++ b/sv_user.c @@ -59,7 +59,7 @@ void SV_SetIdealPitch (void) bottom[1] = top[1]; bottom[2] = top[2] - 160; - tr = SV_TraceLine(top, bottom, MOVE_NOMONSTERS, host_client->edict, SUPERCONTENTS_SOLID, collision_extendmovelength.value); + tr = SV_TraceLine(top, bottom, MOVE_NOMONSTERS, host_client->edict, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value); // if looking at a wall, leave ideal the way is was if (tr.startsolid) return; @@ -126,7 +126,7 @@ static void SV_UserFriction (void) start[2] = PRVM_serveredictvector(host_client->edict, origin)[2] + PRVM_serveredictvector(host_client->edict, mins)[2]; stop[2] = start[2] - 34; - trace = SV_TraceLine(start, stop, MOVE_NOMONSTERS, host_client->edict, SV_GenericHitSuperContentsMask(host_client->edict), collision_extendmovelength.value); + trace = SV_TraceLine(start, stop, MOVE_NOMONSTERS, host_client->edict, SV_GenericHitSuperContentsMask(host_client->edict), 0, 0, collision_extendmovelength.value); if (trace.fraction == 1.0) friction = sv_friction.value*sv_edgefriction.value; @@ -233,7 +233,7 @@ static void SV_WaterMove (void) prvm_prog_t *prog = SVVM_prog; int i; vec3_t wishvel, v_angle; - vec_t speed, newspeed, wishspeed, addspeed, accelspeed, temp; + vec_t speed, newspeed, fwishspeed, addspeed, accelspeed, temp; // user intentions VectorCopy(PRVM_serveredictvector(host_client->edict, v_angle), v_angle); @@ -247,14 +247,14 @@ static void SV_WaterMove (void) else wishvel[2] += cmd.upmove; - wishspeed = VectorLength(wishvel); - if (wishspeed > sv_maxspeed.value) + fwishspeed = VectorLength(wishvel); + if (fwishspeed > sv_maxspeed.value) { - temp = sv_maxspeed.value/wishspeed; + temp = sv_maxspeed.value/fwishspeed; VectorScale (wishvel, temp, wishvel); - wishspeed = sv_maxspeed.value; + fwishspeed = sv_maxspeed.value; } - wishspeed *= 0.7; + fwishspeed *= 0.7; // water friction speed = VectorLength(PRVM_serveredictvector(host_client->edict, velocity)); @@ -270,15 +270,15 @@ static void SV_WaterMove (void) newspeed = 0; // water acceleration - if (!wishspeed) + if (!fwishspeed) return; - addspeed = wishspeed - newspeed; + addspeed = fwishspeed - newspeed; if (addspeed <= 0) return; VectorNormalize (wishvel); - accelspeed = (sv_wateraccelerate.value < 0 ? sv_accelerate.value : sv_wateraccelerate.value) * wishspeed * sv.frametime; + accelspeed = (sv_wateraccelerate.value < 0 ? sv_accelerate.value : sv_wateraccelerate.value) * fwishspeed * sv.frametime; if (accelspeed > addspeed) accelspeed = addspeed; @@ -800,7 +800,7 @@ SV_ReadClientMessage void SV_ReadClientMessage(void) { prvm_prog_t *prog = SVVM_prog; - int cmd, num, start; + int netcmd, num, start; char *s, *p, *q; if(sv_autodemo_perclient.integer >= 2) @@ -825,8 +825,8 @@ void SV_ReadClientMessage(void) return; } - cmd = MSG_ReadByte(&sv_message); - if (cmd == -1) + netcmd = MSG_ReadByte(&sv_message); + if (netcmd == -1) { // end of message // apply the moves that were read this frame @@ -834,10 +834,10 @@ void SV_ReadClientMessage(void) break; } - switch (cmd) + switch (netcmd) { default: - Con_Printf("SV_ReadClientMessage: unknown command char %i (at offset 0x%x)\n", cmd, sv_message.readcount); + Con_Printf("SV_ReadClientMessage: unknown command char %i (at offset 0x%x)\n", netcmd, sv_message.readcount); if (developer_networking.integer) Com_HexDumpToConsole(sv_message.data, sv_message.cursize); SV_DropClient (false);