diff --git a/source/src/physics.cpp b/source/src/physics.cpp index 975a36c0..4976f19f 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -384,11 +384,11 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) d.x += (float)(pl->strafe*cosf(RAD*(pl->yaw-180))); d.y += (float)(pl->strafe*sinf(RAD*(pl->yaw-180))); - pl->vel.mul(fpsfric-1); // slowly apply friction and direction to velocity, gives a smooth movement - pl->vel.add(d); - pl->vel.div(fpsfric); + pl->vel.mul(fpsfric-1); // slowly apply friction and direction to velocity, gives a smooth movement + pl->vel.add(d); + pl->vel.div(fpsfric); d = pl->vel; - d.mul(speed); + d.mul(speed); if(editfly) // just apply velocity { @@ -414,9 +414,9 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) { if(pl->onladder) { - const float climbspeed = 1.0f; + const float climbspeed = 1.0f; - if(pl->type==ENT_BOT) pl->vel.z = climbspeed; // bots climb upwards only + if(pl->type==ENT_BOT) pl->vel.z = climbspeed; // bots climb upwards only else if(pl->type==ENT_PLAYER) { if(((playerent *)pl)->k_up) pl->vel.z = climbspeed; @@ -482,7 +482,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime) bool collided = false; vec oldorigin = pl->o; - if(!editfly) loopi(moveres) // discrete steps collision detection & sliding + f(!editfly) loopi(moveres) // discrete steps collision detection & sliding { const float f = 1.0f/moveres; diff --git a/source/src/server.cpp b/source/src/server.cpp index ffdb6447..9beac8aa 100644 --- a/source/src/server.cpp +++ b/source/src/server.cpp @@ -2983,8 +2983,7 @@ void process(ENetPacket *packet, int sender, int chan) cl->position.setsize(0); while(curmsgposition.add(p.buf[curmsg++]); } - if(maplayout && !m_demo && !m_coop) checkclientpos(cl); - checkmove(cl); + if(!m_demo && !m_coop) checkmove(cl); break; } diff --git a/source/src/server.h b/source/src/server.h index cedd8a0e..defde2dc 100644 --- a/source/src/server.h +++ b/source/src/server.h @@ -205,6 +205,7 @@ struct medals int dpt, lasthit, lastgun, ncovers, nhs; int combohits, combo, combofrags, combotime, combodamage, ncombos; int ask, askmillis, linked, linkmillis, linkreason, upmillis, flagmillis; + int totalhits, totalshots; bool updated, combosend; vec pos, flagpos; void reset() @@ -213,6 +214,7 @@ struct medals combohits = combo = combofrags = combotime = combodamage = ncombos = 0; askmillis = linkmillis = upmillis = flagmillis = 0; linkreason = linked = ask = -1; + totalhits = totalshots = 0; updated = combosend = false; pos = flagpos = vec(-1e10f, -1e10f, -1e10f); }