*** empty log message ***

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1209 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2007-08-07 16:48:37 +00:00
parent 7d2107f9bd
commit fdfc4f4358
4 changed files with 13 additions and 11 deletions
+2 -3
View File
@@ -130,7 +130,7 @@ extern void thrownade(playerent *d, const vec &vel, bounceent *p);
void deathstate(playerent *pl)
{
pl->lastaction = lastmillis;
pl->lastpain = lastmillis;
pl->attacking = false;
pl->state = CS_DEAD;
pl->pitch = 0;
@@ -146,7 +146,6 @@ void deathstate(playerent *pl)
void spawnstate(playerent *d) // reset player state not persistent accross spawns
{
d->respawn();
//d->lastaction = lastmillis;
if(d==player1)
{
gun_changed = true;
@@ -308,7 +307,7 @@ void updateworld(int curtime, int lastmillis) // main game update loop
//put game mode extra call here
if(player1->state==CS_DEAD)
{
if(lastmillis-player1->lastaction<2000)
if(lastmillis-player1->lastpain<2000)
{
player1->move = player1->strafe = 0;
moveplayer(player1, 10, false);
+1 -1
View File
@@ -89,7 +89,7 @@ void parsepositions(ucharbuf &p)
d->onfloor = f&1;
f >>= 1;
int oldstate = d->state, state = f&7;
if(state==CS_DEAD && oldstate!=CS_DEAD) d->lastaction = lastmillis;
if(state==CS_DEAD && oldstate!=CS_DEAD) d->lastpain = lastmillis;
d->state = state;
f >>= 3;
d->onladder = f&1;
-3
View File
@@ -146,9 +146,6 @@ void rendermenumdl()
glPushMatrix ();
float t = (lastmillis-player1->lastaction)/1000.0f;
if(t >= 1.6f) t = 1.6f;
glLoadIdentity();
glRotatef(90+180, 0, -1, 0);
glRotatef(90, -1, 0, 0);
+10 -4
View File
@@ -105,7 +105,13 @@ void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, floa
int ix = (int)x;
int iy = (int)y;
vec light(1, 1, 1);
int varseed = (int)(size_t)d + (d ? d->lastaction : 0);
int varseed = 0;
if(d) switch(anim&ANIM_INDEX)
{
case ANIM_DEATH:
case ANIM_LYING_DEAD: varseed = (int)(size_t)d + d->lastpain; break;
default: varseed = (int)(size_t)d + d->lastaction; break;
}
model *vwep = NULL;
if(vwepmdl)
@@ -225,9 +231,9 @@ void renderclient(playerent *d, char *mdlname, char *vwepname, int tex)
d->pitch = 0.1f;
int r = 6;
anim = ANIM_DEATH;
varseed += d->lastaction;
basetime = d->lastaction;
int t = lastmillis-d->lastaction;
varseed += d->lastpain;
basetime = d->lastpain;
int t = lastmillis-d->lastpain;
if(t<0 || t>20000) return;
if(t>(r-1)*100-50)
{