mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- renamed player position variables.
This commit is contained in:
parent
22dae296c6
commit
da73d2bba4
24 changed files with 412 additions and 396 deletions
|
@ -324,7 +324,7 @@ int DoActorPickClosePlayer(DSWActor* actor)
|
|||
// continue;
|
||||
}
|
||||
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y, dist, a, b, c);
|
||||
|
||||
if (dist < near_dist)
|
||||
{
|
||||
|
@ -350,7 +350,7 @@ int DoActorPickClosePlayer(DSWActor* actor)
|
|||
continue;
|
||||
}
|
||||
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y, dist, a, b, c);
|
||||
|
||||
DSWActor* plActor = pp->actor;
|
||||
if (dist < near_dist && FAFcansee(actor->int_pos().X, actor->int_pos().Y, look_height, actor->sector(), plActor->int_pos().X, plActor->int_pos().Y, ActorUpperZ(plActor), plActor->sector()))
|
||||
|
|
|
@ -1003,7 +1003,7 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
if (pp == Player+myconnectindex)
|
||||
{
|
||||
choose_snd = StdRandomRange(2<<8)>>8;
|
||||
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector) && Facing(actor, actor->user.targetActor))
|
||||
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector) && Facing(actor, actor->user.targetActor))
|
||||
PlayerSound(fagsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
|
||||
}
|
||||
}
|
||||
|
@ -1018,7 +1018,7 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
if (pp == Player+myconnectindex)
|
||||
{
|
||||
choose_snd = StdRandomRange(3<<8)>>8;
|
||||
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector) && Facing(actor, actor->user.targetActor))
|
||||
if (FAFcansee(actor->int_pos().X,actor->int_pos().Y,ActorZOfTop(actor),actor->sector(),pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector) && Facing(actor, actor->user.targetActor))
|
||||
PlayerSound(straightsnds[choose_snd], v3df_doppler|v3df_follow|v3df_dontpan,pp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -780,9 +780,9 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int
|
|||
{
|
||||
pp = tActor->user.PlayerP;
|
||||
int sr = 65536 - int(smoothratio);
|
||||
tsp->add_int_x(-MulScale(pp->pos.X - pp->opos.X, sr, 16));
|
||||
tsp->add_int_y(-MulScale(pp->pos.Y - pp->opos.Y, sr, 16));
|
||||
tsp->add_int_z(-MulScale(pp->pos.Z - pp->opos.Z, sr, 16));
|
||||
tsp->add_int_x(-MulScale(pp->__int_ppos.X - pp->__int_popos.X, sr, 16));
|
||||
tsp->add_int_y(-MulScale(pp->__int_ppos.Y - pp->__int_popos.Y, sr, 16));
|
||||
tsp->add_int_z(-MulScale(pp->__int_ppos.Z - pp->__int_popos.Z, sr, 16));
|
||||
tsp->add_int_ang(-MulScale(pp->angle.ang.Buildang() - pp->angle.oang.Buildang(), sr, 16));
|
||||
}
|
||||
}
|
||||
|
@ -1023,9 +1023,9 @@ FString GameInterface::GetCoordString()
|
|||
{
|
||||
PLAYER* pp = Player + myconnectindex;
|
||||
FString out;
|
||||
out.AppendFormat("POSX:%d ", pp->pos.X);
|
||||
out.AppendFormat("POSY:%d ", pp->pos.Y);
|
||||
out.AppendFormat("POSZ:%d ", pp->pos.Z);
|
||||
out.AppendFormat("POSX:%d ", pp->__int_ppos.X);
|
||||
out.AppendFormat("POSY:%d ", pp->__int_ppos.Y);
|
||||
out.AppendFormat("POSZ:%d ", pp->__int_ppos.Z);
|
||||
out.AppendFormat("ANG:%d\n", pp->angle.ang.Buildang());
|
||||
|
||||
return out;
|
||||
|
@ -1383,9 +1383,9 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
|
|||
else
|
||||
camerapp = pp;
|
||||
|
||||
tx = interpolatedvalue(camerapp->opos.X, camerapp->pos.X, sr);
|
||||
ty = interpolatedvalue(camerapp->opos.Y, camerapp->pos.Y, sr);
|
||||
tz = interpolatedvalue(camerapp->opos.Z, camerapp->pos.Z, sr);
|
||||
tx = interpolatedvalue(camerapp->__int_popos.X, camerapp->__int_ppos.X, sr);
|
||||
ty = interpolatedvalue(camerapp->__int_popos.Y, camerapp->__int_ppos.Y, sr);
|
||||
tz = interpolatedvalue(camerapp->__int_popos.Z, camerapp->__int_ppos.Z, sr);
|
||||
|
||||
// Interpolate the player's angle while on a sector object, just like VoidSW.
|
||||
// This isn't needed for the turret as it was fixable, but moving sector objects are problematic.
|
||||
|
@ -1410,9 +1410,9 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
|
|||
if (pp->sop_control &&
|
||||
(!cl_sointerpolation || (CommEnabled && !pp->sop_remote)))
|
||||
{
|
||||
tx = pp->pos.X;
|
||||
ty = pp->pos.Y;
|
||||
tz = pp->pos.Z;
|
||||
tx = pp->__int_ppos.X;
|
||||
ty = pp->__int_ppos.Y;
|
||||
tz = pp->__int_ppos.Z;
|
||||
tang = pp->angle.ang;
|
||||
}
|
||||
tsect = pp->cursector;
|
||||
|
@ -1421,7 +1421,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
|
|||
|
||||
pp->si.X = tx;
|
||||
pp->si.Y = ty;
|
||||
pp->si.Z = tz - pp->pos.Z;
|
||||
pp->si.Z = tz - pp->__int_ppos.Z;
|
||||
pp->siang = tang.Buildang();
|
||||
|
||||
QuakeViewChange(camerapp, &quake_z, &quake_x, &quake_y, &quake_ang);
|
||||
|
|
|
@ -403,7 +403,7 @@ void InitLevel(MapRecord *maprec)
|
|||
currentLevel = maprec;
|
||||
int cursect;
|
||||
SpawnSpriteDef sprites;
|
||||
loadMap(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].pos, &ang, &cursect, sprites);
|
||||
loadMap(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].__int_ppos, &ang, &cursect, sprites);
|
||||
spawnactors(sprites);
|
||||
Player[0].cursector = §or[cursect];
|
||||
|
||||
|
|
|
@ -577,7 +577,23 @@ struct REMOTE_CONTROL
|
|||
struct PLAYER
|
||||
{
|
||||
// variable that fit in the sprite or user structure
|
||||
vec3_t pos, opos, oldpos;
|
||||
|
||||
// hackery to make the transition easier
|
||||
union
|
||||
{
|
||||
vec3_t __int_ppos;
|
||||
vec3_t pos;
|
||||
};
|
||||
union
|
||||
{
|
||||
vec3_t __int_popos;
|
||||
vec3_t opos;
|
||||
};
|
||||
union
|
||||
{
|
||||
vec3_t __int_poldpos;
|
||||
vec3_t oldpos;
|
||||
};
|
||||
|
||||
DSWActor* actor; // this may not be a TObjPtr!
|
||||
TObjPtr<DSWActor*> lowActor, highActor;
|
||||
|
@ -1979,7 +1995,7 @@ inline bool SectorIsUnderwaterArea(sectortype* sect)
|
|||
|
||||
inline bool PlayerFacingRange(PLAYER* pp, DSWActor* a, int range)
|
||||
{
|
||||
return (abs(getincangle(getangle(a->int_pos().X - (pp)->pos.X, a->int_pos().Y - (pp)->pos.Y), (pp)->angle.ang.Buildang())) < (range));
|
||||
return (abs(getincangle(getangle(a->int_pos().X - (pp)->__int_ppos.X, a->int_pos().Y - (pp)->__int_ppos.Y), (pp)->angle.ang.Buildang())) < (range));
|
||||
}
|
||||
|
||||
inline bool FacingRange(DSWActor* a1, DSWActor* a2, int range)
|
||||
|
|
|
@ -541,7 +541,7 @@ int DoCheckSwarm(DSWActor* actor)
|
|||
if (actor->user.targetActor->user.PlayerP)
|
||||
{
|
||||
pp = actor->user.targetActor->user.PlayerP;
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y, pdist, a, b, c);
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y, pdist, a, b, c);
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
|
|
@ -186,7 +186,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
|||
|
||||
if ((pp->Flags2 & PF2_INPUT_CAN_TURN_VEHICLE))
|
||||
{
|
||||
DoPlayerTurnVehicle(pp, input.avel, pp->pos.Z + Z(10), labs(pp->pos.Z + Z(10) - pp->sop->floor_loz));
|
||||
DoPlayerTurnVehicle(pp, input.avel, pp->__int_ppos.Z + Z(10), labs(pp->__int_ppos.Z + Z(10) - pp->sop->floor_loz));
|
||||
}
|
||||
|
||||
if ((pp->Flags2 & PF2_INPUT_CAN_TURN_TURRET))
|
||||
|
|
|
@ -429,8 +429,8 @@ JS_ProcessEchoSpot()
|
|||
{
|
||||
dist = 0x7fffffff;
|
||||
|
||||
j = abs(actor->int_pos().X - pp->pos.X);
|
||||
j += abs(actor->int_pos().Y - pp->pos.Y);
|
||||
j = abs(actor->int_pos().X - pp->__int_ppos.X);
|
||||
j += abs(actor->int_pos().Y - pp->__int_ppos.Y);
|
||||
if (j < dist)
|
||||
dist = j;
|
||||
|
||||
|
@ -612,7 +612,7 @@ void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio)
|
|||
|
||||
// If player is dead still then update at MoveSkip4
|
||||
// rate.
|
||||
if (pp->pos.X == pp->opos.X && pp->pos.Y == pp->opos.Y && pp->pos.Z == pp->opos.Z)
|
||||
if (pp->__int_ppos.X == pp->__int_popos.X && pp->__int_ppos.Y == pp->__int_popos.Y && pp->__int_ppos.Z == pp->__int_popos.Z)
|
||||
DoCam = true;
|
||||
|
||||
|
||||
|
@ -626,7 +626,7 @@ void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio)
|
|||
|
||||
if (TEST_BOOL11(camactor) && numplayers > 1)
|
||||
{
|
||||
drawroomstotile(cp->pos.X, cp->pos.Y, cp->pos.Z, cp->angle.ang, cp->horizon.horiz, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
drawroomstotile(cp->__int_ppos.X, cp->__int_ppos.Y, cp->__int_ppos.Z, cp->angle.ang, cp->horizon.horiz, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1242,9 +1242,9 @@ int PlayerInitChemBomb(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -1615,9 +1615,9 @@ int PlayerInitCaltrops(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, pp->cursector,
|
||||
nx, ny, nz, pp->angle.ang.Buildang(), (CHEMBOMB_VELOCITY + RandomRange(CHEMBOMB_VELOCITY)) / 2);
|
||||
|
|
|
@ -58,7 +58,7 @@ Collision MultiClipMove(PLAYER* pp, int z, int floor_dist)
|
|||
// allowing you to move through wall
|
||||
ang = NORM_ANGLE(pp->angle.ang.Buildang() + sop->clipbox_ang[i]);
|
||||
|
||||
vec3_t spos = { pp->pos.X, pp->pos.Y, z };
|
||||
vec3_t spos = { pp->__int_ppos.X, pp->__int_ppos.Y, z };
|
||||
|
||||
xvect = sop->clipbox_vdist[i] * bcos(ang);
|
||||
yvect = sop->clipbox_vdist[i] * bsin(ang);
|
||||
|
@ -71,8 +71,8 @@ Collision MultiClipMove(PLAYER* pp, int z, int floor_dist)
|
|||
min_dist = 0;
|
||||
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->pos.Y + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
|
||||
opos[i].X = pos[i].X = pp->__int_ppos.X + MulScale(sop->clipbox_vdist[i], bcos(ang), 14);
|
||||
opos[i].Y = pos[i].Y = pp->__int_ppos.Y + MulScale(sop->clipbox_vdist[i], bsin(ang), 14);
|
||||
|
||||
// spos.x is where it hit
|
||||
pos[i].X = spos.X;
|
||||
|
@ -111,8 +111,8 @@ Collision MultiClipMove(PLAYER* 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->pos.Y += pos[min_ndx].Y - opos[min_ndx].Y;
|
||||
pp->__int_ppos.X += pos[min_ndx].X - opos[min_ndx].X;
|
||||
pp->__int_ppos.Y += pos[min_ndx].Y - opos[min_ndx].Y;
|
||||
|
||||
return min_ret;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ short MultiClipTurn(PLAYER* 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->pos.Y, z };
|
||||
vec3_t pos = { pp->__int_ppos.X, pp->__int_ppos.Y, z };
|
||||
|
||||
xvect = sop->clipbox_vdist[i] * bcos(ang);
|
||||
yvect = sop->clipbox_vdist[i] * bsin(ang);
|
||||
|
@ -201,8 +201,8 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
//Given the 4 points: x[4], y[4]
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X += (pp->vect.X>>14);
|
||||
pp->pos.Y += (pp->vect.Y>>14);
|
||||
pp->__int_ppos.X += (pp->vect.X>>14);
|
||||
pp->__int_ppos.Y += (pp->vect.Y>>14);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -218,8 +218,8 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
}
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X -= (pp->vect.Y>>15);
|
||||
pp->pos.Y += (pp->vect.X>>15);
|
||||
pp->__int_ppos.X -= (pp->vect.Y>>15);
|
||||
pp->__int_ppos.Y += (pp->vect.X>>15);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -234,8 +234,8 @@ int RectClipMove(PLAYER* pp, int *qx, int *qy)
|
|||
}
|
||||
if (testquadinsect(&point_num, xy, pp->cursector))
|
||||
{
|
||||
pp->pos.X += (pp->vect.Y>>15);
|
||||
pp->pos.Y -= (pp->vect.X>>15);
|
||||
pp->__int_ppos.X += (pp->vect.Y>>15);
|
||||
pp->__int_ppos.Y -= (pp->vect.X>>15);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -277,7 +277,7 @@ short RectClipTurn(PLAYER* pp, short new_ang, int *qx, int *qy, int *ox, int *oy
|
|||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
vec2_t const p = { ox[i], oy[i] };
|
||||
rotatepoint(pp->pos.vec2, p, rot_ang, &xy[i]);
|
||||
rotatepoint(pp->__int_ppos.vec2, p, rot_ang, &xy[i]);
|
||||
// cannot use sop->xmid and ymid because the SO is off the map at this point
|
||||
//rotatepoint(&sop->xmid, p, rot_ang, &xy[i]);
|
||||
}
|
||||
|
|
|
@ -2324,8 +2324,8 @@ void InitPlayerSprite(PLAYER* 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->pos.Y, pp->pos.Z, pp->angle.ang.Buildang(), 0);
|
||||
auto actor = SpawnActor(STAT_PLAYER0 + pnum, NINJA_RUN_R0, nullptr, pp->cursector, pp->__int_ppos.X,
|
||||
pp->__int_ppos.Y, pp->__int_ppos.Z, pp->angle.ang.Buildang(), 0);
|
||||
|
||||
pp->actor = actor;
|
||||
pp->pnum = pnum;
|
||||
|
@ -2393,7 +2393,7 @@ void SpawnPlayerUnderSprite(PLAYER* pp)
|
|||
int pnum = int(pp - Player);
|
||||
|
||||
pp->PlayerUnderActor = SpawnActor(STAT_PLAYER_UNDER0 + pnum,
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, pp->angle.ang.Buildang(), 0);
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->angle.ang.Buildang(), 0);
|
||||
|
||||
DSWActor* actor = pp->PlayerUnderActor;
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ BEGIN_SW_NS
|
|||
|
||||
void GameInterface::WarpToCoords(int x, int y, int z, int ang, int horz)
|
||||
{
|
||||
Player->opos.X = Player->pos.X = x;
|
||||
Player->opos.Y = Player->pos.Y = y;
|
||||
Player->opos.Z = Player->pos.Z = z;
|
||||
Player->__int_popos.X = Player->__int_ppos.X = x;
|
||||
Player->__int_popos.Y = Player->__int_ppos.Y = y;
|
||||
Player->__int_popos.Z = Player->__int_ppos.Z = z;
|
||||
|
||||
if (ang != INT_MIN)
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -172,7 +172,7 @@ void QuakeViewChange(PLAYER* pp, int *z_diff, int *x_diff, int *y_diff, short *a
|
|||
SWStatIterator it(STAT_QUAKE_ON);
|
||||
while ((actor = it.Next()))
|
||||
{
|
||||
dist = FindDistance3D(pp->pos - actor->int_pos());
|
||||
dist = FindDistance3D(pp->__int_ppos - actor->int_pos());
|
||||
|
||||
// shake whole level
|
||||
if (QUAKE_TestDontTaper(actor))
|
||||
|
@ -242,7 +242,7 @@ void SpawnQuake(sectortype* sect, int x, int y, int z,
|
|||
|
||||
bool SetQuake(PLAYER* pp, short tics, short amt)
|
||||
{
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, tics, amt, 30000);
|
||||
SpawnQuake(pp->cursector, pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, tics, amt, 30000);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ int SetGunQuake(DSWActor* actor)
|
|||
|
||||
int SetPlayerQuake(PLAYER* pp)
|
||||
{
|
||||
SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, 40, 8, 40000);
|
||||
SpawnQuake(pp->cursector, pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, 40, 8, 40000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -436,9 +436,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("x", w.pos.X)
|
||||
("y", w.pos.Y)
|
||||
("z", w.pos.Z)
|
||||
arc("x", w.__int_ppos.X)
|
||||
("y", w.__int_ppos.Y)
|
||||
("z", w.__int_ppos.Z)
|
||||
("lv_sectnum", w.lv_sector)
|
||||
("lv_x", w.lv.X)
|
||||
("lv_y", w.lv.Y)
|
||||
|
@ -489,9 +489,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
("recoil_ndx", w.recoil_ndx)
|
||||
("recoil_horizoff", w.recoil_horizoff)
|
||||
("recoil_ohorizoff", w.recoil_ohorizoff)
|
||||
("oldposx", w.oldpos.X)
|
||||
("oldposy", w.oldpos.Y)
|
||||
("oldposz", w.oldpos.Z)
|
||||
("oldposx", w.__int_poldpos.X)
|
||||
("oldposy", w.__int_poldpos.Y)
|
||||
("oldposz", w.__int_poldpos.Z)
|
||||
("revolvex", w.Revolve.X)
|
||||
("revolvey", w.Revolve.Y)
|
||||
("RevolveDeltaAng", w.RevolveDeltaAng)
|
||||
|
@ -580,9 +580,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
}
|
||||
if (arc.isReading())
|
||||
{
|
||||
w.opos.X = w.pos.X;
|
||||
w.opos.Y = w.pos.X;
|
||||
w.opos.Z = w.pos.X;
|
||||
w.__int_popos.X = w.__int_ppos.X;
|
||||
w.__int_popos.Y = w.__int_ppos.X;
|
||||
w.__int_popos.Z = w.__int_ppos.X;
|
||||
w.oz_speed = w.z_speed;
|
||||
w.ovect.X = w.vect.X;
|
||||
w.ovect.Y = w.vect.Y;
|
||||
|
|
|
@ -1385,7 +1385,7 @@ int OperateSprite(DSWActor* actor, short player_is_operating)
|
|||
{
|
||||
pp = GlobPlayerP;
|
||||
|
||||
if (!FAFcansee(pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (ActorSizeZ(actor) >> 1), actor->sector()))
|
||||
if (!FAFcansee(pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (ActorSizeZ(actor) >> 1), actor->sector()))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1842,7 +1842,7 @@ void OperateTripTrigger(PLAYER* pp)
|
|||
{
|
||||
if (actor->user.Flags & (SPR_WAIT_FOR_TRIGGER))
|
||||
{
|
||||
if (Distance(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y) < dist)
|
||||
if (Distance(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y) < dist)
|
||||
{
|
||||
actor->user.targetActor = pp->actor;
|
||||
actor->user.Flags &= ~(SPR_WAIT_FOR_TRIGGER);
|
||||
|
@ -1939,7 +1939,7 @@ bool NearThings(PLAYER* pp)
|
|||
return false;
|
||||
}
|
||||
|
||||
neartag(pp->pos, pp->cursector, pp->angle.ang.Buildang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
neartag(pp->__int_ppos, pp->cursector, pp->angle.ang.Buildang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
|
||||
|
||||
// hit a sprite? Check to see if it has sound info in it!
|
||||
|
@ -1973,7 +1973,7 @@ bool NearThings(PLAYER* pp)
|
|||
HitInfo hit{};
|
||||
short dang = pp->angle.ang.Buildang();
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->pos.Z - Z(30), pp->cursector, // Start position
|
||||
FAFhitscan(pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z - 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
|
||||
|
@ -1982,7 +1982,7 @@ bool NearThings(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return false;
|
||||
|
||||
if (Distance(hit.int_hitpos().X, hit.int_hitpos().Y, pp->pos.X, pp->pos.Y) > 1500)
|
||||
if (Distance(hit.int_hitpos().X, hit.int_hitpos().Y, pp->__int_ppos.X, pp->__int_ppos.Y) > 1500)
|
||||
return false;
|
||||
|
||||
// hit a sprite?
|
||||
|
@ -2019,7 +2019,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int
|
|||
HitInfo near;
|
||||
|
||||
|
||||
neartag({ pp->pos.X, pp->pos.Y, z }, pp->cursector, pp->angle.ang.Buildang(), near, dist, type);
|
||||
neartag({ pp->__int_ppos.X, pp->__int_ppos.Y, z }, pp->cursector, pp->angle.ang.Buildang(), near, dist, type);
|
||||
|
||||
if (near.hitSector != nullptr)
|
||||
{
|
||||
|
@ -2133,7 +2133,7 @@ int DoPlayerGrabStar(PLAYER* pp)
|
|||
auto actor = StarQueue[i];
|
||||
if (actor != nullptr)
|
||||
{
|
||||
if (FindDistance3D(actor->int_pos().X - pp->pos.X, actor->int_pos().Y - pp->pos.Y, actor->int_pos().Z - pp->pos.Z + Z(12)) < 500)
|
||||
if (FindDistance3D(actor->int_pos().X - pp->__int_ppos.X, actor->int_pos().Y - pp->__int_ppos.Y, actor->int_pos().Z - pp->__int_ppos.Z + Z(12)) < 500)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -2187,7 +2187,7 @@ void PlayerOperateEnv(PLAYER* pp)
|
|||
NearThings(pp); // Check for player sound specified in a level sprite
|
||||
}
|
||||
|
||||
BuildNearTagList(nti, sizeof(nti), pp, pp->pos.Z, 2048L, NTAG_SEARCH_LO_HI, 8);
|
||||
BuildNearTagList(nti, sizeof(nti), pp, pp->__int_ppos.Z, 2048L, NTAG_SEARCH_LO_HI, 8);
|
||||
|
||||
found = false;
|
||||
|
||||
|
@ -2670,7 +2670,7 @@ void DoSector(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, sop->int_pmid().X, sop->int_pmid().Y, dist, a, b, c);
|
||||
DISTANCE(pp->__int_ppos.X, pp->__int_ppos.Y, sop->int_pmid().X, sop->int_pmid().Y, dist, a, b, c);
|
||||
if (dist < min_dist)
|
||||
min_dist = dist;
|
||||
}
|
||||
|
|
|
@ -122,9 +122,9 @@ short SoundDist(int x, int y, int z, int basedist)
|
|||
double sqrdist, retval;
|
||||
extern short screenpeek;
|
||||
|
||||
tx = fabs(Player[screenpeek].pos.X - x);
|
||||
ty = fabs(Player[screenpeek].pos.Y - y);
|
||||
tz = fabs((Player[screenpeek].pos.Z - z) >> 4);
|
||||
tx = fabs(Player[screenpeek].__int_ppos.X - x);
|
||||
ty = fabs(Player[screenpeek].__int_ppos.Y - y);
|
||||
tz = fabs((Player[screenpeek].__int_ppos.Z - z) >> 4);
|
||||
|
||||
// Use the Pythagreon Theorem to compute the magnitude of a 3D vector
|
||||
sqrdist = fabs(tx * tx + ty * ty + tz * tz);
|
||||
|
@ -380,7 +380,7 @@ static void UpdateAmbients()
|
|||
if (sdist < 255 && amb->vocIndex == DIGI_WHIPME)
|
||||
{
|
||||
PLAYER* pp = Player + screenpeek;
|
||||
if (!FAFcansee(spot->int_pos().X, spot->int_pos().Y, spot->int_pos().Z, spot->sector(), pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector))
|
||||
if (!FAFcansee(spot->int_pos().X, spot->int_pos().Y, spot->int_pos().Z, spot->sector(), pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector))
|
||||
{
|
||||
sdist = 255;
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
if (pos != nullptr)
|
||||
{
|
||||
PLAYER* pp = Player + screenpeek;
|
||||
FVector3 campos = GetSoundPos(pp->pos);
|
||||
FVector3 campos = GetSoundPos(pp->__int_ppos);
|
||||
vec3_t vpos = {};
|
||||
bool pancheck = false;
|
||||
|
||||
|
@ -533,7 +533,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3],
|
|||
}
|
||||
else if (type == SOURCE_Actor || type == SOURCE_Player)
|
||||
{
|
||||
vpos = type == SOURCE_Actor ? ((DSWActor*)source)->spr.int_pos() : ((PLAYER*)source)->pos;
|
||||
vpos = type == SOURCE_Actor ? ((DSWActor*)source)->spr.int_pos() : ((PLAYER*)source)->__int_ppos;
|
||||
pancheck = true;
|
||||
FVector3 npos = GetSoundPos(vpos);
|
||||
|
||||
|
@ -562,7 +562,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, spot->sector(), pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector))
|
||||
if (!FAFcansee(vpos.X, vpos.Y, vpos.Z, spot->sector(), pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector))
|
||||
{
|
||||
auto distvec = npos - campos;
|
||||
npos = campos + distvec * 1.75f; // Play more quietly
|
||||
|
@ -605,13 +605,13 @@ void GameInterface::UpdateSounds(void)
|
|||
if (TEST_BOOL1(rsp))
|
||||
tang = rsp->spr.angle;
|
||||
else
|
||||
tang = VecToAngle(pp->sop_remote->int_pmid().X - pp->pos.X, pp->sop_remote->int_pmid().Y - pp->pos.Y);
|
||||
tang = VecToAngle(pp->sop_remote->int_pmid().X - pp->__int_ppos.X, pp->sop_remote->int_pmid().Y - pp->__int_ppos.Y);
|
||||
}
|
||||
else tang = pp->angle.ang;
|
||||
|
||||
listener.angle = float(-tang.Radians());
|
||||
listener.velocity.Zero();
|
||||
listener.position = GetSoundPos(pp->pos);
|
||||
listener.position = GetSoundPos(pp->__int_ppos);
|
||||
listener.underwater = false;
|
||||
// This should probably use a real environment instead of the pitch hacking in S_PlaySound3D.
|
||||
// listenactor->waterlevel == 3;
|
||||
|
@ -654,7 +654,7 @@ int _PlaySound(int num, DSWActor* actor, PLAYER* pp, const vec3_t* const ppos, i
|
|||
}
|
||||
else if (pp && !ppos)
|
||||
{
|
||||
pos = pp->pos;
|
||||
pos = pp->__int_ppos;
|
||||
pp = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1469,10 +1469,10 @@ void PreMapCombineFloors(void)
|
|||
{
|
||||
if (itsect == dasect)
|
||||
{
|
||||
pp->pos.X += dx;
|
||||
pp->pos.Y += dy;
|
||||
pp->opos.X = pp->oldpos.X = pp->pos.X;
|
||||
pp->opos.Y = pp->oldpos.Y = pp->pos.Y;
|
||||
pp->__int_ppos.X += dx;
|
||||
pp->__int_ppos.Y += dy;
|
||||
pp->__int_popos.X = pp->__int_poldpos.X = pp->__int_ppos.X;
|
||||
pp->__int_popos.Y = pp->__int_poldpos.Y = pp->__int_ppos.Y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -5024,7 +5024,7 @@ int DoGet(DSWActor* actor)
|
|||
if (pp->Flags & (PF_DEAD))
|
||||
continue;
|
||||
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, actor->int_pos().X, actor->int_pos().Y, dist, a,b,c);
|
||||
DISTANCE(pp->__int_ppos.X, pp->__int_ppos.Y, actor->int_pos().X, actor->int_pos().Y, dist, a,b,c);
|
||||
if ((unsigned)dist > (plActor->user.Radius + actor->user.Radius))
|
||||
{
|
||||
continue;
|
||||
|
@ -5038,7 +5038,7 @@ int DoGet(DSWActor* actor)
|
|||
auto cstat_bak = actor->spr.cstat;
|
||||
actor->spr.cstat |= (CSTAT_SPRITE_BLOCK|CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
can_see = FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(),
|
||||
pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector);
|
||||
pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector);
|
||||
actor->spr.cstat = cstat_bak;
|
||||
|
||||
if (!can_see)
|
||||
|
@ -6059,7 +6059,7 @@ void SpriteControl(void)
|
|||
pp = &Player[pnum];
|
||||
|
||||
// Only update the ones closest
|
||||
DISTANCE(pp->pos.X, pp->pos.Y, actor->int_pos().X, actor->int_pos().Y, dist, tx, ty, tmin);
|
||||
DISTANCE(pp->__int_ppos.X, pp->__int_ppos.Y, actor->int_pos().X, actor->int_pos().Y, dist, tx, ty, tmin);
|
||||
|
||||
AdjustActiveRange(pp, actor, dist);
|
||||
|
||||
|
|
|
@ -765,7 +765,7 @@ void BossHealthMeter(void)
|
|||
DSWActor* actor = BossSpriteNum[i];
|
||||
if (actor != nullptr && !bosswasseen[i])
|
||||
{
|
||||
if (cansee(actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor), actor->sector(), pp->pos.X, pp->pos.Y, pp->pos.Z - Z(40), pp->cursector))
|
||||
if (cansee(actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor), actor->sector(), pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z - Z(40), pp->cursector))
|
||||
{
|
||||
if (i == 0 && !bosswasseen[0])
|
||||
{
|
||||
|
|
|
@ -1513,15 +1513,15 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, int nx, int ny)
|
|||
pp->Flags |= (PF_PLAYER_RIDING);
|
||||
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->Revolve.X = pp->pos.X;
|
||||
pp->Revolve.Y = pp->pos.Y;
|
||||
pp->Revolve.X = pp->__int_ppos.X;
|
||||
pp->Revolve.Y = pp->__int_ppos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
pp->RevolveDeltaAng = nullAngle;
|
||||
}
|
||||
|
||||
pp->pos.X += nx;
|
||||
pp->pos.Y += ny;
|
||||
pp->__int_ppos.X += nx;
|
||||
pp->__int_ppos.Y += ny;
|
||||
|
||||
if ((sop->flags & SOBJ_DONT_ROTATE))
|
||||
{
|
||||
|
@ -1537,8 +1537,8 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, int nx, int ny)
|
|||
// moving then you
|
||||
// know where he was last
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->Revolve.X = pp->pos.X;
|
||||
pp->Revolve.Y = pp->pos.Y;
|
||||
pp->Revolve.X = pp->__int_ppos.X;
|
||||
pp->Revolve.Y = pp->__int_ppos.Y;
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
pp->RevolveDeltaAng = nullAngle;
|
||||
|
@ -1558,7 +1558,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, int nx, int ny)
|
|||
// increment Players delta angle
|
||||
pp->RevolveDeltaAng = (pp->RevolveDeltaAng + GlobSpeedSO).Normalized360();
|
||||
|
||||
rotatepoint(sop->int_pmid().vec2, *(vec2_t *)&pp->Revolve.X, pp->RevolveDeltaAng.Buildang(), &pp->pos.vec2);
|
||||
rotatepoint(sop->int_pmid().vec2, *(vec2_t *)&pp->Revolve.X, pp->RevolveDeltaAng.Buildang(), &pp->__int_ppos.vec2);
|
||||
|
||||
// THIS WAS CAUSING PROLEMS!!!!
|
||||
// Sectors are still being manipulated so you can end up in a void (-1) sector
|
||||
|
@ -1774,7 +1774,7 @@ PlayerPart:
|
|||
// prevents you from falling into map HOLEs created by moving
|
||||
// Sectors and sprites around.
|
||||
//if (!SO_EMPTY(sop))
|
||||
updatesector(pp->pos.X, pp->pos.Y, &pp->cursector);
|
||||
updatesector(pp->__int_ppos.X, pp->__int_ppos.Y, &pp->cursector);
|
||||
|
||||
// in case you are in a whirlpool
|
||||
// move perfectly with the ride in the z direction
|
||||
|
@ -1783,7 +1783,7 @@ PlayerPart:
|
|||
// move up some for really fast moving plats
|
||||
//pp->posz -= PLAYER_HEIGHT + Z(12);
|
||||
DoPlayerZrange(pp);
|
||||
pp->pos.Z = pp->loz - PLAYER_CRAWL_HEIGHT;
|
||||
pp->__int_ppos.Z = pp->loz - PLAYER_CRAWL_HEIGHT;
|
||||
pp->actor->set_int_z(pp->loz);
|
||||
}
|
||||
else
|
||||
|
@ -1794,7 +1794,7 @@ PlayerPart:
|
|||
|
||||
if (!(pp->Flags & (PF_JUMPING | PF_FALLING | PF_FLYING)))
|
||||
{
|
||||
pp->pos.Z = pp->loz - PLAYER_HEIGHT;
|
||||
pp->__int_ppos.Z = pp->loz - PLAYER_HEIGHT;
|
||||
pp->actor->set_int_z(pp->loz);
|
||||
}
|
||||
}
|
||||
|
@ -3404,7 +3404,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
{
|
||||
pp = &Player[pnum];
|
||||
|
||||
if (Distance(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y) < actor->user.Dist)
|
||||
if (Distance(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y) < actor->user.Dist)
|
||||
{
|
||||
actor->user.targetActor = pp->actor;
|
||||
actor->user.Flags &= ~(SPR_WAIT_FOR_PLAYER);
|
||||
|
|
|
@ -110,7 +110,7 @@ void VisViewChange(PLAYER* pp, int *vis)
|
|||
}
|
||||
|
||||
// save off the brightest vis that you can see
|
||||
if (FAFcansee(pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector, x, y, z, sectp))
|
||||
if (FAFcansee(pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector, x, y, z, sectp))
|
||||
{
|
||||
if (VIS_VisCur(actor) < BrightestVis)
|
||||
BrightestVis = VIS_VisCur(actor);
|
||||
|
|
|
@ -7254,7 +7254,7 @@ int DoExpDamageTest(DSWActor* actor)
|
|||
// Second parameter MUST have blocking bits set or cansee won't work
|
||||
// added second check for FAF water - hitscans were hitting ceiling
|
||||
if (!FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, ActorUpperZ(actor), itActor->sector()) &&
|
||||
!FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, ActorLowerZ(actor), itActor->sector()))
|
||||
!FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), itActor->int_pos().X, itActor->int_pos().Y, int_ActorLowerZ(actor), itActor->sector()))
|
||||
continue;
|
||||
|
||||
DoDamage(itActor, actor);
|
||||
|
@ -11150,7 +11150,7 @@ int DoRing(DSWActor* actor)
|
|||
int z;
|
||||
// move the center with the player
|
||||
if (pp)
|
||||
z = pp->pos.Z + Z(20);
|
||||
z = pp->__int_ppos.Z + Z(20);
|
||||
else
|
||||
z = int_ActorZOfMiddle(own) + Z(30);
|
||||
|
||||
|
@ -11236,7 +11236,7 @@ void InitSpellRing(PLAYER* 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->pos.Y, pp->pos.Z, ang, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, FIREBALL1, s_Ring, pp->cursector, pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, ang, 0);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.xvel = 500;
|
||||
|
@ -11255,7 +11255,7 @@ void InitSpellRing(PLAYER* pp)
|
|||
|
||||
// put it out there
|
||||
actorNew->add_int_pos({ MulScale(actorNew->user.Dist, bcos(actorNew->int_ang()), 14), MulScale(actorNew->user.Dist, bsin(actorNew->int_ang()), 14),
|
||||
pp->pos.Z + Z(20) + ((actorNew->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9) });
|
||||
pp->__int_ppos.Z + Z(20) + ((actorNew->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9) });
|
||||
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + 512));
|
||||
|
||||
|
@ -11583,7 +11583,7 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
for (i = 0; i < SIZ(mp); i++)
|
||||
{
|
||||
auto actor = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, pp->cursector,
|
||||
pp->pos.X, pp->pos.Y, pp->pos.Z + Z(12), pp->angle.ang.Buildang(), NAPALM_VELOCITY*2);
|
||||
pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z + Z(12), pp->angle.ang.Buildang(), NAPALM_VELOCITY*2);
|
||||
|
||||
actor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -11717,7 +11717,7 @@ int InitSpellMirv(PLAYER* pp)
|
|||
return 0;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Mirv, pp->cursector,
|
||||
pp->pos.X, pp->pos.Y, pp->pos.Z + Z(12), pp->angle.ang.Buildang(), MIRV_VELOCITY);
|
||||
pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z + Z(12), pp->angle.ang.Buildang(), MIRV_VELOCITY);
|
||||
|
||||
PlaySound(DIGI_MIRVWIZ, actorNew, v3df_follow);
|
||||
|
||||
|
@ -11841,7 +11841,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
if (!(itActor->spr.extra & SPRX_PLAYER_OR_ENEMY))
|
||||
continue;
|
||||
|
||||
dist = Distance(pp->pos.X, pp->pos.Y, itActor->int_pos().X, itActor->int_pos().Y);
|
||||
dist = Distance(pp->__int_ppos.X, pp->__int_ppos.Y, itActor->int_pos().X, itActor->int_pos().Y);
|
||||
|
||||
reach = 1000; // !JIM! was 800
|
||||
face = 200;
|
||||
|
@ -11866,7 +11866,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
daang = pp->angle.ang.Buildang();
|
||||
daz = -MulScale(pp->horizon.horiz.asq16(), 2000, 16) + (RandomRange(24000) - 12000);
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector, // Start position
|
||||
FAFhitscan(pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector, // Start position
|
||||
bcos(daang), // X vector of 3D ang
|
||||
bsin(daang), // Y vector of 3D ang
|
||||
daz, // Z vector of 3D ang
|
||||
|
@ -11875,7 +11875,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos - hit.int_hitpos()) < 700)
|
||||
if (FindDistance3D(pp->__int_ppos - hit.int_hitpos()) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12009,7 +12009,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
if (!(itActor->spr.extra & SPRX_PLAYER_OR_ENEMY))
|
||||
continue;
|
||||
|
||||
dist = Distance(pp->pos.X, pp->pos.Y, itActor->int_pos().X, itActor->int_pos().Y);
|
||||
dist = Distance(pp->__int_ppos.X, pp->__int_ppos.Y, itActor->int_pos().X, itActor->int_pos().Y);
|
||||
|
||||
if (pp->InventoryActive[2]) // Shadow Bombs give you demon fist
|
||||
{
|
||||
|
@ -12047,7 +12047,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
daang = pp->angle.ang.Buildang();
|
||||
daz = -MulScale(pp->horizon.horiz.asq16(), 2000, 16) + (RandomRange(24000) - 12000);
|
||||
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector, // Start position
|
||||
FAFhitscan(pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->cursector, // Start position
|
||||
bcos(daang), // X vector of 3D ang
|
||||
bsin(daang), // Y vector of 3D ang
|
||||
daz, // Z vector of 3D ang
|
||||
|
@ -12056,7 +12056,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
||||
if (FindDistance3D(pp->pos - hit.int_hitpos()) < 700)
|
||||
if (FindDistance3D(pp->__int_ppos - hit.int_hitpos()) < 700)
|
||||
{
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
|
@ -12597,10 +12597,10 @@ int InitStar(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -12703,7 +12703,7 @@ void InitHeartAttack(PLAYER* pp)
|
|||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, BLOOD_WORM, s_BloodWorm, pp->cursector,
|
||||
pp->pos.X, pp->pos.Y, pp->pos.Z + Z(12), pp->angle.ang.Buildang(), BLOOD_WORM_VELOCITY*2);
|
||||
pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z + Z(12), pp->angle.ang.Buildang(), BLOOD_WORM_VELOCITY*2);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -12843,9 +12843,9 @@ int InitShotgun(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
daz = nz = pp->pos.Z + pp->bob_z;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
daz = nz = pp->__int_ppos.Z + pp->bob_z;
|
||||
|
||||
daang = 64;
|
||||
if (WeaponAutoAimHitscan(pp->actor, &daz, &daang, false) != nullptr)
|
||||
|
@ -12997,10 +12997,10 @@ int InitLaser(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -13100,10 +13100,10 @@ int InitRail(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(11);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(11);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -13269,13 +13269,13 @@ int InitRocket(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector,
|
||||
nx, ny, nz, pp->angle.ang.Buildang(), ROCKET_VELOCITY);
|
||||
|
||||
|
@ -13376,14 +13376,14 @@ int InitBunnyRocket(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
//nz = pp->posz + pp->bob_z + Z(12);
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R4, &s_BunnyRocket[0][0], pp->cursector,
|
||||
nx, ny, nz, pp->angle.ang.Buildang(), ROCKET_VELOCITY);
|
||||
|
||||
|
@ -13479,13 +13479,13 @@ int InitNuke(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector,
|
||||
nx, ny, nz, pp->angle.ang.Buildang(), 700);
|
||||
|
||||
|
@ -13634,8 +13634,8 @@ int InitMicro(PLAYER* pp)
|
|||
TARGET_SORT* ts = TargetSort;
|
||||
DSWActor* picked = nullptr;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
|
||||
const int MAX_MICRO = 1;
|
||||
|
||||
|
@ -13663,7 +13663,7 @@ int InitMicro(PLAYER* pp)
|
|||
ang = pp->angle.ang.Buildang();
|
||||
}
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(14);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(14);
|
||||
nz += Z(RandomRange(20)) - Z(10);
|
||||
|
||||
// Spawn a shot
|
||||
|
@ -14828,9 +14828,9 @@ int InitTracerUzi(PLAYER* pp)
|
|||
|
||||
short lat_dist[] = {800,-800};
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->pos.Z + Z(8) + -MulScale(pp->horizon.horiz.asq16(), 72, 16);
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
nz = pp->__int_ppos.Z + Z(8) + -MulScale(pp->horizon.horiz.asq16(), 72, 16);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -15127,8 +15127,8 @@ int InitUzi(PLAYER* pp)
|
|||
if (RANDOM_P2(1024) < 400)
|
||||
InitTracerUzi(pp);
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z;
|
||||
daz = pp->pos.Z + pp->bob_z;
|
||||
nz = pp->__int_ppos.Z + pp->bob_z;
|
||||
daz = pp->__int_ppos.Z + pp->bob_z;
|
||||
daang = 32;
|
||||
if (WeaponAutoAimHitscan(pp->actor, &daz, &daang, false) != nullptr)
|
||||
{
|
||||
|
@ -15147,7 +15147,7 @@ int InitUzi(PLAYER* pp)
|
|||
xvect = bcos(daang);
|
||||
yvect = bsin(daang);
|
||||
zvect = daz;
|
||||
FAFhitscan(pp->pos.X, pp->pos.Y, nz, pp->cursector, // Start position
|
||||
FAFhitscan(pp->__int_ppos.X, pp->__int_ppos.Y, nz, pp->cursector, // Start position
|
||||
xvect,yvect,zvect,
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
|
@ -16280,9 +16280,9 @@ int InitGrenade(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -16425,9 +16425,9 @@ int InitMine(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx = pp->pos.X;
|
||||
ny = pp->pos.Y;
|
||||
nz = pp->pos.Z + pp->bob_z + Z(8);
|
||||
nx = pp->__int_ppos.X;
|
||||
ny = pp->__int_ppos.Y;
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(8);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
@ -16556,10 +16556,10 @@ int InitFireball(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
nx += pp->pos.X;
|
||||
ny += pp->pos.Y;
|
||||
nx += pp->__int_ppos.X;
|
||||
ny += pp->__int_ppos.Y;
|
||||
|
||||
nz = pp->pos.Z + pp->bob_z + Z(15);
|
||||
nz = pp->__int_ppos.Z + pp->bob_z + Z(15);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Fireball, pp->cursector, nx, ny, nz, pp->angle.ang.Buildang(), FIREBALL_VELOCITY);
|
||||
|
||||
|
@ -17755,7 +17755,7 @@ int DoFloorBlood(DSWActor* actor)
|
|||
{
|
||||
pp = &Player[pnum];
|
||||
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->pos.X, pp->pos.Y, dist, a, b, c);
|
||||
DISTANCE(actor->int_pos().X, actor->int_pos().Y, pp->__int_ppos.X, pp->__int_ppos.Y, dist, a, b, c);
|
||||
|
||||
if (dist < near_dist)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ inline int AngToSprite(DSWActor* actor, DSWActor* other)
|
|||
|
||||
inline int AngToPlayer(PLAYER* player, DSWActor* other)
|
||||
{
|
||||
return (getangle(player->pos.X - other->int_pos().X, player->pos.Y - other->int_pos().Y));
|
||||
return (getangle(player->__int_ppos.X - other->int_pos().X, player->__int_ppos.Y - other->int_pos().Y));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -776,7 +776,7 @@ void SpawnZombie(PLAYER* pp, DSWActor* weaponActor)
|
|||
if (ownerActor == nullptr)
|
||||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, pp->angle.ang.Buildang(), 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->__int_ppos.X, pp->__int_ppos.Y, pp->__int_ppos.Z, pp->angle.ang.Buildang(), 0);
|
||||
SetOwner(actorNew, ownerActor);
|
||||
actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal;
|
||||
actorNew->set_int_ang(RANDOM_P2(2048));
|
||||
|
|
Loading…
Reference in a new issue