Game: in DNCOORDS display, show x/y/z for VEL + ps->fric x and y components.

Also, prettify some ps->fric-related code. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5313 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2015-07-25 19:42:54 +00:00
parent ff56964e1b
commit 91f09c76c5
2 changed files with 20 additions and 15 deletions

View file

@ -1213,7 +1213,7 @@ ACTOR_STATIC void G_MovePlayers(void)
{ {
s->extra = p->max_player_health; s->extra = p->max_player_health;
s->cstat = 257; s->cstat = 257;
p->inv_amount[GET_JETPACK] = 1599; p->inv_amount[GET_JETPACK] = 1599;
} }
if (s->extra > 0) if (s->extra > 0)
@ -7261,15 +7261,16 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
for (TRAVERSE_CONNECT(p)) for (TRAVERSE_CONNECT(p))
{ {
if (g_player[p].ps->cursectnum == s->sectnum && g_player[p].ps->on_ground) DukePlayer_t *const ps = g_player[p].ps;
if (ps->cursectnum == s->sectnum && ps->on_ground)
{ {
if (klabs(g_player[p].ps->pos.z-g_player[p].ps->truefz) < PHEIGHT+(9<<8)) if (klabs(ps->pos.z-ps->truefz) < PHEIGHT+(9<<8))
{ {
g_player[p].ps->fric.x += x<<3; ps->fric.x += x<<3;
g_player[p].ps->fric.y += l<<3; ps->fric.y += l<<3;
} }
} }
} }
sc->floorxpanning += SP>>7; sc->floorxpanning += SP>>7;
@ -7368,11 +7369,13 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
for (TRAVERSE_CONNECT(p)) for (TRAVERSE_CONNECT(p))
{ {
if (sprite[g_player[p].ps->i].sectnum == s->sectnum && g_player[p].ps->on_ground) DukePlayer_t *const ps = g_player[p].ps;
if (sprite[ps->i].sectnum == s->sectnum && ps->on_ground)
{ {
g_player[p].ps->fric.x += l<<5; ps->fric.x += l<<5;
g_player[p].ps->fric.y += x<<5; ps->fric.y += x<<5;
g_player[p].ps->pos.z += s->zvel; ps->pos.z += s->zvel;
} }
} }
A_MoveSector(i); A_MoveSector(i);

View file

@ -2532,16 +2532,18 @@ static void G_PrintCoords(int32_t snum)
else if (g_netServer || ud.multimode > 1) else if (g_netServer || ud.multimode > 1)
y = 24; y = 24;
} }
Bsprintf(tempbuf,"XYZ= (%d,%d,%d)",ps->pos.x,ps->pos.y,ps->pos.z); Bsprintf(tempbuf, "XYZ= (%d, %d, %d)", ps->pos.x, ps->pos.y, ps->pos.z);
printext256(x,y,31,-1,tempbuf,0); printext256(x,y,31,-1,tempbuf,0);
Bsprintf(tempbuf,"A/H/HO= %d,%d,%d",ps->ang,ps->horiz,ps->horizoff); Bsprintf(tempbuf, "A/H/HO= %d, %d, %d", ps->ang, ps->horiz, ps->horizoff);
printext256(x,y+9,31,-1,tempbuf,0); printext256(x,y+9,31,-1,tempbuf,0);
Bsprintf(tempbuf,"ZV= %d",ps->vel.z); Bsprintf(tempbuf,"VEL= (%d, %d, %d) + (%d, %d, 0)",
ps->vel.x>>14, ps->vel.y>>14, ps->vel.z, ps->fric.x>>5, ps->fric.y>>5);
printext256(x,y+18,31,-1,tempbuf,0); printext256(x,y+18,31,-1,tempbuf,0);
Bsprintf(tempbuf,"OG= %d SBRIDGE=%d SBS=%d",ps->on_ground, ps->spritebridge, ps->sbs); Bsprintf(tempbuf,"OG= %d SBRIDGE=%d SBS=%d", ps->on_ground, ps->spritebridge, ps->sbs);
printext256(x,y+27,31,-1,tempbuf,0); printext256(x,y+27,31,-1,tempbuf,0);
if (sectnum >= 0) if (sectnum >= 0)
Bsprintf(tempbuf,"SECT= %d (LO=%d EX=%d)",sectnum,TrackerCast(sector[sectnum].lotag),TrackerCast(sector[sectnum].extra)); Bsprintf(tempbuf, "SECT= %d (LO=%d EX=%d)", sectnum,
TrackerCast(sector[sectnum].lotag), TrackerCast(sector[sectnum].extra));
else else
Bsprintf(tempbuf,"SECT= %d", sectnum); Bsprintf(tempbuf,"SECT= %d", sectnum);
printext256(x,y+36,31,-1,tempbuf,0); printext256(x,y+36,31,-1,tempbuf,0);