*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1265 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2007-08-19 09:38:59 +00:00
parent a5bfa30817
commit 6b308c415b
5 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ void otherplayers()
{
loopv(players) if(players[i] && players[i]->type==ENT_PLAYER)
{
const int lagtime = players[i]->lastupdate ? lastmillis-players[i]->lastupdate : 0;
const int lagtime = lastmillis-players[i]->lastupdate;
if(lagtime>1000 && players[i]->state==CS_ALIVE)
{
players[i]->state = CS_LAGGED;
+3 -4
View File
@@ -53,7 +53,7 @@ void updatelagtime(playerent *d)
int lagtime = lastmillis-d->lastupdate;
if(lagtime)
{
if(d->lastupdate) d->plag = (d->plag*5+lagtime)/6;
if(d->state!=CS_SPAWNING) d->plag = (d->plag*5+lagtime)/6;
d->lastupdate = lastmillis;
}
}
@@ -96,7 +96,7 @@ void parsepositions(ucharbuf &p)
d->onladder = f&1;
updatepos(d);
updatelagtime(d);
if(d->state==CS_LAGGED) d->state = CS_ALIVE;
if(d->state==CS_LAGGED || d->state==CS_SPAWNING) d->state = CS_ALIVE;
break;
}
@@ -251,8 +251,7 @@ void parsemessages(int cn, playerent *d, ucharbuf &p)
if(!d) break;
d->lifesequence = ls;
d->gunselect = gunselect;
d->state = CS_ALIVE;
d->lastupdate = 0;
d->state = CS_SPAWNING;
break;
}
+1 -1
View File
@@ -81,7 +81,7 @@ static inline int kick_back(int gun) { return guns[gun].mdl_kick_back; }
#define team_opposite(o) ((o) == TEAM_CLA ? TEAM_RVSF : TEAM_CLA)
enum { ENT_PLAYER = 0, ENT_BOT, ENT_CAMERA, ENT_BOUNCE };
enum { CS_ALIVE = 0, CS_DEAD, CS_LAGGED, CS_EDITING };
enum { CS_ALIVE = 0, CS_DEAD, CS_SPAWNING, CS_LAGGED, CS_EDITING };
enum { CR_DEFAULT, CR_MASTER, CR_ADMIN };
struct physent
+1 -1
View File
@@ -391,7 +391,7 @@ void renderclient(playerent *d)
void renderclients()
{
playerent *d;
loopv(players) if((d = players[i]) && (d->type!=ENT_PLAYER || d->state!=CS_ALIVE || d->lastupdate)) renderclient(d);
loopv(players) if((d = players[i]) && d->state!=CS_SPAWNING) renderclient(d);
if(player1->state==CS_DEAD || (reflecting && !refracting)) renderclient(player1);
}
+3 -3
View File
@@ -199,7 +199,7 @@ playerent *intersectclosest(vec &from, vec &to, playerent *at)
loopv(players)
{
playerent *o = players[i];
if(!o || o==at || o->state!=CS_ALIVE || (o->type==ENT_PLAYER && !o->lastupdate)) continue;
if(!o || o==at || o->state!=CS_ALIVE) continue;
if(!intersect(o, from, to)) continue;
float dist = at->o.dist(o->o);
if(dist<bestdist)
@@ -296,7 +296,7 @@ float expdist(playerent *o, vec &dir, const vec &v)
void radialeffect(playerent *o, vec &v, int qdam, playerent *at, int gun)
{
if(o->state!=CS_ALIVE || (o!=player1 && o->type==ENT_PLAYER && !o->lastupdate)) return;
if(o->state!=CS_ALIVE) return;
vec dir;
float dist = expdist(o, dir, v);
if(dist<EXPDAMRAD)
@@ -333,7 +333,7 @@ void splash(projectile &p, vec &v, vec &vold, playerent *notthis, int qdam)
bool projdamage(playerent *o, projectile &p, vec &v, int qdam)
{
if(o->state!=CS_ALIVE || (o!=player1 && o->type==ENT_PLAYER && !o->lastupdate) || !intersect(o, p.o, v)) return false;
if(o->state!=CS_ALIVE || !intersect(o, p.o, v)) return false;
splash(p, v, p.o, o, qdam);
vec dir;
expdist(o, dir, v);