mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 21:20:39 +00:00
- SW: Replace PLAYERstruct
posy
with pos.Y
calls.
This commit is contained in:
parent
3a0ee322ae
commit
ae3369d2a3
22 changed files with 161 additions and 161 deletions
|
@ -347,7 +347,7 @@ int DoActorPickClosePlayer(DSWActor* actor)
|
|||
// continue;
|
||||
}
|
||||
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy, dist, a, b, c);
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
|
||||
if (dist < near_dist)
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ int DoActorPickClosePlayer(DSWActor* actor)
|
|||
// continue;
|
||||
}
|
||||
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy, dist, a, b, c);
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
|
||||
auto psp = &pp->Actor()->s();
|
||||
if (dist < near_dist && FAFcansee(sp->pos.X, sp->pos.Y, look_height, sp->sector(), psp->pos.X, psp->pos.Y, SPRITEp_UPPER(psp), psp->sector()))
|
||||
|
|
|
@ -1032,7 +1032,7 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
if (pp == Player+myconnectindex)
|
||||
{
|
||||
choose_snd = STD_RANDOM_RANGE(2<<8)>>8;
|
||||
if (FAFcansee(sp->pos.X,sp->pos.Y,SPRITEp_TOS(sp),sp->sector(),pp->pos.X, pp->posy, pp->posz, pp->cursector) && Facing(actor, u->targetActor))
|
||||
if (FAFcansee(sp->pos.X,sp->pos.Y,SPRITEp_TOS(sp),sp->sector(),pp->pos.X, pp->pos.Y, pp->posz, pp->cursector) && Facing(actor, u->targetActor))
|
||||
PlayerSound(fagsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
|
||||
}
|
||||
}
|
||||
|
@ -1047,7 +1047,7 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
if (pp == Player+myconnectindex)
|
||||
{
|
||||
choose_snd = STD_RANDOM_RANGE(3<<8)>>8;
|
||||
if (FAFcansee(sp->pos.X,sp->pos.Y,SPRITEp_TOS(sp),sp->sector(),pp->pos.X, pp->posy, pp->posz, pp->cursector) && Facing(actor, u->targetActor))
|
||||
if (FAFcansee(sp->pos.X,sp->pos.Y,SPRITEp_TOS(sp),sp->sector(),pp->pos.X, pp->pos.Y, pp->posz, pp->cursector) && Facing(actor, u->targetActor))
|
||||
PlayerSound(straightsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -825,7 +825,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie
|
|||
PLAYERp pp = tu->PlayerP;
|
||||
int sr = 65536 - int(smoothratio);
|
||||
tsp->pos.X -= MulScale(pp->pos.X - pp->oposx, sr, 16);
|
||||
tsp->pos.Y -= MulScale(pp->posy - pp->oposy, sr, 16);
|
||||
tsp->pos.Y -= MulScale(pp->pos.Y - pp->oposy, sr, 16);
|
||||
tsp->pos.Z -= MulScale(pp->posz - pp->oposz, sr, 16);
|
||||
tsp->ang -= MulScale(pp->angle.ang.asbuild() - pp->angle.oang.asbuild(), sr, 16);
|
||||
}
|
||||
|
@ -1071,7 +1071,7 @@ FString GameInterface::GetCoordString()
|
|||
PLAYERp pp = Player + myconnectindex;
|
||||
FString out;
|
||||
out.AppendFormat("POSX:%d ", pp->pos.X);
|
||||
out.AppendFormat("POSY:%d ", pp->posy);
|
||||
out.AppendFormat("POSY:%d ", pp->pos.Y);
|
||||
out.AppendFormat("POSZ:%d ", pp->posz);
|
||||
out.AppendFormat("ANG:%d\n", pp->angle.ang.asbuild());
|
||||
|
||||
|
@ -1459,7 +1459,7 @@ void drawscreen(PLAYERp pp, double smoothratio)
|
|||
camerapp = pp;
|
||||
|
||||
tx = interpolatedvalue(camerapp->oposx, camerapp->pos.X, sr);
|
||||
ty = interpolatedvalue(camerapp->oposy, camerapp->posy, sr);
|
||||
ty = interpolatedvalue(camerapp->oposy, camerapp->pos.Y, sr);
|
||||
tz = interpolatedvalue(camerapp->oposz, camerapp->posz, sr);
|
||||
|
||||
// Interpolate the player's angle while on a sector object, just like VoidSW.
|
||||
|
@ -1486,7 +1486,7 @@ void drawscreen(PLAYERp pp, double smoothratio)
|
|||
(!cl_sointerpolation || (CommEnabled && !pp->sop_remote)))
|
||||
{
|
||||
tx = pp->pos.X;
|
||||
ty = pp->posy;
|
||||
ty = pp->pos.Y;
|
||||
tz = pp->posz;
|
||||
tang = pp->angle.ang;
|
||||
}
|
||||
|
|
|
@ -303,12 +303,12 @@ inline int SPRITEp_SIZE_BOS(const tspritetype* sp)
|
|||
|
||||
#define SQ(val) ((val) * (val))
|
||||
|
||||
#define KENFACING_PLAYER(pp,sp) (bcos(sp->ang)*(pp->posy-sp->pos.Y) >= bsin(sp-ang)*(pp->pos.X-sp->pos.X))
|
||||
#define FACING_PLAYER(pp,sp) (abs(getincangle(getangle((pp)->pos.X - (sp)->pos.X, (pp)->posy - (sp)->pos.Y), (sp)->ang)) < 512)
|
||||
#define PLAYER_FACING(pp,sp) (abs(getincangle(getangle((sp)->pos.X - (pp)->pos.X, (sp)->pos.Y - (pp)->posy), (pp)->angle.ang.asbuild())) < 320)
|
||||
#define KENFACING_PLAYER(pp,sp) (bcos(sp->ang)*(pp->pos.Y-sp->pos.Y) >= bsin(sp-ang)*(pp->pos.X-sp->pos.X))
|
||||
#define FACING_PLAYER(pp,sp) (abs(getincangle(getangle((pp)->pos.X - (sp)->pos.X, (pp)->pos.Y - (sp)->pos.Y), (sp)->ang)) < 512)
|
||||
#define PLAYER_FACING(pp,sp) (abs(getincangle(getangle((sp)->pos.X - (pp)->pos.X, (sp)->pos.Y - (pp)->pos.Y), (pp)->angle.ang.asbuild())) < 320)
|
||||
|
||||
#define FACING_PLAYER_RANGE(pp,sp,range) (abs(getincangle(getangle((pp)->pos.X - (sp)->pos.X, (pp)->posy - (sp)->pos.Y), (sp)->ang)) < (range))
|
||||
#define PLAYER_FACING_RANGE(pp,sp,range) (abs(getincangle(getangle((sp)->pos.X - (pp)->pos.X, (sp)->pos.Y - (pp)->posy), (pp)->angle.ang.asbuild())) < (range))
|
||||
#define FACING_PLAYER_RANGE(pp,sp,range) (abs(getincangle(getangle((pp)->pos.X - (sp)->pos.X, (pp)->pos.Y - (sp)->pos.Y), (sp)->ang)) < (range))
|
||||
#define PLAYER_FACING_RANGE(pp,sp,range) (abs(getincangle(getangle((sp)->pos.X - (pp)->pos.X, (sp)->pos.Y - (pp)->pos.Y), (pp)->angle.ang.asbuild())) < (range))
|
||||
#define FACING_RANGE(sp1,sp2,range) (abs(getincangle(getangle((sp1)->pos.X - (sp2)->pos.X, (sp1)->pos.Y - (sp2)->pos.Y), (sp2)->ang)) < (range))
|
||||
|
||||
// two vectors
|
||||
|
@ -663,7 +663,7 @@ struct PLAYERstruct
|
|||
// variable that fit in the sprite or user structure
|
||||
union
|
||||
{
|
||||
struct { int32_t BLAHBLAHX, posy, posz; };
|
||||
struct { int32_t BLAHBLAHX, BLAHBLAHY, posz; };
|
||||
vec3_t pos;
|
||||
};
|
||||
|
||||
|
|
|
@ -564,7 +564,7 @@ int DoCheckSwarm(DSWActor* actor)
|
|||
if (u->targetActor->u()->PlayerP)
|
||||
{
|
||||
pp = u->targetActor->u()->PlayerP;
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy, pdist, a, b, c);
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y, pdist, a, b, c);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
|
|
@ -455,7 +455,7 @@ JS_ProcessEchoSpot()
|
|||
tp = &actor->s();
|
||||
|
||||
j = abs(tp->pos.X - pp->pos.X);
|
||||
j += abs(tp->pos.Y - pp->posy);
|
||||
j += abs(tp->pos.Y - pp->pos.Y);
|
||||
if (j < dist)
|
||||
dist = j;
|
||||
|
||||
|
@ -641,7 +641,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio)
|
|||
|
||||
// If player is dead still then update at MoveSkip4
|
||||
// rate.
|
||||
if (pp->pos.X == pp->oposx && pp->posy == pp->oposy && pp->posz == pp->oposz)
|
||||
if (pp->pos.X == pp->oposx && pp->pos.Y == pp->oposy && pp->posz == pp->oposz)
|
||||
DoCam = true;
|
||||
|
||||
|
||||
|
@ -655,7 +655,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio)
|
|||
|
||||
if (TEST_BOOL11(sp) && numplayers > 1)
|
||||
{
|
||||
drawroomstotile(cp->pos.X, cp->posy, cp->posz, cp->angle.ang, cp->horizon.horiz, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
drawroomstotile(cp->pos.X, cp->pos.Y, cp->posz, cp->angle.ang, cp->horizon.horiz, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1310,7 +1310,7 @@ int PlayerInitChemBomb(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
|
@ -1734,7 +1734,7 @@ int PlayerInitCaltrops(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
auto spawnedActor = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, pp->cursector,
|
||||
|
|
|
@ -59,7 +59,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
// allowing you to move through wall
|
||||
ang = NORM_ANGLE(pp->angle.ang.asbuild() + sop->clipbox_ang[i]);
|
||||
|
||||
vec3_t spos = { pp->pos.X, pp->posy, z };
|
||||
vec3_t spos = { pp->pos.X, pp->pos.Y, z };
|
||||
|
||||
xvect = sop->clipbox_vdist[i] * bcos(ang);
|
||||
yvect = sop->clipbox_vdist[i] * bsin(ang);
|
||||
|
@ -73,7 +73,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
min_ndx = i;
|
||||
// ox is where it should be
|
||||
opos[i].X = pos[i].X = pp->pos.X + MulScale(sop->clipbox_vdist[i], bcos(ang), 14);
|
||||
opos[i].Y = pos[i].Y = pp->posy + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
|
||||
opos[i].Y = pos[i].Y = pp->pos.Y + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
|
||||
|
||||
// spos.x is where it hit
|
||||
pos[i].X = spos.X;
|
||||
|
@ -113,7 +113,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist)
|
|||
|
||||
// put posx and y off from offset
|
||||
pp->pos.X += pos[min_ndx].X - opos[min_ndx].X;
|
||||
pp->posy += pos[min_ndx].Y - opos[min_ndx].Y;
|
||||
pp->pos.Y += pos[min_ndx].Y - opos[min_ndx].Y;
|
||||
|
||||
return min_ret;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist)
|
|||
{
|
||||
ang = NORM_ANGLE(new_ang + sop->clipbox_ang[i]);
|
||||
|
||||
vec3_t pos = { pp->pos.X, pp->posy, z };
|
||||
vec3_t pos = { pp->pos.X, pp->pos.Y, z };
|
||||
|
||||
xvect = sop->clipbox_vdist[i] * bcos(ang);
|
||||
yvect = sop->clipbox_vdist[i] * bsin(ang);
|
||||
|
@ -203,7 +203,7 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
|||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X += (pp->xvect>>14);
|
||||
pp->posy += (pp->yvect>>14);
|
||||
pp->pos.Y += (pp->yvect>>14);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
|||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X -= (pp->yvect>>15);
|
||||
pp->posy += (pp->xvect>>15);
|
||||
pp->pos.Y += (pp->xvect>>15);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -236,7 +236,7 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy)
|
|||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X += (pp->yvect>>15);
|
||||
pp->posy -= (pp->xvect>>15);
|
||||
pp->pos.Y -= (pp->xvect>>15);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -2360,7 +2360,7 @@ void InitPlayerSprite(PLAYERp pp)
|
|||
COVER_SetReverb(0); // Turn off any echoing that may have been going before
|
||||
pp->Reverb = 0;
|
||||
auto actor = SpawnActor(STAT_PLAYER0 + pnum, NINJA_RUN_R0, nullptr, pp->cursector, pp->pos.X,
|
||||
pp->posy, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
pp->pos.Y, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
|
||||
pp->actor = actor;
|
||||
sp = &actor->s();
|
||||
|
@ -2433,7 +2433,7 @@ void SpawnPlayerUnderSprite(PLAYERp pp)
|
|||
int pnum = int(pp - Player);
|
||||
|
||||
pp->PlayerUnderActor = SpawnActor(STAT_PLAYER_UNDER0 + pnum,
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->pos.X, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
|
||||
sp = &pp->PlayerUnderActor->s();
|
||||
u = pp->PlayerUnderActor->u();
|
||||
|
|
|
@ -52,7 +52,7 @@ BEGIN_SW_NS
|
|||
void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
||||
{
|
||||
Player->oposx = Player->pos.X = x;
|
||||
Player->oposy = Player->posy = y;
|
||||
Player->oposy = Player->pos.Y = y;
|
||||
Player->oposz = Player->posz = z;
|
||||
|
||||
if (ang != INT_MIN)
|
||||
|
|
|
@ -1281,23 +1281,23 @@ void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* sp, int ang)
|
|||
{
|
||||
pp->angle.ang = pp->angle.oang = buildang(ang);
|
||||
pp->pos.X = pp->oposx = pp->oldposx = sp->X;
|
||||
pp->posy = pp->oposy = pp->oldposy = sp->Y;
|
||||
pp->pos.Y = pp->oposy = pp->oldposy = sp->Y;
|
||||
|
||||
//getzsofslopeptr(sp->sector(), pp->posx, pp->posy, &cz, &fz);
|
||||
//pp->posz = pp->oposz = fz - PLAYER_HEIGHT;
|
||||
|
||||
pp->posz = pp->oposz = sp->Z - PLAYER_HEIGHT;
|
||||
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
SET(pp->Flags2, PF2_TELEPORTED);
|
||||
}
|
||||
|
||||
void DoPlayerTeleportToOffset(PLAYERp pp)
|
||||
{
|
||||
pp->oposx = pp->oldposx = pp->pos.X;
|
||||
pp->oposy = pp->oldposy = pp->posy;
|
||||
pp->oposy = pp->oldposy = pp->pos.Y;
|
||||
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
SET(pp->Flags2, PF2_TELEPORTED);
|
||||
}
|
||||
|
||||
|
@ -1370,7 +1370,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp)
|
|||
TAG 5 to 8 = random match locations
|
||||
#endif
|
||||
|
||||
if ((act_warp = Warp(&pp->pos.X, &pp->posy, &pp->posz, &pp->cursector)) == nullptr)
|
||||
if ((act_warp = Warp(&pp->pos.X, &pp->pos.Y, &pp->posz, &pp->cursector)) == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1622,7 +1622,7 @@ void DoPlayerBob(PLAYERp pp)
|
|||
|
||||
dist = 0;
|
||||
|
||||
dist = Distance(pp->pos.X, pp->posy, pp->oldposx, pp->oldposy);
|
||||
dist = Distance(pp->pos.X, pp->pos.Y, pp->oldposx, pp->oldposy);
|
||||
|
||||
if (dist > 512)
|
||||
dist = 0;
|
||||
|
@ -1772,7 +1772,7 @@ void UpdatePlayerSprite(PLAYERp pp)
|
|||
// Update sprite representation of player
|
||||
|
||||
sp->pos.X = pp->pos.X;
|
||||
sp->pos.Y = pp->posy;
|
||||
sp->pos.Y = pp->pos.Y;
|
||||
|
||||
// there are multiple death functions
|
||||
if (TEST(pp->Flags, PF_DEAD))
|
||||
|
@ -1967,7 +1967,7 @@ void PlayerCheckValidMove(PLAYERp pp)
|
|||
static int count = 0;
|
||||
|
||||
pp->pos.X = pp->oldposx;
|
||||
pp->posy = pp->oldposy;
|
||||
pp->pos.Y = pp->oldposy;
|
||||
pp->posz = pp->oldposz;
|
||||
pp->cursector = pp->lastcursector;
|
||||
|
||||
|
@ -1995,7 +1995,7 @@ void PlayerSectorBound(PLAYERp pp, int amt)
|
|||
// called from DoPlayerMove() but can be called
|
||||
// from anywhere it is needed
|
||||
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->posy, &cz, &fz);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
|
||||
|
||||
if (pp->posz > fz - amt)
|
||||
pp->posz = fz - amt;
|
||||
|
@ -2032,7 +2032,7 @@ void DoPlayerMove(PLAYERp pp)
|
|||
}
|
||||
|
||||
pp->oldposx = pp->pos.X;
|
||||
pp->oldposy = pp->posy;
|
||||
pp->oldposy = pp->pos.Y;
|
||||
pp->oldposz = pp->posz;
|
||||
pp->lastcursector = pp->cursector;
|
||||
|
||||
|
@ -2082,11 +2082,11 @@ void DoPlayerMove(PLAYERp pp)
|
|||
if (interpolate_ride)
|
||||
{
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
}
|
||||
pp->pos.X += pp->xvect >> 14;
|
||||
pp->posy += pp->yvect >> 14;
|
||||
updatesector(pp->pos.X, pp->posy, §);
|
||||
pp->pos.Y += pp->yvect >> 14;
|
||||
updatesector(pp->pos.X, pp->pos.Y, §);
|
||||
if (sect != nullptr)
|
||||
pp->cursector = sect;
|
||||
}
|
||||
|
@ -2109,13 +2109,13 @@ void DoPlayerMove(PLAYERp pp)
|
|||
if (interpolate_ride)
|
||||
{
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
}
|
||||
|
||||
auto save_cstat = sp->cstat;
|
||||
RESET(sp->cstat, CSTAT_SPRITE_BLOCK);
|
||||
Collision coll;
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
clipmove(pp->pos, &pp->cursector, pp->xvect, pp->yvect, ((int)sp->clipdist<<2), pp->ceiling_dist, pp->floor_dist, CLIPMASK_PLAYER, coll);
|
||||
|
||||
sp->cstat = save_cstat;
|
||||
|
@ -2143,7 +2143,7 @@ void DoPlayerMove(PLAYERp pp)
|
|||
}
|
||||
|
||||
// check for warp - probably can remove from CeilingHit
|
||||
if (WarpPlane(&pp->pos.X, &pp->posy, &pp->posz, &pp->cursector))
|
||||
if (WarpPlane(&pp->pos.X, &pp->pos.Y, &pp->posz, &pp->cursector))
|
||||
{
|
||||
PlayerWarpUpdatePos(pp);
|
||||
}
|
||||
|
@ -2193,21 +2193,21 @@ void DoPlayerSectorUpdatePreMove(PLAYERp pp)
|
|||
|
||||
if (TEST(pp->cursector->extra, SECTFX_DYNAMIC_AREA))
|
||||
{
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->posz, §);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->posz, §);
|
||||
if (sect == nullptr)
|
||||
{
|
||||
sect = pp->cursector;
|
||||
updatesector(pp->pos.X, pp->posy, §);
|
||||
updatesector(pp->pos.X, pp->pos.Y, §);
|
||||
}
|
||||
ASSERT(sect);
|
||||
}
|
||||
else if (FAF_ConnectArea(sect))
|
||||
{
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->posz, §);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->posz, §);
|
||||
if (sect == nullptr)
|
||||
{
|
||||
sect = pp->cursector;
|
||||
updatesector(pp->pos.X, pp->posy, §);
|
||||
updatesector(pp->pos.X, pp->pos.Y, §);
|
||||
}
|
||||
ASSERT(sect);
|
||||
}
|
||||
|
@ -2223,7 +2223,7 @@ void DoPlayerSectorUpdatePostMove(PLAYERp pp)
|
|||
// need to do updatesectorz if in connect area
|
||||
if (sect != nullptr && FAF_ConnectArea(sect))
|
||||
{
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->posz, &pp->cursector);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->posz, &pp->cursector);
|
||||
|
||||
// can mess up if below
|
||||
if (!pp->insector())
|
||||
|
@ -2231,7 +2231,7 @@ void DoPlayerSectorUpdatePostMove(PLAYERp pp)
|
|||
pp->setcursector(sect);
|
||||
|
||||
// adjust the posz to be in a sector
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->posy, &cz, &fz);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
|
||||
if (pp->posz > fz)
|
||||
pp->posz = fz;
|
||||
|
||||
|
@ -2239,7 +2239,7 @@ void DoPlayerSectorUpdatePostMove(PLAYERp pp)
|
|||
pp->posz = cz;
|
||||
|
||||
// try again
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->posz, &pp->cursector);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->posz, &pp->cursector);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2380,16 +2380,16 @@ void SetupDriveCrush(PLAYERp pp, int *x, int *y)
|
|||
int radius = pp->sop_control->clipdist;
|
||||
|
||||
x[0] = pp->pos.X - radius;
|
||||
y[0] = pp->posy - radius;
|
||||
y[0] = pp->pos.Y - radius;
|
||||
|
||||
x[1] = pp->pos.X + radius;
|
||||
y[1] = pp->posy - radius;
|
||||
y[1] = pp->pos.Y - radius;
|
||||
|
||||
x[2] = pp->pos.X + radius;
|
||||
y[2] = pp->posy + radius;
|
||||
y[2] = pp->pos.Y + radius;
|
||||
|
||||
x[3] = pp->pos.X - radius;
|
||||
y[3] = pp->posy + radius;
|
||||
y[3] = pp->pos.Y + radius;
|
||||
}
|
||||
|
||||
void DriveCrush(PLAYERp pp, int *x, int *y)
|
||||
|
@ -2716,7 +2716,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
RESET(psp->cstat, CSTAT_SPRITE_BLOCK);
|
||||
if (pp->sop->clipdist)
|
||||
{
|
||||
vec3_t clippos = { pp->pos.X, pp->posy, z };
|
||||
vec3_t clippos = { pp->pos.X, pp->pos.Y, z };
|
||||
Collision coll;
|
||||
clipmove(clippos, &pp->cursector, pp->xvect, pp->yvect, (int)pp->sop->clipdist, Z(4), floor_dist, CLIPMASK_PLAYER, u->coll);
|
||||
|
||||
|
@ -2750,7 +2750,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
|||
}
|
||||
}
|
||||
|
||||
OperateSectorObject(pp->sop, pp->angle.ang.asbuild(), pp->pos.X, pp->posy);
|
||||
OperateSectorObject(pp->sop, pp->angle.ang.asbuild(), pp->pos.X, pp->pos.Y);
|
||||
pp->cursector = save_sect; // for speed
|
||||
|
||||
if (!SyncInput())
|
||||
|
@ -3001,7 +3001,7 @@ void StackedWaterSplash(PLAYERp pp)
|
|||
auto sect = pp->cursector;
|
||||
|
||||
auto psp = &pp->Actor()->s();
|
||||
updatesectorz(pp->pos.X, pp->posy, SPRITEp_BOS(psp), §);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, SPRITEp_BOS(psp), §);
|
||||
|
||||
if (SectorIsUnderwaterArea(sect))
|
||||
{
|
||||
|
@ -3240,15 +3240,15 @@ void DoPlayerClimb(PLAYERp pp)
|
|||
pp->pos.X = pp->lx;
|
||||
}
|
||||
|
||||
if (pp->posy != pp->ly)
|
||||
if (pp->pos.Y != pp->ly)
|
||||
{
|
||||
if (pp->posy < pp->ly)
|
||||
pp->posy += ADJ_AMT;
|
||||
else if (pp->posy > pp->ly)
|
||||
pp->posy -= ADJ_AMT;
|
||||
if (pp->pos.Y < pp->ly)
|
||||
pp->pos.Y += ADJ_AMT;
|
||||
else if (pp->pos.Y > pp->ly)
|
||||
pp->pos.Y -= ADJ_AMT;
|
||||
|
||||
if (labs(pp->posy - pp->ly) <= ADJ_AMT)
|
||||
pp->posy = pp->ly;
|
||||
if (labs(pp->pos.Y - pp->ly) <= ADJ_AMT)
|
||||
pp->pos.Y = pp->ly;
|
||||
}
|
||||
|
||||
// sprite
|
||||
|
@ -3369,11 +3369,11 @@ void DoPlayerClimb(PLAYERp pp)
|
|||
|
||||
if (FAF_ConnectArea(pp->cursector))
|
||||
{
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->posz, &pp->cursector);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->posz, &pp->cursector);
|
||||
LadderUpdate = true;
|
||||
}
|
||||
|
||||
if (WarpPlane(&pp->pos.X, &pp->posy, &pp->posz, &pp->cursector))
|
||||
if (WarpPlane(&pp->pos.X, &pp->pos.Y, &pp->posz, &pp->cursector))
|
||||
{
|
||||
PlayerWarpUpdatePos(pp);
|
||||
LadderUpdate = true;
|
||||
|
@ -3426,7 +3426,7 @@ int DoPlayerWadeSuperJump(PLAYERp pp)
|
|||
|
||||
for (i = 0; i < SIZ(angs); i++)
|
||||
{
|
||||
FAFhitscan(pp->pos.X, pp->posy, zh, pp->cursector, // Start position
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, zh, pp->cursector, // Start position
|
||||
bcos(pp->angle.ang.asbuild() + angs[i]), // X vector of 3D ang
|
||||
bsin(pp->angle.ang.asbuild() + angs[i]), // Y vector of 3D ang
|
||||
0, hit, CLIPMASK_MISSILE); // Z vector of 3D ang
|
||||
|
@ -3437,7 +3437,7 @@ int DoPlayerWadeSuperJump(PLAYERp pp)
|
|||
|
||||
if (hit.hitSector != nullptr && labs(hit.hitSector->floorz - pp->posz) < Z(50))
|
||||
{
|
||||
if (Distance(pp->pos.X, pp->posy, hit.hitpos.X, hit.hitpos.Y) < ((((int)pp->Actor()->spr.clipdist)<<2) + 256))
|
||||
if (Distance(pp->pos.X, pp->pos.Y, hit.hitpos.X, hit.hitpos.Y) < ((((int)pp->Actor()->spr.clipdist)<<2) + 256))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -3604,7 +3604,7 @@ void PlayerWarpUpdatePos(PLAYERp pp)
|
|||
return;
|
||||
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->oposz = pp->posz;
|
||||
DoPlayerZrange(pp);
|
||||
UpdatePlayerSprite(pp);
|
||||
|
@ -3748,13 +3748,13 @@ bool PlayerOnLadder(PLAYERp pp)
|
|||
if (near.hitWall == nullptr || near.hitpos.X < 100 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
return false;
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->posy, pp->posz, pp->cursector,
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->posz, pp->cursector,
|
||||
bcos(pp->angle.ang.asbuild() + angles[i]),
|
||||
bsin(pp->angle.ang.asbuild() + angles[i]),
|
||||
0,
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
dist = DIST(pp->pos.X, pp->posy, hit.hitpos.X, hit.hitpos.Y);
|
||||
dist = DIST(pp->pos.X, pp->pos.Y, hit.hitpos.X, hit.hitpos.Y);
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
|
@ -3870,7 +3870,7 @@ int PlayerCanDiveNoWarp(PLAYERp pp)
|
|||
{
|
||||
auto sect = pp->cursector;
|
||||
|
||||
updatesectorz(pp->pos.X, pp->posy, SPRITEp_BOS(&pp->Actor()->s()), §);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, SPRITEp_BOS(&pp->Actor()->s()), §);
|
||||
|
||||
if (SectorIsUnderwaterArea(sect))
|
||||
{
|
||||
|
@ -4101,16 +4101,16 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
|||
|
||||
// get the offset from the sprite
|
||||
u->sx = over_sp->pos.X - pp->pos.X;
|
||||
u->sy = over_sp->pos.Y - pp->posy;
|
||||
u->sy = over_sp->pos.Y - pp->pos.Y;
|
||||
|
||||
// update to the new x y position
|
||||
pp->pos.X = under_sp->pos.X - u->sx;
|
||||
pp->posy = under_sp->pos.Y - u->sy;
|
||||
pp->pos.Y = under_sp->pos.Y - u->sy;
|
||||
|
||||
auto over = over_sp->sector();
|
||||
auto under = under_sp->sector();
|
||||
|
||||
if (GetOverlapSector(pp->pos.X, pp->posy, &over, &under) == 2)
|
||||
if (GetOverlapSector(pp->pos.X, pp->pos.Y, &over, &under) == 2)
|
||||
{
|
||||
pp->setcursector(under);
|
||||
}
|
||||
|
@ -4120,7 +4120,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp)
|
|||
pp->posz = under_sp->sector()->ceilingz + Z(6);
|
||||
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->oposz = pp->posz;
|
||||
|
||||
DoPlayerZrange(pp);
|
||||
|
@ -4175,16 +4175,16 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
|||
|
||||
// get the offset from the under sprite
|
||||
u->sx = under_sp->pos.X - pp->pos.X;
|
||||
u->sy = under_sp->pos.Y - pp->posy;
|
||||
u->sy = under_sp->pos.Y - pp->pos.Y;
|
||||
|
||||
// update to the new x y position
|
||||
pp->pos.X = over_sp->pos.X - u->sx;
|
||||
pp->posy = over_sp->pos.Y - u->sy;
|
||||
pp->pos.Y = over_sp->pos.Y - u->sy;
|
||||
|
||||
auto over = over_sp->sector();
|
||||
auto under = under_sp->sector();
|
||||
|
||||
if (GetOverlapSector(pp->pos.X, pp->posy, &over, &under))
|
||||
if (GetOverlapSector(pp->pos.X, pp->pos.Y, &over, &under))
|
||||
{
|
||||
pp->setcursector(over);
|
||||
}
|
||||
|
@ -4198,7 +4198,7 @@ void DoPlayerWarpToSurface(PLAYERp pp)
|
|||
pp->posz -= Z(pp->WadeDepth);
|
||||
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->oposz = pp->posz;
|
||||
|
||||
return;
|
||||
|
@ -4492,7 +4492,7 @@ void DoPlayerDive(PLAYERp pp)
|
|||
auto sect = pp->cursector;
|
||||
|
||||
// check for sector above to see if it is an underwater sector also
|
||||
updatesectorz(pp->pos.X, pp->posy, pp->cursector->ceilingz - Z(8), §);
|
||||
updatesectorz(pp->pos.X, pp->pos.Y, pp->cursector->ceilingz - Z(8), §);
|
||||
|
||||
if (!SectorIsUnderwaterArea(sect))
|
||||
{
|
||||
|
@ -4991,9 +4991,9 @@ void DoPlayerBeginOperate(PLAYERp pp)
|
|||
|
||||
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
||||
pp->pos.X = sop->xmid;
|
||||
pp->posy = sop->ymid;
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->posy, &cz, &fz);
|
||||
pp->pos.Y = sop->ymid;
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
|
||||
pp->posz = fz - PLAYER_HEIGHT;
|
||||
|
||||
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
|
||||
|
@ -5076,9 +5076,9 @@ void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop)
|
|||
|
||||
pp->angle.oang = pp->angle.ang = buildang(sop->ang);
|
||||
pp->pos.X = sop->xmid;
|
||||
pp->posy = sop->ymid;
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->posy, &cz, &fz);
|
||||
pp->pos.Y = sop->ymid;
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
|
||||
pp->posz = fz - PLAYER_HEIGHT;
|
||||
|
||||
RESET(pp->Flags, PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_LOCK_CRAWL);
|
||||
|
@ -5132,7 +5132,7 @@ void PlayerToRemote(PLAYERp pp)
|
|||
pp->remote.lastcursectp = pp->lastcursector;
|
||||
|
||||
pp->remote.posx = pp->pos.X;
|
||||
pp->remote.posy = pp->posy;
|
||||
pp->remote.posy = pp->pos.Y;
|
||||
pp->remote.posz = pp->posz;
|
||||
|
||||
pp->remote.xvect = pp->xvect;
|
||||
|
@ -5149,7 +5149,7 @@ void RemoteToPlayer(PLAYERp pp)
|
|||
pp->lastcursector = pp->remote.lastcursectp;
|
||||
|
||||
pp->pos.X = pp->remote.posx;
|
||||
pp->posy = pp->remote.posy;
|
||||
pp->pos.Y = pp->remote.posy;
|
||||
pp->posz = pp->remote.posz;
|
||||
|
||||
pp->xvect = pp->remote.xvect;
|
||||
|
@ -5167,7 +5167,7 @@ void PlayerRemoteReset(PLAYERp pp, sectortype* sect)
|
|||
|
||||
auto rsp = &pp->remoteActor->s();
|
||||
pp->pos.X = rsp->pos.X;
|
||||
pp->posy = rsp->pos.Y;
|
||||
pp->pos.Y = rsp->pos.Y;
|
||||
pp->posz = sect->floorz - PLAYER_HEIGHT;
|
||||
|
||||
pp->xvect = pp->yvect = pp->oxvect = pp->oyvect = pp->slide_xvect = pp->slide_yvect = 0;
|
||||
|
@ -5199,7 +5199,7 @@ void DoPlayerStopOperate(PLAYERp pp)
|
|||
if (TEST_BOOL1(rsp))
|
||||
pp->angle.ang = pp->angle.oang = buildang(rsp->ang);
|
||||
else
|
||||
pp->angle.ang = pp->angle.oang = bvectangbam(pp->sop_remote->xmid - pp->pos.X, pp->sop_remote->ymid - pp->posy);
|
||||
pp->angle.ang = pp->angle.oang = bvectangbam(pp->sop_remote->xmid - pp->pos.X, pp->sop_remote->ymid - pp->pos.Y);
|
||||
}
|
||||
|
||||
if (pp->sop_control)
|
||||
|
@ -5797,9 +5797,9 @@ void DoPlayerDeathFollowKiller(PLAYERp pp)
|
|||
{
|
||||
SPRITEp kp = &pp->KillerActor->s();
|
||||
|
||||
if (FAFcansee(kp->pos.X, kp->pos.Y, SPRITEp_TOS(kp), kp->sector(), pp->pos.X, pp->posy, pp->posz, pp->cursector))
|
||||
if (FAFcansee(kp->pos.X, kp->pos.Y, SPRITEp_TOS(kp), kp->sector(), pp->pos.X, pp->pos.Y, pp->posz, pp->cursector))
|
||||
{
|
||||
pp->angle.addadjustment(getincanglebam(pp->angle.ang, bvectangbam(kp->pos.X - pp->pos.X, kp->pos.Y - pp->posy)) >> 4);
|
||||
pp->angle.addadjustment(getincanglebam(pp->angle.ang, bvectangbam(kp->pos.X - pp->pos.X, kp->pos.Y - pp->pos.Y)) >> 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5835,7 +5835,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
|
|||
sp->xrepeat = sp->yrepeat = PLAYER_NINJA_XREPEAT;
|
||||
RESET(sp->cstat, CSTAT_SPRITE_YCENTER);
|
||||
sp->pos.X = pp->pos.X;
|
||||
sp->pos.Y = pp->posy;
|
||||
sp->pos.Y = pp->pos.Y;
|
||||
sp->pos.Z = pp->posz+PLAYER_HEIGHT;
|
||||
sp->ang = pp->angle.ang.asbuild();
|
||||
|
||||
|
@ -6011,24 +6011,24 @@ void DoPlayerDeathMoveHead(PLAYERp pp)
|
|||
}
|
||||
|
||||
pp->pos.X = sp->pos.X;
|
||||
pp->posy = sp->pos.Y;
|
||||
pp->pos.Y = sp->pos.Y;
|
||||
pp->setcursector(sp->sector());
|
||||
|
||||
// try to stay in valid area - death sometimes throws you out of the map
|
||||
auto sect = pp->cursector;
|
||||
updatesector(pp->pos.X, pp->posy, §);
|
||||
updatesector(pp->pos.X, pp->pos.Y, §);
|
||||
if (sect == nullptr)
|
||||
{
|
||||
pp->cursector = pp->lv_sector;
|
||||
ChangeActorSect(pp->Actor(), pp->lv_sector);
|
||||
pp->pos.X = sp->pos.X = pp->lv_x;
|
||||
pp->posy = sp->pos.Y = pp->lv_y;
|
||||
pp->pos.Y = sp->pos.Y = pp->lv_y;
|
||||
}
|
||||
else
|
||||
{
|
||||
pp->lv_sector = sect;
|
||||
pp->lv_x = pp->pos.X;
|
||||
pp->lv_y = pp->posy;
|
||||
pp->lv_y = pp->pos.Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6486,7 +6486,7 @@ void MoveSkipSavePos(void)
|
|||
pp = Player + pnum;
|
||||
|
||||
pp->oposx = pp->pos.X;
|
||||
pp->oposy = pp->posy;
|
||||
pp->oposy = pp->pos.Y;
|
||||
pp->oposz = pp->posz;
|
||||
pp->obob_z = pp->bob_z;
|
||||
pp->angle.backup();
|
||||
|
@ -6755,7 +6755,7 @@ void domovethings(void)
|
|||
if (numplayers <= 1 && PlayerTrackingMode && pnum == screenpeek && screenpeek != myconnectindex)
|
||||
{
|
||||
int deltax = Player[myconnectindex].pos.X - Player[screenpeek].pos.X;
|
||||
int deltay = Player[myconnectindex].posy - Player[screenpeek].posy;
|
||||
int deltay = Player[myconnectindex].pos.Y - Player[screenpeek].pos.Y;
|
||||
Player[screenpeek].angle.settarget(bvectangbam(deltax, deltay));
|
||||
}
|
||||
|
||||
|
@ -6826,7 +6826,7 @@ void InitAllPlayers(void)
|
|||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||
{
|
||||
pp->pos.X = pp->oposx = pfirst->pos.X;
|
||||
pp->posy = pp->oposy = pfirst->posy;
|
||||
pp->pos.Y = pp->oposy = pfirst->pos.Y;
|
||||
pp->posz = pp->oposz = pfirst->posz;
|
||||
pp->angle.ang = pp->angle.oang = pfirst->angle.ang;
|
||||
pp->horizon.horiz = pp->horizon.ohoriz = pfirst->horizon.horiz;
|
||||
|
@ -6900,7 +6900,7 @@ int SearchSpawnPosition(PLAYERp pp)
|
|||
|
||||
if (opp != pp) // don't test for yourself
|
||||
{
|
||||
if (FindDistance3D(sp->pos.X - opp->pos.X, sp->pos.Y - opp->posy, sp->pos.Z - opp->posz) < 1000)
|
||||
if (FindDistance3D(sp->pos.X - opp->pos.X, sp->pos.Y - opp->pos.Y, sp->pos.Z - opp->posz) < 1000)
|
||||
{
|
||||
blocked = true;
|
||||
break;
|
||||
|
@ -6983,12 +6983,12 @@ void PlayerSpawnPosition(PLAYERp pp)
|
|||
|
||||
|
||||
pp->pos.X = pp->oposx = sp->pos.X;
|
||||
pp->posy = pp->oposy = sp->pos.Y;
|
||||
pp->pos.Y = pp->oposy = sp->pos.Y;
|
||||
pp->posz = pp->oposz = sp->pos.Z;
|
||||
pp->angle.ang = pp->angle.oang = buildang(sp->ang);
|
||||
pp->setcursector(sp->sector());
|
||||
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->posy, &cz, &fz);
|
||||
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);
|
||||
// if too close to the floor - stand up
|
||||
if (pp->posz > fz - PLAYER_HEIGHT)
|
||||
{
|
||||
|
@ -7045,7 +7045,7 @@ void InitMultiPlayerInfo(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
auto start0 = SpawnActor(MultiStatList[stat], ST1, nullptr, pp->cursector, pp->pos.X, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
auto start0 = SpawnActor(MultiStatList[stat], ST1, nullptr, pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
start0->clearUser();
|
||||
start0->spr.picnum = ST1;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *a
|
|||
{
|
||||
auto sp = &actor->s();
|
||||
|
||||
dist = FindDistance3D(pp->pos.X - sp->pos.X, pp->posy - sp->pos.Y, pp->posz - sp->pos.Z);
|
||||
dist = FindDistance3D(pp->pos.X - sp->pos.X, pp->pos.Y - sp->pos.Y, pp->posz - sp->pos.Z);
|
||||
|
||||
// shake whole level
|
||||
if (QUAKE_TestDontTaper(sp))
|
||||
|
@ -258,7 +258,7 @@ void SpawnQuake(sectortype* sect, int x, int y, int z,
|
|||
|
||||
bool SetQuake(PLAYERp pp, short tics, short amt)
|
||||
{
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->posy, pp->posz, tics, amt, 30000);
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, tics, amt, 30000);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ int SetGunQuake(DSWActor* actor)
|
|||
|
||||
int SetPlayerQuake(PLAYERp pp)
|
||||
{
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->posy, pp->posz, 40, 8, 40000);
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, 40, 8, 40000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -435,7 +435,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, P
|
|||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("x", w.pos.X)
|
||||
("y", w.posy)
|
||||
("y", w.pos.Y)
|
||||
("z", w.posz)
|
||||
("lv_sectnum", w.lv_sector)
|
||||
("lv_x", w.lv_x)
|
||||
|
|
|
@ -1451,7 +1451,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
{
|
||||
pp = GlobPlayerP;
|
||||
|
||||
if (!FAFcansee(pp->pos.X, pp->posy, pp->posz, pp->cursector, sp->pos.X, sp->pos.Y, sp->pos.Z - DIV2(SPRITEp_SIZE_Z(sp)), sp->sector()))
|
||||
if (!FAFcansee(pp->pos.X, pp->pos.Y, pp->posz, pp->cursector, sp->pos.X, sp->pos.Y, sp->pos.Z - DIV2(SPRITEp_SIZE_Z(sp)), sp->sector()))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1923,7 +1923,7 @@ void OperateTripTrigger(PLAYERp pp)
|
|||
|
||||
if (TEST(u->Flags, SPR_WAIT_FOR_TRIGGER))
|
||||
{
|
||||
if (Distance(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy) < dist)
|
||||
if (Distance(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y) < dist)
|
||||
{
|
||||
u->targetActor = pp->Actor();
|
||||
RESET(u->Flags, SPR_WAIT_FOR_TRIGGER);
|
||||
|
@ -2054,7 +2054,7 @@ bool NearThings(PLAYERp pp)
|
|||
HitInfo hit{};
|
||||
short dang = pp->angle.ang.asbuild();
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->posy, pp->posz - Z(30), pp->cursector, // Start position
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->posz - Z(30), pp->cursector, // Start position
|
||||
bcos(dang), // X vector of 3D ang
|
||||
bsin(dang), // Y vector of 3D ang
|
||||
0, // Z vector of 3D ang
|
||||
|
@ -2063,7 +2063,7 @@ bool NearThings(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return false;
|
||||
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.Y, pp->pos.X, pp->posy) > 1500)
|
||||
if (Distance(hit.hitpos.X, hit.hitpos.Y, pp->pos.X, pp->pos.Y) > 1500)
|
||||
return false;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -2104,7 +2104,7 @@ void NearTagList(NEAR_TAG_INFOp ntip, PLAYERp pp, int z, int dist, int type, int
|
|||
HitInfo near;
|
||||
|
||||
|
||||
neartag({ pp->pos.X, pp->posy, z }, pp->cursector, pp->angle.ang.asbuild(), near, dist, type);
|
||||
neartag({ pp->pos.X, pp->pos.Y, z }, pp->cursector, pp->angle.ang.asbuild(), near, dist, type);
|
||||
|
||||
if (near.hitSector != nullptr)
|
||||
{
|
||||
|
@ -2221,7 +2221,7 @@ int DoPlayerGrabStar(PLAYERp pp)
|
|||
{
|
||||
sp = &StarQueue[i]->s();
|
||||
|
||||
if (FindDistance3D(sp->pos.X - pp->pos.X, sp->pos.Y - pp->posy, sp->pos.Z - pp->posz + Z(12)) < 500)
|
||||
if (FindDistance3D(sp->pos.X - pp->pos.X, sp->pos.Y - pp->pos.Y, sp->pos.Z - pp->posz + Z(12)) < 500)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -2764,7 +2764,7 @@ void DoSector(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
DISTANCE(pp->pos.X, pp->posy, sop->xmid, sop->ymid, dist, a, b, c);
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, sop->xmid, sop->ymid, dist, a, b, c);
|
||||
if (dist < min_dist)
|
||||
min_dist = dist;
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ short SoundDist(int x, int y, int z, int basedist)
|
|||
extern short screenpeek;
|
||||
|
||||
tx = fabs(Player[screenpeek].pos.X - x);
|
||||
ty = fabs(Player[screenpeek].posy - y);
|
||||
ty = fabs(Player[screenpeek].pos.Y - y);
|
||||
tz = fabs((Player[screenpeek].posz - z) >> 4);
|
||||
|
||||
// Use the Pythagreon Theorem to compute the magnitude of a 3D vector
|
||||
|
@ -382,7 +382,7 @@ static void UpdateAmbients()
|
|||
if (sdist < 255 && amb->vocIndex == DIGI_WHIPME)
|
||||
{
|
||||
PLAYERp pp = Player + screenpeek;
|
||||
if (!FAFcansee(sp->pos.X, sp->pos.Y, sp->pos.Z, sp->sector(), pp->pos.X, pp->posy, pp->posz, pp->cursector))
|
||||
if (!FAFcansee(sp->pos.X, sp->pos.Y, sp->pos.Z, sp->sector(), pp->pos.X, pp->pos.Y, pp->posz, pp->cursector))
|
||||
{
|
||||
sdist = 255;
|
||||
}
|
||||
|
@ -560,7 +560,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
// Can the ambient sound see the player? If not, tone it down some.
|
||||
if ((chanflags & CHANF_LOOP))
|
||||
{
|
||||
if (!FAFcansee(vpos->X, vpos->Y, vpos->Z, sp->sector(), pp->pos.X, pp->posy, pp->posz, pp->cursector))
|
||||
if (!FAFcansee(vpos->X, vpos->Y, vpos->Z, sp->sector(), pp->pos.X, pp->pos.Y, pp->posz, pp->cursector))
|
||||
{
|
||||
auto distvec = npos - campos;
|
||||
npos = campos + distvec * 1.75f; // Play more quietly
|
||||
|
@ -603,7 +603,7 @@ void GameInterface::UpdateSounds(void)
|
|||
if (TEST_BOOL1(rsp))
|
||||
tang = buildang(rsp->ang);
|
||||
else
|
||||
tang = bvectangbam(pp->sop_remote->xmid - pp->pos.X, pp->sop_remote->ymid - pp->posy);
|
||||
tang = bvectangbam(pp->sop_remote->xmid - pp->pos.X, pp->sop_remote->ymid - pp->pos.Y);
|
||||
}
|
||||
else tang = pp->angle.ang;
|
||||
|
||||
|
|
|
@ -1530,9 +1530,9 @@ void PreMapCombineFloors(void)
|
|||
if (itsect == dasect)
|
||||
{
|
||||
pp->pos.X += dx;
|
||||
pp->posy += dy;
|
||||
pp->pos.Y += dy;
|
||||
pp->oposx = pp->oldposx = pp->pos.X;
|
||||
pp->oposy = pp->oldposy = pp->posy;
|
||||
pp->oposy = pp->oldposy = pp->pos.Y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5214,7 +5214,7 @@ int DoGet(DSWActor* actor)
|
|||
if (TEST(pp->Flags, PF_DEAD))
|
||||
continue;
|
||||
|
||||
DISTANCE(pp->pos.X, pp->posy, sp->pos.X, sp->pos.Y, dist, a,b,c);
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, sp->pos.X, sp->pos.Y, dist, a,b,c);
|
||||
if ((unsigned)dist > (pu->Radius + u->Radius))
|
||||
{
|
||||
continue;
|
||||
|
@ -5228,7 +5228,7 @@ int DoGet(DSWActor* actor)
|
|||
auto cstat_bak = sp->cstat;
|
||||
SET(sp->cstat, CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
can_see = FAFcansee(sp->pos.X, sp->pos.Y, sp->pos.Z, sp->sector(),
|
||||
pp->pos.X, pp->posy, pp->posz, pp->cursector);
|
||||
pp->pos.X, pp->pos.Y, pp->posz, pp->cursector);
|
||||
sp->cstat = cstat_bak;
|
||||
|
||||
if (!can_see)
|
||||
|
@ -6261,7 +6261,7 @@ void SpriteControl(void)
|
|||
pp = &Player[pnum];
|
||||
|
||||
// Only update the ones closest
|
||||
DISTANCE(pp->pos.X, pp->posy, sp->pos.X, sp->pos.Y, dist, tx, ty, tmin);
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, sp->pos.X, sp->pos.Y, dist, tx, ty, tmin);
|
||||
|
||||
AdjustActiveRange(pp, actor, dist);
|
||||
|
||||
|
|
|
@ -838,7 +838,7 @@ void BossHealthMeter(void)
|
|||
sp = &BossSpriteNum[i]->s();
|
||||
u = BossSpriteNum[i]->u();
|
||||
|
||||
if (cansee(sp->pos.X, sp->pos.Y, SPRITEp_TOS(sp), sp->sector(), pp->pos.X, pp->posy, pp->posz - Z(40), pp->cursector))
|
||||
if (cansee(sp->pos.X, sp->pos.Y, SPRITEp_TOS(sp), sp->sector(), pp->pos.X, pp->pos.Y, pp->posz - Z(40), pp->cursector))
|
||||
{
|
||||
if (i == 0 && !bosswasseen[0])
|
||||
{
|
||||
|
|
|
@ -1588,14 +1588,14 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveX = pp->pos.X;
|
||||
pp->RevolveY = pp->posy;
|
||||
pp->RevolveY = pp->pos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
pp->RevolveDeltaAng = 0;
|
||||
}
|
||||
|
||||
pp->pos.X += nx;
|
||||
pp->posy += ny;
|
||||
pp->pos.Y += ny;
|
||||
|
||||
if (TEST(sop->flags, SOBJ_DONT_ROTATE))
|
||||
{
|
||||
|
@ -1612,7 +1612,7 @@ void MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
|
|||
// know where he was last
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveX = pp->pos.X;
|
||||
pp->RevolveY = pp->posy;
|
||||
pp->RevolveY = pp->pos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
pp->RevolveDeltaAng = 0;
|
||||
|
@ -1851,7 +1851,7 @@ PlayerPart:
|
|||
// prevents you from falling into map HOLEs created by moving
|
||||
// Sectors and sprites around.
|
||||
//if (sop->xmid < MAXSO)
|
||||
updatesector(pp->pos.X, pp->posy, &pp->cursector);
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
|
||||
// in case you are in a whirlpool
|
||||
// move perfectly with the ride in the z direction
|
||||
|
@ -3542,7 +3542,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
{
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (Distance(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy) < u->Dist)
|
||||
if (Distance(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y) < u->Dist)
|
||||
{
|
||||
u->targetActor = pp->Actor();
|
||||
RESET(u->Flags, SPR_WAIT_FOR_PLAYER);
|
||||
|
|
|
@ -117,7 +117,7 @@ void VisViewChange(PLAYERp pp, int *vis)
|
|||
}
|
||||
|
||||
// save off the brightest vis that you can see
|
||||
if (FAFcansee(pp->pos.X, pp->posy, pp->posz, pp->cursector, x, y, z, sectp))
|
||||
if (FAFcansee(pp->pos.X, pp->pos.Y, pp->posz, pp->cursector, x, y, z, sectp))
|
||||
{
|
||||
if (VIS_VisCur(sp) < BrightestVis)
|
||||
BrightestVis = VIS_VisCur(sp);
|
||||
|
|
|
@ -11832,7 +11832,7 @@ void InitSpellRing(PLAYERp pp)
|
|||
|
||||
for (missiles = 0, ang = ang_start; missiles < max_missiles; ang += ang_diff, missiles++)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, FIREBALL1, s_Ring, pp->cursector, pp->pos.X, pp->posy, pp->posz, ang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, FIREBALL1, s_Ring, pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, ang, 0);
|
||||
|
||||
sp = &actorNew->s();
|
||||
|
||||
|
@ -12214,7 +12214,7 @@ void InitSpellNapalm(PLAYERp pp)
|
|||
for (i = 0; i < SIZ(mp); i++)
|
||||
{
|
||||
auto actor = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, pp->cursector,
|
||||
pp->pos.X, pp->posy, pp->posz + Z(12), pp->angle.ang.asbuild(), NAPALM_VELOCITY*2);
|
||||
pp->pos.X, pp->pos.Y, pp->posz + Z(12), pp->angle.ang.asbuild(), NAPALM_VELOCITY*2);
|
||||
|
||||
sp = &actor->s();
|
||||
u = actor->u();
|
||||
|
@ -12366,7 +12366,7 @@ int InitSpellMirv(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Mirv, pp->cursector,
|
||||
pp->pos.X, pp->posy, pp->posz + Z(12), pp->angle.ang.asbuild(), MIRV_VELOCITY);
|
||||
pp->pos.X, pp->pos.Y, pp->posz + Z(12), pp->angle.ang.asbuild(), MIRV_VELOCITY);
|
||||
|
||||
sp = &actorNew->s();
|
||||
u = actorNew->u();
|
||||
|
@ -12506,7 +12506,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
if (!TEST(sp->extra, SPRX_PLAYER_OR_ENEMY))
|
||||
continue;
|
||||
|
||||
dist = Distance(pp->pos.X, pp->posy, sp->pos.X, sp->pos.Y);
|
||||
dist = Distance(pp->pos.X, pp->pos.Y, sp->pos.X, sp->pos.Y);
|
||||
|
||||
reach = 1000; // !JIM! was 800
|
||||
face = 200;
|
||||
|
@ -12531,7 +12531,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
daang = pp->angle.ang.asbuild();
|
||||
daz = -MulScale(pp->horizon.horiz.asq16(), 2000, 16) + (RandomRange(24000) - 12000);
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->posy, pp->posz, pp->cursector, // Start position
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->posz, pp->cursector, // Start position
|
||||
bcos(daang), // X vector of 3D ang
|
||||
bsin(daang), // Y vector of 3D ang
|
||||
daz, // Z vector of 3D ang
|
||||
|
@ -12540,7 +12540,7 @@ int InitSwordAttack(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos.X - hit.hitpos.X, pp->posy - hit.hitpos.Y, pp->posz - hit.hitpos.Z) < 700)
|
||||
if (FindDistance3D(pp->pos.X - hit.hitpos.X, pp->pos.Y - hit.hitpos.Y, pp->posz - hit.hitpos.Z) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12683,7 +12683,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
if (!TEST(sp->extra, SPRX_PLAYER_OR_ENEMY))
|
||||
continue;
|
||||
|
||||
dist = Distance(pp->pos.X, pp->posy, sp->pos.X, sp->pos.Y);
|
||||
dist = Distance(pp->pos.X, pp->pos.Y, sp->pos.X, sp->pos.Y);
|
||||
|
||||
if (pp->InventoryActive[2]) // Shadow Bombs give you demon fist
|
||||
{
|
||||
|
@ -12721,7 +12721,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
daang = pp->angle.ang.asbuild();
|
||||
daz = -MulScale(pp->horizon.horiz.asq16(), 2000, 16) + (RandomRange(24000) - 12000);
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->posy, pp->posz, pp->cursector, // Start position
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->posz, pp->cursector, // Start position
|
||||
bcos(daang), // X vector of 3D ang
|
||||
bsin(daang), // Y vector of 3D ang
|
||||
daz, // Z vector of 3D ang
|
||||
|
@ -12730,7 +12730,7 @@ int InitFistAttack(PLAYERp pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos.X - hit.hitpos.X, pp->posy - hit.hitpos.Y, pp->posz - hit.hitpos.Z) < 700)
|
||||
if (FindDistance3D(pp->pos.X - hit.hitpos.X, pp->pos.Y - hit.hitpos.Y, pp->posz - hit.hitpos.Z) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -13334,7 +13334,7 @@ int InitStar(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
|
@ -13451,7 +13451,7 @@ void InitHeartAttack(PLAYERp pp)
|
|||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, BLOOD_WORM, s_BloodWorm, pp->cursector,
|
||||
pp->pos.X, pp->posy, pp->posz + Z(12), pp->angle.ang.asbuild(), BLOOD_WORM_VELOCITY*2);
|
||||
pp->pos.X, pp->pos.Y, pp->posz + Z(12), pp->angle.ang.asbuild(), BLOOD_WORM_VELOCITY*2);
|
||||
|
||||
sp = &actorNew->s();
|
||||
u = actorNew->u();
|
||||
|
@ -13596,7 +13596,7 @@ int InitShotgun(PLAYERp pp)
|
|||
}
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
daz = nz = pp->posz + pp->bob_z;
|
||||
|
||||
daang = 64;
|
||||
|
@ -13755,7 +13755,7 @@ int InitLaser(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
|
@ -13864,7 +13864,7 @@ int InitRail(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
nz = pp->posz + pp->bob_z + Z(11);
|
||||
|
||||
|
@ -14045,7 +14045,7 @@ int InitRocket(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -14158,7 +14158,7 @@ int InitBunnyRocket(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -14267,7 +14267,7 @@ int InitNuke(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -14435,7 +14435,7 @@ int InitMicro(PLAYERp pp)
|
|||
TARGET_SORTp ts = TargetSort;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
|
||||
const int MAX_MICRO = 1;
|
||||
|
||||
|
@ -15810,7 +15810,7 @@ int InitTracerUzi(PLAYERp pp)
|
|||
short lat_dist[] = {800,-800};
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->posz + Z(8) + -MulScale(pp->horizon.horiz.asq16(), 72, 16);
|
||||
|
||||
// Spawn a shot
|
||||
|
@ -16185,7 +16185,7 @@ int InitUzi(PLAYERp pp)
|
|||
xvect = bcos(daang);
|
||||
yvect = bsin(daang);
|
||||
zvect = daz;
|
||||
FAFhitscan(pp->pos.X, pp->posy, nz, pp->cursector, // Start position
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, nz, pp->cursector, // Start position
|
||||
xvect,yvect,zvect,
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
|
@ -17408,7 +17408,7 @@ int InitGrenade(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
|
@ -17566,7 +17566,7 @@ int InitMine(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->posy;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->posz + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
|
@ -17713,7 +17713,7 @@ int InitFireball(PLAYERp pp)
|
|||
return 0;
|
||||
|
||||
nx += pp->pos.X;
|
||||
ny += pp->posy;
|
||||
ny += pp->pos.Y;
|
||||
|
||||
nz = pp->posz + pp->bob_z + Z(15);
|
||||
|
||||
|
@ -19019,7 +19019,7 @@ int DoFloorBlood(DSWActor* actor)
|
|||
{
|
||||
pp = &Player[pnum];
|
||||
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->posy, dist, a, b, c);
|
||||
DISTANCE(sp->pos.X, sp->pos.Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
|
||||
if (dist < near_dist)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ BEGIN_SW_NS
|
|||
#define NEW_ELECTRO 1
|
||||
#define HORIZ_MULT 128L
|
||||
|
||||
#define ANG2PLAYER(pp,sp) (getangle((pp)->pos.X - (sp)->pos.X, (pp)->posy - (sp)->pos.Y))
|
||||
#define ANG2PLAYER(pp,sp) (getangle((pp)->pos.X - (sp)->pos.X, (pp)->pos.Y - (sp)->pos.Y))
|
||||
#define ANG2SPRITE(sp,op) (getangle((sp)->pos.X - (op)->pos.X, (sp)->pos.Y - (op)->pos.Y))
|
||||
|
||||
#define MAX_HOLE_QUEUE 64
|
||||
|
|
|
@ -781,7 +781,7 @@ void SpawnZombie(PLAYERp pp, DSWActor* weaponActor)
|
|||
if (ownerActor == nullptr)
|
||||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos.X, pp->posy, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos.X, pp->pos.Y, pp->posz, pp->angle.ang.asbuild(), 0);
|
||||
np = &actorNew->s();
|
||||
nu = actorNew->u();
|
||||
np->setsector(pp->cursector);
|
||||
|
|
Loading…
Reference in a new issue