some cleanup and compatibility things
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5464 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -2983,8 +2983,7 @@ void process(ENetPacket *packet, int sender, int chan)
|
||||
cl->position.setsize(0);
|
||||
while(curmsg<p.length()) cl->position.add(p.buf[curmsg++]);
|
||||
}
|
||||
if(maplayout && !m_demo && !m_coop) checkclientpos(cl);
|
||||
checkmove(cl);
|
||||
if(!m_demo && !m_coop) checkmove(cl);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user