Commit 234a272b authored by NY00123's avatar NY00123
Browse files

SW: Rename q16avel -> q16angvel and q16horz -> q16aimvel.

While it is understandable that avel and horz came from Duke3D,
having both q16horiz and q16horz in the updated SW_PACKET struct
can be confusing, and the alternative notation is more consistent
with the original struct field names of angvel and aimvel, as well
as the differing uses of the name angvel still present in player.cpp.
parent 1f5a4cfa
......@@ -274,8 +274,8 @@ DemoWritePackets(const SW_PACKET *buffer, int32_t count, FILE *f)
{
packet.vel = B_LITTLE16(buffer->vel);
packet.svel = B_LITTLE16(buffer->svel);
packet.angvel = fix16_to_int(buffer->q16avel);
packet.aimvel = fix16_to_int(buffer->q16horz);
packet.angvel = fix16_to_int(buffer->q16angvel);
packet.aimvel = fix16_to_int(buffer->q16aimvel);
packet.bits = B_LITTLE32(buffer->bits);
fwrite(&packet, sizeof(packet), 1, f);
}
......@@ -291,8 +291,8 @@ DemoReadPackets(SW_PACKET *buffer, int32_t count, DFILE f)
DREAD(&packet, sizeof(packet), 1, f);
buffer->vel = B_LITTLE16(packet.vel);
buffer->svel = B_LITTLE16(packet.svel);
buffer->q16avel = fix16_from_int(packet.angvel);
buffer->q16horz = fix16_from_int(packet.aimvel);
buffer->q16angvel = fix16_from_int(packet.angvel);
buffer->q16aimvel = fix16_from_int(packet.aimvel);
buffer->bits = B_LITTLE32(packet.bits);
}
}
......
......@@ -5175,7 +5175,7 @@ getinput(SW_PACKET *loc, SWBOOL tied)
info.dyaw = (info.dyaw * turn_scale)>>8;
int32_t svel = 0, vel = 0;
fix16_t q16horz = 0, q16avel = 0;
fix16_t q16aimvel = 0, q16angvel = 0;
if (BUTTON(gamefunc_Strafe) && !pp->sop)
{
......@@ -5184,19 +5184,19 @@ getinput(SW_PACKET *loc, SWBOOL tied)
}
else
{
q16avel = fix16_div(fix16_from_int(info.mousex), fix16_from_int(32));
q16avel += fix16_from_int(info.dyaw) / analogExtent * (turnamount << 1);
q16angvel = fix16_div(fix16_from_int(info.mousex), fix16_from_int(32));
q16angvel += fix16_from_int(info.dyaw) / analogExtent * (turnamount << 1);
}
if (aimMode)
q16horz = -fix16_div(fix16_from_int(info.mousey), fix16_from_int(64));
q16aimvel = -fix16_div(fix16_from_int(info.mousey), fix16_from_int(64));
else
vel = -(info.mousey >> 6);
if (gs.MouseInvert)
q16horz = -q16horz;
q16aimvel = -q16aimvel;
q16horz -= fix16_from_int(info.dpitch) * turnamount / analogExtent;
q16aimvel -= fix16_from_int(info.dpitch) * turnamount / analogExtent;
svel -= info.dx * keymove / analogExtent;
vel -= info.dz * keymove / analogExtent;
......@@ -5215,12 +5215,12 @@ getinput(SW_PACKET *loc, SWBOOL tied)
if (PEDANTIC_MODE)
{
if (turnheldtime >= TURBOTURNTIME)
q16avel -= fix16_from_int(turnamount);
q16angvel -= fix16_from_int(turnamount);
else
q16avel -= fix16_from_int(PREAMBLETURN);
q16angvel -= fix16_from_int(PREAMBLETURN);
}
else
q16avel = fix16_ssub(q16avel, fix16_from_float(scaleAdjustmentToInterval((turnheldtime >= TURBOTURNTIME) ? turnamount : PREAMBLETURN)));
q16angvel = fix16_ssub(q16angvel, fix16_from_float(scaleAdjustmentToInterval((turnheldtime >= TURBOTURNTIME) ? turnamount : PREAMBLETURN)));
}
else if (BUTTON(gamefunc_Turn_Right))
{
......@@ -5228,12 +5228,12 @@ getinput(SW_PACKET *loc, SWBOOL tied)
if (PEDANTIC_MODE)
{
if (turnheldtime >= TURBOTURNTIME)
q16avel += fix16_from_int(turnamount);
q16angvel += fix16_from_int(turnamount);
else
q16avel += fix16_from_int(PREAMBLETURN);
q16angvel += fix16_from_int(PREAMBLETURN);
}
else
q16avel = fix16_sadd(q16avel, fix16_from_float(scaleAdjustmentToInterval((turnheldtime >= TURBOTURNTIME) ? turnamount : PREAMBLETURN)));
q16angvel = fix16_sadd(q16angvel, fix16_from_float(scaleAdjustmentToInterval((turnheldtime >= TURBOTURNTIME) ? turnamount : PREAMBLETURN)));
}
else
{
......@@ -5262,21 +5262,21 @@ getinput(SW_PACKET *loc, SWBOOL tied)
if (BUTTON(gamefunc_Move_Backward))
vel += -keymove;
q16avel = fix16_clamp(q16avel, -fix16_from_int(MAXANGVEL), fix16_from_int(MAXANGVEL));
q16horz = fix16_clamp(q16horz, -fix16_from_int(MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
q16angvel = fix16_clamp(q16angvel, -fix16_from_int(MAXANGVEL), fix16_from_int(MAXANGVEL));
q16aimvel = fix16_clamp(q16aimvel, -fix16_from_int(MAXHORIZVEL), fix16_from_int(MAXHORIZVEL));
if (PEDANTIC_MODE)
{
q16avel = fix16_floor(q16avel);
q16horz = fix16_floor(q16horz);
q16angvel = fix16_floor(q16angvel);
q16aimvel = fix16_floor(q16aimvel);
}
else if (!TEST(pp->Flags, PF_DEAD))
{
void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16avel);
void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16horz);
void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel);
void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel);
if (!TEST(pp->Flags, PF_CLIMBING))
DoPlayerTurn(pp, &pp->camq16ang, q16avel);
DoPlayerHorizon(pp, &pp->camq16horiz, q16horz);
DoPlayerTurn(pp, &pp->camq16ang, q16angvel);
DoPlayerHorizon(pp, &pp->camq16horiz, q16aimvel);
}
loc->vel += vel;
......@@ -5297,8 +5297,8 @@ getinput(SW_PACKET *loc, SWBOOL tied)
loc->svel = momy;
}
loc->q16avel += q16avel;
loc->q16horz += q16horz;
loc->q16angvel += q16angvel;
loc->q16aimvel += q16aimvel;
if (MenuButtonAutoRun)
{
......
......@@ -1004,8 +1004,8 @@ typedef struct
{
int16_t vel;
int16_t svel;
fix16_t q16avel;
fix16_t q16horz;
fix16_t q16angvel;
fix16_t q16aimvel;
fix16_t q16ang;
fix16_t q16horiz;
int32_t bits;
......
......@@ -445,8 +445,8 @@ void computergetinput(int snum, SW_PACKET *syn)
// Reset input bits
syn->vel = 0;
syn->svel = 0;
syn->q16avel = 0;
syn->q16horz = 0;
syn->q16angvel = 0;
syn->q16aimvel = 0;
syn->bits = 0;
x1 = p->posx;
......@@ -650,9 +650,9 @@ void computergetinput(int snum, SW_PACKET *syn)
daang = NORM_ANGLE((daang-64) + STD_RANDOM_RANGE(128));
// Below formula fails in certain cases
//syn->q16avel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>1,-MAXANGVEL),MAXANGVEL)); //was 127
//syn->q16angvel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>1,-MAXANGVEL),MAXANGVEL)); //was 127
p->q16ang = fix16_from_int(daang);
syn->q16horz = fix16_from_int(min(max((zang-fix16_to_int(p->q16horiz))>>1,-PLAYER_HORIZ_MAX),PLAYER_HORIZ_MAX));
syn->q16aimvel = fix16_from_int(min(max((zang-fix16_to_int(p->q16horiz))>>1,-PLAYER_HORIZ_MAX),PLAYER_HORIZ_MAX));
// Sets type of aiming, auto aim for bots
syn->bits |= (1<<SK_AUTO_AIM);
return;
......@@ -808,7 +808,7 @@ void computergetinput(int snum, SW_PACKET *syn)
daang = getangle(x2-x1,y2-y1);
syn->vel += (x2-x1)*2047/dist;
syn->svel += (y2-y1)*2047/dist;
syn->q16avel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
syn->q16angvel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
}
else
goalsprite[snum] = -1;
......@@ -871,7 +871,7 @@ void computergetinput(int snum, SW_PACKET *syn)
daang = ((getangle(wall[wall[goalwall[snum]].point2].x-wall[goalwall[snum]].x,wall[wall[goalwall[snum]].point2].y-wall[goalwall[snum]].y)+1536)&2047);
syn->vel += (x2-x1)*2047/dist;
syn->svel += (y2-y1)*2047/dist;
syn->q16avel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
syn->q16angvel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
}
......@@ -892,7 +892,7 @@ void computergetinput(int snum, SW_PACKET *syn)
daang = ((getangle(wall[wall[goalwall[snum]].point2].x-wall[goalwall[snum]].x,wall[wall[goalwall[snum]].point2].y-wall[goalwall[snum]].y)+1536)&2047);
syn->vel += (x2-x1)*2047/dist;
syn->svel += (y2-y1)*2047/dist;
syn->q16avel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
syn->q16angvel = fix16_from_int(min(max((((daang+1024-damyang)&2047)-1024)>>3,-MAXANGVEL),MAXANGVEL));
}
*/
}
......
......@@ -100,8 +100,8 @@ typedef struct
{
int32_t vel;
int32_t svel;
fix16_t q16avel;
fix16_t q16horz;
fix16_t q16angvel;
fix16_t q16aimvel;
fix16_t q16ang;
fix16_t q16horiz;
int32_t bits;
......@@ -318,19 +318,19 @@ int EncodeBits(SW_PACKET *pak, SW_PACKET *old_pak, uint8_t* buf)
SET(*base_ptr, BIT(1));
}
if ((pak->q16avel != old_pak->q16avel) || (pak->q16ang != old_pak->q16ang))
if ((pak->q16angvel != old_pak->q16angvel) || (pak->q16ang != old_pak->q16ang))
{
*((fix16_t *)buf) = pak->q16avel;
buf += sizeof(pak->q16avel);
*((fix16_t *)buf) = pak->q16angvel;
buf += sizeof(pak->q16angvel);
*((fix16_t *)buf) = pak->q16ang;
buf += sizeof(pak->q16ang);
SET(*base_ptr, BIT(2));
}
if ((pak->q16horz != old_pak->q16horz) || (pak->q16horiz != old_pak->q16horiz))
if ((pak->q16aimvel != old_pak->q16aimvel) || (pak->q16horiz != old_pak->q16horiz))
{
*((fix16_t *)buf) = pak->q16horz;
buf += sizeof(pak->q16horz);
*((fix16_t *)buf) = pak->q16aimvel;
buf += sizeof(pak->q16aimvel);
*((fix16_t *)buf) = pak->q16horiz;
buf += sizeof(pak->q16horiz);
SET(*base_ptr, BIT(3));
......@@ -375,16 +375,16 @@ int DecodeBits(SW_PACKET *pak, SW_PACKET *old_pak, uint8_t* buf)
if (TEST(*base_ptr, BIT(2)))
{
pak->q16avel = *(fix16_t *)buf;
buf += sizeof(pak->q16avel);
pak->q16angvel = *(fix16_t *)buf;
buf += sizeof(pak->q16angvel);
pak->q16ang = *(fix16_t *)buf;
buf += sizeof(pak->q16ang);
}
if (TEST(*base_ptr, BIT(3)))
{
pak->q16horz = *(fix16_t *)buf;
buf += sizeof(pak->q16horz);
pak->q16aimvel = *(fix16_t *)buf;
buf += sizeof(pak->q16aimvel);
pak->q16horiz = *(fix16_t *)buf;
buf += sizeof(pak->q16horiz);
}
......@@ -982,8 +982,8 @@ faketimerhandler(void)
AveragePacket.vel += loc.vel;
AveragePacket.svel += loc.svel;
AveragePacket.q16avel += loc.q16avel;
AveragePacket.q16horz += loc.q16horz;
AveragePacket.q16angvel += loc.q16angvel;
AveragePacket.q16aimvel += loc.q16aimvel;
AveragePacket.q16ang = Player[myconnectindex].camq16ang;
AveragePacket.q16horiz = Player[myconnectindex].camq16horiz;
SET(AveragePacket.bits, loc.bits);
......@@ -1004,8 +1004,8 @@ faketimerhandler(void)
loc.vel = AveragePacket.vel / MovesPerPacket;
loc.svel = AveragePacket.svel / MovesPerPacket;
loc.q16avel = fix16_div(AveragePacket.q16avel, fix16_from_int(MovesPerPacket));
loc.q16horz = fix16_div(AveragePacket.q16horz, fix16_from_int(MovesPerPacket));
loc.q16angvel = fix16_div(AveragePacket.q16angvel, fix16_from_int(MovesPerPacket));
loc.q16aimvel = fix16_div(AveragePacket.q16aimvel, fix16_from_int(MovesPerPacket));
loc.q16ang = AveragePacket.q16ang;
loc.q16horiz = AveragePacket.q16horiz;
loc.bits = AveragePacket.bits;
......
......@@ -1542,7 +1542,7 @@ DoPlayerCrawlHeight(PLAYERp pp)
double scaleAdjustmentToInterval(double x);
void
DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16avel)
DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel)
{
#define TURN_SHIFT 2
......@@ -1621,14 +1621,14 @@ DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16avel)
return;
}
q16avel = fix16_smul(q16avel, fix16_from_int(PLAYER_TURN_SCALE));
q16angvel = fix16_smul(q16angvel, fix16_from_int(PLAYER_TURN_SCALE));
if (q16avel != 0)
if (q16angvel != 0)
{
// running is not handled here now
q16avel += fix16_sdiv(q16avel, fix16_from_int(4));
q16angvel += fix16_sdiv(q16angvel, fix16_from_int(4));
*pq16ang += fix16_sdiv(fix16_mul(q16avel, fix16_from_int(synctics)), fix16_from_int(32));
*pq16ang += fix16_sdiv(fix16_mul(q16angvel, fix16_from_int(synctics)), fix16_from_int(32));
*pq16ang = NORM_Q16ANGLE(*pq16ang);
if (PEDANTIC_MODE)
*pq16ang = fix16_floor(*pq16ang);
......@@ -1660,7 +1660,7 @@ DoPlayerTurnBoat(PLAYERp pp)
if (sop->drive_angspeed)
{
pp->drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16avel), sop->drive_angspeed);
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
......@@ -1669,7 +1669,7 @@ DoPlayerTurnBoat(PLAYERp pp)
}
else
{
angvel = fix16_to_int(pp->input.q16avel) * PLAYER_TURN_SCALE;
angvel = fix16_to_int(pp->input.q16angvel) * PLAYER_TURN_SCALE;
angvel += angvel - DIV4(angvel);
angvel = DIV32(angvel * synctics);
}
......@@ -1692,7 +1692,7 @@ DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist)
int angslide;
pp->drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16avel), sop->drive_angspeed);
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
......@@ -1701,7 +1701,7 @@ DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist)
}
else
{
angvel = DIV8(fix16_to_int(pp->input.q16avel) * synctics);
angvel = DIV8(fix16_to_int(pp->input.q16angvel) * synctics);
}
if (angvel != 0)
......@@ -1725,7 +1725,7 @@ DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy)
int angslide;
pp->drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16avel), sop->drive_angspeed);
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
......@@ -1734,7 +1734,7 @@ DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy)
}
else
{
angvel = DIV8(fix16_to_int(pp->input.q16avel) * synctics);
angvel = DIV8(fix16_to_int(pp->input.q16angvel) * synctics);
}
if (angvel != 0)
......@@ -1763,9 +1763,9 @@ DoPlayerTurnTurret(PLAYERp pp)
fifo_ndx = (movefifoplc-2) & (MOVEFIFOSIZ - 1);
last_input = pp->inputfifo[fifo_ndx];
if (pp->input.q16avel && !last_input.q16avel)
if (pp->input.q16angvel && !last_input.q16angvel)
PlaySOsound(pp->sop->mid_sector, SO_DRIVE_SOUND);
else if (!pp->input.q16avel && last_input.q16avel)
else if (!pp->input.q16angvel && last_input.q16angvel)
PlaySOsound(pp->sop->mid_sector, SO_IDLE_SOUND);
}
......@@ -1774,7 +1774,7 @@ DoPlayerTurnTurret(PLAYERp pp)
int angslide;
pp->drive_oangvel = pp->drive_angvel;
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16avel), sop->drive_angspeed);
pp->drive_angvel = mulscale16(fix16_to_int(pp->input.q16angvel), sop->drive_angspeed);
angslide = sop->drive_angslide;
pp->drive_angvel = (pp->drive_angvel + (pp->drive_oangvel*(angslide-1)))/angslide;
......@@ -1783,7 +1783,7 @@ DoPlayerTurnTurret(PLAYERp pp)
}
else
{
angvel = DIV4(fix16_to_int(pp->input.q16avel) * synctics);
angvel = DIV4(fix16_to_int(pp->input.q16angvel) * synctics);
}
if (angvel != 0)
......@@ -1910,7 +1910,7 @@ PlayerAutoLook(PLAYERp pp)
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
void
DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16horz)
DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel)
{
int i;
#define HORIZ_SPEED (16)
......@@ -1926,9 +1926,9 @@ DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16horz)
PlayerAutoLook(pp);
if (q16horz)
if (q16aimvel)
{
pp->q16horizbase += q16horz;
pp->q16horizbase += q16aimvel;
SET(pp->Flags, PF_LOCK_HORIZ | PF_LOOKING);
}
......@@ -2649,7 +2649,7 @@ DoPlayerMove(PLAYERp pp)
PLAYER_RUN_LOCK(pp);
DoPlayerTurn(pp, &pp->q16ang, pp->input.q16avel);
DoPlayerTurn(pp, &pp->q16ang, pp->input.q16angvel);
pp->oldposx = pp->posx;
pp->oldposy = pp->posy;
......@@ -2753,7 +2753,7 @@ DoPlayerMove(PLAYERp pp)
DoPlayerSetWadeDepth(pp);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
if (pp->cursectnum >= 0 && TEST(sector[pp->cursectnum].extra, SECTFX_DYNAMIC_AREA))
{
......@@ -2963,7 +2963,7 @@ DoPlayerMoveBoat(PLAYERp pp)
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
pp->cursectnum = save_sectnum; // for speed
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
}
#if 0
......@@ -3133,7 +3133,7 @@ DriveCrush(PLAYERp pp, int *x, int *y)
return;
// not moving - don't crush
if ((pp->xvect|pp->yvect) == 0 && pp->input.q16avel == 0)
if ((pp->xvect|pp->yvect) == 0 && pp->input.q16angvel == 0)
return;
// main sector
......@@ -3476,7 +3476,7 @@ DoPlayerMoveTank(PLAYERp pp)
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->posx, pp->posy);
pp->cursectnum = save_sectnum; // for speed
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
DoTankTreads(pp);
}
......@@ -3495,7 +3495,7 @@ DoPlayerMoveTurret(PLAYERp pp)
OperateSectorObject(pp->sop, fix16_to_int(pp->q16ang), pp->sop->xmid, pp->sop->ymid);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
}
void
......@@ -4084,7 +4084,7 @@ DoPlayerClimb(PLAYERp pp)
sp->z = pp->posz + PLAYER_HEIGHT;
changespritesect(pp->PlayerSprite, pp->cursectnum);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16horz);
DoPlayerHorizon(pp, &pp->q16horiz, pp->input.q16aimvel);
if (FAF_ConnectArea(pp->cursectnum))
{
......@@ -5977,7 +5977,7 @@ DoPlayerBeginOperate(PLAYERp pp)
break;
case SO_TURRET_MGUN:
case SO_TURRET:
if (pp->input.q16avel)
if (pp->input.q16angvel)
PlaySOsound(pp->sop->mid_sector, SO_DRIVE_SOUND);
else
PlaySOsound(pp->sop->mid_sector, SO_IDLE_SOUND);
......@@ -6067,7 +6067,7 @@ DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
break;
case SO_TURRET_MGUN:
case SO_TURRET:
if (pp->input.q16avel)
if (pp->input.q16angvel)
PlaySOsound(pp->sop->mid_sector, SO_DRIVE_SOUND);
else
PlaySOsound(pp->sop->mid_sector, SO_IDLE_SOUND);
......@@ -6847,12 +6847,12 @@ void DoPlayerDeathFollowKiller(PLAYERp pp)
//DoPlayerDeathTilt(pp, pp->tilt_dest, 4 * synctics);
// allow turning
if ((TEST(pp->Flags, PF_DEAD_HEAD) && pp->input.q16avel != 0) || TEST(pp->Flags, PF_HEAD_CONTROL))
if ((TEST(pp->Flags, PF_DEAD_HEAD) && pp->input.q16angvel != 0) || TEST(pp->Flags, PF_HEAD_CONTROL))
{
// Allow them to turn fast
PLAYER_RUN_LOCK(pp);
DoPlayerTurn(pp, &pp->q16ang, pp->input.q16avel);
DoPlayerTurn(pp, &pp->q16ang, pp->input.q16angvel);
return;
}
......@@ -7663,7 +7663,7 @@ void ChopsCheck(PLAYERp pp)
if (!UsingMenus && !HelpInputMode && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
{
if ((pp->input.bits|pp->input.vel|pp->input.svel|pp->input.q16avel|pp->input.q16horz) ||
if ((pp->input.bits|pp->input.vel|pp->input.svel|pp->input.q16angvel|pp->input.q16aimvel) ||
TEST(pp->Flags, PF_CLIMBING|PF_FALLING|PF_DIVING))
{
// Hit a input key or other reason to stop chops
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment