mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- Rename PlayerAngle::ang
in preparation for replacement work.
This commit is contained in:
parent
d810afa2e9
commit
bd063de5f5
43 changed files with 198 additions and 198 deletions
|
@ -238,7 +238,7 @@ void PlayerAngle::applyinput(float const avel, ESyncBits* actions, double const
|
|||
if (!movementlocked())
|
||||
{
|
||||
// add player's input
|
||||
ang += DAngle::fromDeg(avel);
|
||||
ZzANGLE += DAngle::fromDeg(avel);
|
||||
|
||||
if (*actions & SB_TURNAROUND)
|
||||
{
|
||||
|
@ -261,7 +261,7 @@ void PlayerAngle::applyinput(float const avel, ESyncBits* actions, double const
|
|||
add -= spin;
|
||||
spin = nullAngle;
|
||||
}
|
||||
ang += add;
|
||||
ZzANGLE += add;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -334,7 +334,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, Pl
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("ang", w.ang)
|
||||
arc("ang", w.ZzANGLE)
|
||||
("lookang", w.look_ang)
|
||||
("rotscrnang", w.rotscrnang)
|
||||
("spin", w.spin)
|
||||
|
@ -343,7 +343,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, Pl
|
|||
|
||||
if (arc.isReading())
|
||||
{
|
||||
w.oang = w.ang;
|
||||
w.oang = w.ZzANGLE;
|
||||
w.olook_ang = w.look_ang;
|
||||
w.orotscrnang = w.rotscrnang;
|
||||
w.inputdisabled = w.inputdisabled;
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
|
||||
struct PlayerAngle
|
||||
{
|
||||
DAngle ang, oang, look_ang, olook_ang, rotscrnang, orotscrnang, spin;
|
||||
DAngle ZzANGLE, oang, look_ang, olook_ang, rotscrnang, orotscrnang, spin;
|
||||
|
||||
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
|
||||
|
||||
|
@ -110,22 +110,22 @@ struct PlayerAngle
|
|||
// Interpolation helpers.
|
||||
void backup()
|
||||
{
|
||||
oang = ang;
|
||||
oang = ZzANGLE;
|
||||
olook_ang = look_ang;
|
||||
orotscrnang = rotscrnang;
|
||||
}
|
||||
void restore()
|
||||
{
|
||||
ang = oang;
|
||||
ZzANGLE = oang;
|
||||
look_ang = olook_ang;
|
||||
rotscrnang = orotscrnang;
|
||||
}
|
||||
|
||||
// Commonly used getters.
|
||||
DAngle osum() { return oang + olook_ang; }
|
||||
DAngle sum() { return ang + look_ang; }
|
||||
DAngle sum() { return ZzANGLE + look_ang; }
|
||||
DAngle interpolatedsum(double const interpfrac) { return interpolatedvalue(osum(), sum(), interpfrac); }
|
||||
DAngle interpolatedang(double const interpfrac) { return interpolatedvalue(oang, ang, interpfrac); }
|
||||
DAngle interpolatedang(double const interpfrac) { return interpolatedvalue(oang, ZzANGLE, interpfrac); }
|
||||
DAngle interpolatedlookang(double const interpfrac) { return interpolatedvalue(olook_ang, look_ang, interpfrac); }
|
||||
DAngle interpolatedrotscrn(double const interpfrac) { return interpolatedvalue(orotscrnang, rotscrnang, interpfrac); }
|
||||
DAngle renderlookang(double const interpfrac) { return !SyncInput() ? look_ang : interpolatedlookang(interpfrac); }
|
||||
|
@ -166,7 +166,7 @@ struct PlayerAngle
|
|||
}
|
||||
else
|
||||
{
|
||||
ang += value;
|
||||
ZzANGLE += value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,8 +178,8 @@ struct PlayerAngle
|
|||
}
|
||||
else
|
||||
{
|
||||
ang = value;
|
||||
if (backup) oang = ang;
|
||||
ZzANGLE = value;
|
||||
if (backup) oang = ZzANGLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,21 +187,21 @@ struct PlayerAngle
|
|||
{
|
||||
if (targetset())
|
||||
{
|
||||
auto delta = deltaangle(ang, target);
|
||||
auto delta = deltaangle(ZzANGLE, target);
|
||||
|
||||
if (abs(delta) > DAngleBuildToDeg)
|
||||
{
|
||||
ang += delta * scaleAdjust;
|
||||
ZzANGLE += delta * scaleAdjust;
|
||||
}
|
||||
else
|
||||
{
|
||||
ang = target;
|
||||
ZzANGLE = target;
|
||||
target = nullAngle;
|
||||
}
|
||||
}
|
||||
else if (adjustment.Sgn())
|
||||
{
|
||||
ang += adjustment * scaleAdjust;
|
||||
ZzANGLE += adjustment * scaleAdjust;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9278,7 +9278,7 @@ void changeSpriteAngle(DBloodActor* pSpr, DAngle nAng)
|
|||
{
|
||||
PLAYER* pPlayer = getPlayerById(pSpr->spr.type);
|
||||
if (pPlayer)
|
||||
pPlayer->angle.ang = nAng;
|
||||
pPlayer->angle.ZzANGLE = nAng;
|
||||
else
|
||||
{
|
||||
pSpr->spr.Angles.Yaw = nAng;
|
||||
|
|
|
@ -40,7 +40,7 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
|||
|
||||
if (ang != DAngle::fromDeg(INT_MIN))
|
||||
{
|
||||
pPlayer->angle.oang = pPlayer->angle.ang = ang;
|
||||
pPlayer->angle.oang = pPlayer->angle.ZzANGLE = ang;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -812,7 +812,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
|||
GetActorExtents(actor, &top, &bottom);
|
||||
actor->spr.pos.Z -= bottom - actor->spr.pos.Z;
|
||||
actor->spr.pal = 11 + (pPlayer->teamId & 3);
|
||||
actor->spr.Angles.Yaw = pPlayer->angle.ang = pStartZone->angle; // check me out later.
|
||||
actor->spr.Angles.Yaw = pPlayer->angle.ZzANGLE = pStartZone->angle; // check me out later.
|
||||
actor->spr.type = kDudePlayer1 + nPlayer;
|
||||
actor->clipdist = pDudeInfo->fClipdist();
|
||||
actor->spr.flags = 15;
|
||||
|
@ -1499,7 +1499,7 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out)
|
|||
|
||||
void UpdatePlayerSpriteAngle(PLAYER* pPlayer)
|
||||
{
|
||||
pPlayer->actor->spr.Angles.Yaw = pPlayer->angle.ang; // check me out later.
|
||||
pPlayer->actor->spr.Angles.Yaw = pPlayer->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1554,7 +1554,7 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
DBloodActor* fragger = pPlayer->fragger;
|
||||
if (fragger)
|
||||
{
|
||||
pPlayer->angle.addadjustment(deltaangle(pPlayer->angle.ang, (fragger->spr.pos.XY() - actor->spr.pos.XY()).Angle()));
|
||||
pPlayer->angle.addadjustment(deltaangle(pPlayer->angle.ZzANGLE, (fragger->spr.pos.XY() - actor->spr.pos.XY()).Angle()));
|
||||
}
|
||||
pPlayer->deathTime += 4;
|
||||
if (!bSeqStat)
|
||||
|
|
|
@ -362,7 +362,7 @@ void movedummyplayers(void)
|
|||
{
|
||||
act->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
act->spr.pos.Z = act->sector()->ceilingz + 27;
|
||||
act->spr.Angles.Yaw = ps[p].angle.ang; // check me out later.
|
||||
act->spr.Angles.Yaw = ps[p].angle.ZzANGLE; // check me out later.
|
||||
if (act->temp_data[0] == 8)
|
||||
act->temp_data[0] = 0;
|
||||
else act->temp_data[0]++;
|
||||
|
@ -442,7 +442,7 @@ void moveplayers(void)
|
|||
|
||||
if (p->actorsqu != nullptr)
|
||||
{
|
||||
p->angle.addadjustment(deltaangle(p->angle.ang, (p->actorsqu->spr.pos.XY() - p->GetActor()->spr.pos.XY()).Angle()) * 0.25);
|
||||
p->angle.addadjustment(deltaangle(p->angle.ZzANGLE, (p->actorsqu->spr.pos.XY() - p->GetActor()->spr.pos.XY()).Angle()) * 0.25);
|
||||
}
|
||||
|
||||
if (act->spr.extra > 0)
|
||||
|
@ -462,10 +462,10 @@ void moveplayers(void)
|
|||
|
||||
if (p->wackedbyactor != nullptr && p->wackedbyactor->spr.statnum < MAXSTATUS)
|
||||
{
|
||||
p->angle.addadjustment(deltaangle(p->angle.ang, (p->wackedbyactor->spr.pos.XY() - p->GetActor()->spr.pos.XY()).Angle()) * 0.5);
|
||||
p->angle.addadjustment(deltaangle(p->angle.ZzANGLE, (p->wackedbyactor->spr.pos.XY() - p->GetActor()->spr.pos.XY()).Angle()) * 0.5);
|
||||
}
|
||||
}
|
||||
act->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
act->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -499,13 +499,13 @@ void moveplayers(void)
|
|||
if (act->spr.extra < 8)
|
||||
{
|
||||
act->vel.X = 8;
|
||||
act->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
act->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
act->spr.extra++;
|
||||
ssp(act, CLIPMASK0);
|
||||
}
|
||||
else
|
||||
{
|
||||
act->spr.Angles.Yaw = DAngle360 - minAngle - p->angle.ang; // check me out later.
|
||||
act->spr.Angles.Yaw = DAngle360 - minAngle - p->angle.ZzANGLE; // check me out later.
|
||||
SetActor(act, act->spr.pos);
|
||||
}
|
||||
}
|
||||
|
@ -787,7 +787,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
{
|
||||
// if(actor->spr.pal == 12)
|
||||
{
|
||||
auto delta = absangle(ps[p].angle.ang, (actor->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
auto delta = absangle(ps[p].angle.ZzANGLE, (actor->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
if (delta < DAngle22_5 / 2 && PlayerInput(p, SB_OPEN))
|
||||
if (ps[p].toggle_key_flag == 1)
|
||||
{
|
||||
|
@ -797,7 +797,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
{
|
||||
if (act2->spr.picnum == queball || act2->spr.picnum == stripeball)
|
||||
{
|
||||
delta = absangle(ps[p].angle.ang, (act2->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
delta = absangle(ps[p].angle.ZzANGLE, (act2->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
if (delta < DAngle22_5 / 2)
|
||||
{
|
||||
double l;
|
||||
|
@ -811,7 +811,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
if (actor->spr.pal == 12)
|
||||
actor->vel.X = 10.25;
|
||||
else actor->vel.X = 8.75;
|
||||
actor->spr.Angles.Yaw = ps[p].angle.ang; // check me out later.
|
||||
actor->spr.Angles.Yaw = ps[p].angle.ZzANGLE; // check me out later.
|
||||
ps[p].toggle_key_flag = 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1334,7 +1334,7 @@ void movetransports_d(void)
|
|||
ps[k].GetActor()->spr.extra = 0;
|
||||
}
|
||||
|
||||
ps[p].angle.ang = Owner->spr.Angles.Yaw; // check me out later.
|
||||
ps[p].angle.ZzANGLE = Owner->spr.Angles.Yaw; // check me out later.
|
||||
|
||||
if (Owner->GetOwner() != Owner)
|
||||
{
|
||||
|
@ -1663,7 +1663,7 @@ static void greenslime(DDukeActor *actor)
|
|||
}
|
||||
else if (xx < 64 && ps[p].quick_kick == 0)
|
||||
{
|
||||
auto ang = absangle(ps[p].angle.ang, (actor->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
auto ang = absangle(ps[p].angle.ZzANGLE, (actor->spr.pos.XY() - ps[p].GetActor()->spr.pos.XY()).Angle());
|
||||
if (ang < DAngle22_5)
|
||||
ps[p].quick_kick = 14;
|
||||
}
|
||||
|
@ -1685,7 +1685,7 @@ static void greenslime(DDukeActor *actor)
|
|||
|
||||
SetActor(actor, actor->spr.pos);
|
||||
|
||||
actor->spr.Angles.Yaw = ps[p].angle.ang; // check me out later.
|
||||
actor->spr.Angles.Yaw = ps[p].angle.ZzANGLE; // check me out later.
|
||||
|
||||
if ((PlayerInput(p, SB_FIRE) || (ps[p].quick_kick > 0)) && ps[p].GetActor()->spr.extra > 0)
|
||||
if (ps[p].quick_kick > 0 || (ps[p].curr_weapon != HANDREMOTE_WEAPON && ps[p].curr_weapon != HANDBOMB_WEAPON && ps[p].curr_weapon != TRIPBOMB_WEAPON && ps[p].ammo_amount[ps[p].curr_weapon] >= 0))
|
||||
|
@ -1768,7 +1768,7 @@ static void greenslime(DDukeActor *actor)
|
|||
|
||||
double add = (BobVal(actor->temp_data[1]) * 2) * REPEAT_SCALE;
|
||||
actor->spr.scale = DVector2(0.3125 + add, 0.234375 + add);
|
||||
actor->spr.pos.XY() = ps[p].GetActor()->spr.pos.XY() + ps[p].angle.ang.ToVector() * 8;
|
||||
actor->spr.pos.XY() = ps[p].GetActor()->spr.pos.XY() + ps[p].angle.ZzANGLE.ToVector() * 8;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1222,7 +1222,7 @@ void movetransports_r(void)
|
|||
ps[k].GetActor()->spr.extra = 0;
|
||||
}
|
||||
|
||||
ps[p].angle.ang = Owner->spr.Angles.Yaw; // check me out later.
|
||||
ps[p].angle.ZzANGLE = Owner->spr.Angles.Yaw; // check me out later.
|
||||
|
||||
if (Owner->GetOwner() != Owner)
|
||||
{
|
||||
|
@ -1945,7 +1945,7 @@ void rr_specialstats()
|
|||
{
|
||||
if (act2->spr.picnum == RRTELEPORTDEST)
|
||||
{
|
||||
ps[p].angle.ang = act2->spr.Angles.Yaw; // check me out later.
|
||||
ps[p].angle.ZzANGLE = act2->spr.Angles.Yaw; // check me out later.
|
||||
ps[p].GetActor()->spr.pos = act2->spr.pos.plusZ(-36 + gs.playerheight);
|
||||
ps[p].GetActor()->backuppos();
|
||||
ps[p].setbobpos();
|
||||
|
|
|
@ -123,7 +123,7 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
|||
|
||||
if (ang != DAngle::fromDeg(INT_MIN))
|
||||
{
|
||||
p->angle.oang = p->angle.ang = ang;
|
||||
p->angle.oang = p->angle.ZzANGLE = ang;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@ void drawoverlays(double interpfrac)
|
|||
else
|
||||
{
|
||||
cposxy = interpolatedvalue(pp->GetActor()->getPrevPosWithOffsetZ(), pp->GetActor()->getPosWithOffsetZ(), interpfrac).XY();
|
||||
cang = !SyncInput() ? pp->angle.ang : interpolatedvalue(pp->angle.oang, pp->angle.ang, interpfrac);
|
||||
cang = !SyncInput() ? pp->angle.ZzANGLE : interpolatedvalue(pp->angle.oang, pp->angle.ZzANGLE, interpfrac);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -473,7 +473,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
|
||||
case PLAYER_ANG:
|
||||
if (bSet) ps[iPlayer].angle.settarget(mapangle(lValue));
|
||||
else SetGameVarID(lVar2, ps[iPlayer].angle.ang.Buildang(), sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, ps[iPlayer].angle.ZzANGLE.Buildang(), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_OANG:
|
||||
|
@ -2432,9 +2432,9 @@ int ParseState::parse(void)
|
|||
{
|
||||
DAngle ang;
|
||||
if (g_ac->isPlayer() && ud.multimode > 1)
|
||||
ang = absangle(ps[otherp].angle.ang, (ps[g_p].GetActor()->spr.pos.XY() - ps[otherp].GetActor()->spr.pos.XY()).Angle());
|
||||
ang = absangle(ps[otherp].angle.ZzANGLE, (ps[g_p].GetActor()->spr.pos.XY() - ps[otherp].GetActor()->spr.pos.XY()).Angle());
|
||||
else
|
||||
ang = absangle(ps[g_p].angle.ang, (g_ac->spr.pos.XY() - ps[g_p].GetActor()->spr.pos.XY()).Angle());
|
||||
ang = absangle(ps[g_p].angle.ZzANGLE, (g_ac->spr.pos.XY() - ps[g_p].GetActor()->spr.pos.XY()).Angle());
|
||||
|
||||
j = ang < DAngle22_5;
|
||||
}
|
||||
|
@ -2455,7 +2455,7 @@ int ParseState::parse(void)
|
|||
case concmd_slapplayer:
|
||||
insptr++;
|
||||
forceplayerangle(g_p);
|
||||
ps[g_p].vel.XY() -= ps[g_p].angle.ang.ToVector() * 8;
|
||||
ps[g_p].vel.XY() -= ps[g_p].angle.ZzANGLE.ToVector() * 8;
|
||||
return 0;
|
||||
case concmd_wackplayer:
|
||||
insptr++;
|
||||
|
@ -2463,7 +2463,7 @@ int ParseState::parse(void)
|
|||
forceplayerangle(g_p);
|
||||
else
|
||||
{
|
||||
ps[g_p].vel.XY() -= ps[g_p].angle.ang.ToVector() * 64;
|
||||
ps[g_p].vel.XY() -= ps[g_p].angle.ZzANGLE.ToVector() * 64;
|
||||
ps[g_p].jumping_counter = 767;
|
||||
ps[g_p].jumping_toggle = 1;
|
||||
}
|
||||
|
@ -2833,7 +2833,7 @@ int ParseState::parse(void)
|
|||
case concmd_ifangdiffl:
|
||||
{
|
||||
insptr++;
|
||||
auto ang = absangle(ps[g_p].angle.ang, g_ac->spr.Angles.Yaw); // check me out later.
|
||||
auto ang = absangle(ps[g_p].angle.ZzANGLE, g_ac->spr.Angles.Yaw); // check me out later.
|
||||
parseifelse( ang <= mapangle(*insptr));
|
||||
break;
|
||||
}
|
||||
|
@ -3131,7 +3131,7 @@ int ParseState::parse(void)
|
|||
int i;
|
||||
insptr++;
|
||||
i = *(insptr++); // ID of def
|
||||
SetGameVarID(i, ps[g_p].angle.ang.Buildang(), g_ac, g_p);
|
||||
SetGameVarID(i, ps[g_p].angle.ZzANGLE.Buildang(), g_ac, g_p);
|
||||
break;
|
||||
}
|
||||
case concmd_setplayerangle:
|
||||
|
@ -3139,7 +3139,7 @@ int ParseState::parse(void)
|
|||
int i;
|
||||
insptr++;
|
||||
i = *(insptr++); // ID of def
|
||||
ps[g_p].angle.ang = mapangle(GetGameVarID(i, g_ac, g_p).safeValue() & 2047);
|
||||
ps[g_p].angle.ZzANGLE = mapangle(GetGameVarID(i, g_ac, g_p).safeValue() & 2047);
|
||||
break;
|
||||
}
|
||||
case concmd_getactorangle:
|
||||
|
|
|
@ -211,7 +211,7 @@ inline bool playrunning()
|
|||
inline void doslopetilting(player_struct* p, double const scaleAdjust = 1)
|
||||
{
|
||||
bool const canslopetilt = p->on_ground && p->insector() && p->cursector->lotag != ST_2_UNDERWATER && (p->cursector->floorstat & CSTAT_SECTOR_SLOPE);
|
||||
p->horizon.doViewPitch(p->GetActor()->spr.pos.XY(), p->angle.ang, p->aim_mode == 0, canslopetilt, p->cursector, scaleAdjust);
|
||||
p->horizon.doViewPitch(p->GetActor()->spr.pos.XY(), p->angle.ZzANGLE, p->aim_mode == 0, canslopetilt, p->cursector, scaleAdjust);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -284,7 +284,7 @@ void hud_input(int plnum)
|
|||
p->inven_icon = 3;
|
||||
|
||||
auto pactor =
|
||||
CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ().plusZ(30), TILE_APLAYER, -64, DVector2(0, 0), p->angle.ang, 0., 0., nullptr, 10);
|
||||
CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ().plusZ(30), TILE_APLAYER, -64, DVector2(0, 0), p->angle.ZzANGLE, 0., 0., nullptr, 10);
|
||||
pactor->temp_data[3] = pactor->temp_data[4] = 0;
|
||||
p->holoduke_on = pactor;
|
||||
pactor->spr.yint = plnum;
|
||||
|
@ -843,13 +843,13 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
|||
|
||||
p->angle.processhelpers(scaleAdjust);
|
||||
p->horizon.processLegacyHelperPitch(scaleAdjust);
|
||||
p->GetActor()->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
p->GetActor()->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
|
||||
if (packet)
|
||||
{
|
||||
*packet = loc;
|
||||
auto velvect = DVector2(loc.fvel, loc.svel).Rotated(p->angle.ang) + p->fric;
|
||||
auto velvect = DVector2(loc.fvel, loc.svel).Rotated(p->angle.ZzANGLE) + p->fric;
|
||||
packet->fvel = (float)velvect.X;
|
||||
packet->svel = (float)velvect.Y;
|
||||
loc = {};
|
||||
|
|
|
@ -211,7 +211,7 @@ double hitawall(player_struct* p, walltype** hitw)
|
|||
{
|
||||
HitInfo hit{};
|
||||
|
||||
hitscan(p->GetActor()->getPosWithOffsetZ(), p->cursector, DVector3(p->angle.ang.ToVector() * 1024, 0), hit, CLIPMASK0);
|
||||
hitscan(p->GetActor()->getPosWithOffsetZ(), p->cursector, DVector3(p->angle.ZzANGLE.ToVector() * 1024, 0), hit, CLIPMASK0);
|
||||
if (hitw) *hitw = hit.hitWall;
|
||||
|
||||
return (hit.hitpos.XY() - p->GetActor()->spr.pos.XY()).Length();
|
||||
|
|
|
@ -294,7 +294,7 @@ static void shootknee(DDukeActor* actor, int p, DVector3 pos, DAngle ang)
|
|||
if (splash)
|
||||
{
|
||||
splash->spr.pos.XY() = hit.hitpos.XY();
|
||||
splash->spr.Angles.Yaw = ps[p].angle.ang; // check me out later. // Total tweek
|
||||
splash->spr.Angles.Yaw = ps[p].angle.ZzANGLE; // check me out later. // Total tweek
|
||||
splash->vel.X = 2;
|
||||
ssp(actor, CLIPMASK0);
|
||||
splash->vel.X = 0;
|
||||
|
@ -1071,7 +1071,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
if (actor->isPlayer())
|
||||
{
|
||||
spos = ps[p].GetActor()->getPosWithOffsetZ().plusZ(ps[p].pyoff + 4);
|
||||
sang = ps[p].angle.ang;
|
||||
sang = ps[p].angle.ZzANGLE;
|
||||
|
||||
ps[p].crack_time = CRACK_TIME;
|
||||
|
||||
|
@ -1992,7 +1992,7 @@ static void underwater(int snum, ESyncBits actions, double floorz, double ceilin
|
|||
auto j = spawn(pact, WATERBUBBLE);
|
||||
if (j)
|
||||
{
|
||||
j->spr.pos += (p->angle.ang.ToVector() + DVector2(4 - (global_random & 8), 4 - (global_random & 8))) * 16;
|
||||
j->spr.pos += (p->angle.ZzANGLE.ToVector() + DVector2(4 - (global_random & 8), 4 - (global_random & 8))) * 16;
|
||||
j->spr.scale = DVector2(0.046875, 0.3125);
|
||||
j->spr.pos.Z = p->GetActor()->getOffsetZ() + 8;
|
||||
}
|
||||
|
@ -2012,7 +2012,7 @@ int operateTripbomb(int snum)
|
|||
double vel = 1024, zvel = 0;
|
||||
setFreeAimVelocity(vel, zvel, p->horizon.horizSUM(), 16.);
|
||||
|
||||
hitscan(p->GetActor()->getPosWithOffsetZ(), p->cursector, DVector3(p->angle.ang.ToVector() * vel, zvel), hit, CLIPMASK1);
|
||||
hitscan(p->GetActor()->getPosWithOffsetZ(), p->cursector, DVector3(p->angle.ZzANGLE.ToVector() * vel, zvel), hit, CLIPMASK1);
|
||||
|
||||
if (hit.hitSector == nullptr || hit.actor())
|
||||
return 0;
|
||||
|
@ -2209,8 +2209,8 @@ static void operateweapon(int snum, ESyncBits actions)
|
|||
zvel -= 4;
|
||||
}
|
||||
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ang, vel + p->hbomb_hold_delay * 2, zvel, pact, 1);
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ZzANGLE, vel + p->hbomb_hold_delay * 2, zvel, pact, 1);
|
||||
|
||||
if (isNam())
|
||||
{
|
||||
|
|
|
@ -185,7 +185,7 @@ static void shootmelee(DDukeActor *actor, int p, DVector3 pos, DAngle ang, int a
|
|||
if (splash)
|
||||
{
|
||||
splash->spr.pos.XY() = hit.hitpos.XY();
|
||||
splash->spr.Angles.Yaw = ps[p].angle.ang; // check me out later. // Total tweek
|
||||
splash->spr.Angles.Yaw = ps[p].angle.ZzANGLE; // check me out later. // Total tweek
|
||||
splash->vel.X = 2;
|
||||
ssp(actor, 0);
|
||||
splash->vel.X = 0;
|
||||
|
@ -822,7 +822,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
{
|
||||
p = actor->PlayerIndex();
|
||||
spos = ps[p].GetActor()->getPosWithOffsetZ().plusZ(ps[p].pyoff + 4);
|
||||
sang = ps[p].angle.ang;
|
||||
sang = ps[p].angle.ZzANGLE;
|
||||
|
||||
if (isRRRA()) ps[p].crack_time = CRACK_TIME;
|
||||
}
|
||||
|
@ -1283,7 +1283,7 @@ int doincrements_r(player_struct* p)
|
|||
{
|
||||
p->noise_radius = 1024;
|
||||
madenoise(screenpeek);
|
||||
p->vel.XY() += p->angle.ang.ToVector();
|
||||
p->vel.XY() += p->angle.ZzANGLE.ToVector();
|
||||
}
|
||||
p->eat -= 4;
|
||||
if (p->eat < 0)
|
||||
|
@ -1467,7 +1467,7 @@ void checkweapons_r(player_struct* p)
|
|||
auto j = spawn(p->GetActor(), 7220);
|
||||
if (j)
|
||||
{
|
||||
j->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
j->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
j->saved_ammo = p->ammo_amount[MOTORCYCLE_WEAPON];
|
||||
}
|
||||
p->OnMotorcycle = 0;
|
||||
|
@ -1486,7 +1486,7 @@ void checkweapons_r(player_struct* p)
|
|||
auto j = spawn(p->GetActor(), 7233);
|
||||
if (j)
|
||||
{
|
||||
j->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
j->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
j->saved_ammo = p->ammo_amount[BOAT_WEAPON];
|
||||
}
|
||||
p->OnBoat = 0;
|
||||
|
@ -1764,15 +1764,15 @@ static void onMotorcycle(int snum, ESyncBits &actions)
|
|||
}
|
||||
}
|
||||
|
||||
p->vel.XY() += (p->angle.ang + velAdjustment).ToVector() * currSpeed;
|
||||
p->angle.addadjustment(deltaangle(p->angle.ang, p->angle.ang - DAngle::fromBam(angAdjustment)));
|
||||
p->vel.XY() += (p->angle.ZzANGLE + velAdjustment).ToVector() * currSpeed;
|
||||
p->angle.addadjustment(deltaangle(p->angle.ZzANGLE, p->angle.ZzANGLE - DAngle::fromBam(angAdjustment)));
|
||||
}
|
||||
else if (p->MotoSpeed >= 20 && p->on_ground == 1 && (p->moto_on_mud || p->moto_on_oil))
|
||||
{
|
||||
rng = krand() & 1;
|
||||
velAdjustment = rng == 0 ? -adjust : adjust;
|
||||
currSpeed = MulScale(currSpeed, p->moto_on_oil ? 10 : 5, 7);
|
||||
p->vel.XY() += (p->angle.ang + velAdjustment).ToVector() * currSpeed;
|
||||
p->vel.XY() += (p->angle.ZzANGLE + velAdjustment).ToVector() * currSpeed;
|
||||
}
|
||||
|
||||
p->moto_on_mud = p->moto_on_oil = 0;
|
||||
|
@ -2008,8 +2008,8 @@ static void onBoat(int snum, ESyncBits &actions)
|
|||
angAdjustment >>= 6;
|
||||
}
|
||||
|
||||
p->vel.XY() += (p->angle.ang + velAdjustment).ToVector() * currSpeed;
|
||||
p->angle.addadjustment(deltaangle(p->angle.ang, p->angle.ang - DAngle::fromBam(angAdjustment)));
|
||||
p->vel.XY() += (p->angle.ZzANGLE + velAdjustment).ToVector() * currSpeed;
|
||||
p->angle.addadjustment(deltaangle(p->angle.ZzANGLE, p->angle.ZzANGLE - DAngle::fromBam(angAdjustment)));
|
||||
}
|
||||
if (p->NotOnWater && p->MotoSpeed > 50)
|
||||
p->MotoSpeed -= (p->MotoSpeed / 2.);
|
||||
|
@ -2311,7 +2311,7 @@ static void underwater(int snum, ESyncBits actions, double floorz, double ceilin
|
|||
auto j = spawn(pact, WATERBUBBLE);
|
||||
if (j)
|
||||
{
|
||||
j->spr.pos += (p->angle.ang.ToVector() + DVector2(12 - (global_random & 8), 12 - (global_random & 8))) * 16;
|
||||
j->spr.pos += (p->angle.ZzANGLE.ToVector() + DVector2(12 - (global_random & 8), 12 - (global_random & 8))) * 16;
|
||||
j->spr.scale = DVector2(0.046875, 0.03125);
|
||||
j->spr.pos.Z = p->GetActor()->getOffsetZ() + 8;
|
||||
j->spr.cstat = CSTAT_SPRITE_TRANS_FLIP | CSTAT_SPRITE_TRANSLUCENT;
|
||||
|
@ -2329,7 +2329,7 @@ void onMotorcycleMove(int snum, walltype* wal)
|
|||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
double angleDelta = absangle(p->angle.ang, wal->delta().Angle()).Degrees();
|
||||
double angleDelta = absangle(p->angle.ZzANGLE, wal->delta().Angle()).Degrees();
|
||||
double damageAmount = p->MotoSpeed * p->MotoSpeed;
|
||||
|
||||
const double scale = (180. / 2048.);
|
||||
|
@ -2385,7 +2385,7 @@ void onBoatMove(int snum, int psectlotag, walltype* wal)
|
|||
{
|
||||
auto p = &ps[snum];
|
||||
auto pact = p->GetActor();
|
||||
double angleDelta = absangle(p->angle.ang, wal->delta().Angle()).Degrees();
|
||||
double angleDelta = absangle(p->angle.ZzANGLE, wal->delta().Angle()).Degrees();
|
||||
|
||||
const double scale = (90. / 2048.);
|
||||
p->angle.addadjustment(DAngle::fromDeg(p->MotoSpeed * (krand() & 1 ? -scale : scale)));
|
||||
|
@ -2433,7 +2433,7 @@ void onMotorcycleHit(int snum, DDukeActor* victim)
|
|||
if (numplayers == 1)
|
||||
{
|
||||
Collision coll;
|
||||
DAngle ang = DAngle::fromBuild(p->TiltStatus * 20) + p->angle.ang;
|
||||
DAngle ang = DAngle::fromBuild(p->TiltStatus * 20) + p->angle.ZzANGLE;
|
||||
movesprite_ex(victim, DVector3(ang.ToVector() * 4, victim->vel.Z), CLIPMASK0, coll);
|
||||
}
|
||||
}
|
||||
|
@ -2467,7 +2467,7 @@ void onBoatHit(int snum, DDukeActor* victim)
|
|||
if (numplayers == 1)
|
||||
{
|
||||
Collision coll;
|
||||
DAngle ang = DAngle::fromBuild(p->TiltStatus * 20) + p->angle.ang;
|
||||
DAngle ang = DAngle::fromBuild(p->TiltStatus * 20) + p->angle.ZzANGLE;
|
||||
movesprite_ex(victim, DVector3(ang.ToVector() * 2, victim->vel.Z), CLIPMASK0, coll);
|
||||
}
|
||||
}
|
||||
|
@ -2683,8 +2683,8 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
zvel -= 4;
|
||||
}
|
||||
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 16, DYNAMITE, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ang, (vel + p->hbomb_hold_delay * 2) * 2, zvel, pact, 1);
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 16, DYNAMITE, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ZzANGLE, (vel + p->hbomb_hold_delay * 2) * 2, zvel, pact, 1);
|
||||
|
||||
if (spawned)
|
||||
{
|
||||
|
@ -2735,7 +2735,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
p->visibility = 0;
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector();
|
||||
p->vel.XY() -= p->angle.ZzANGLE.ToVector();
|
||||
}
|
||||
}
|
||||
else if (p->kickback_pic == 2)
|
||||
|
@ -2834,12 +2834,12 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector() * 2;
|
||||
p->vel.XY() -= p->angle.ZzANGLE.ToVector() * 2;
|
||||
}
|
||||
}
|
||||
else if (psectlotag != 857)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector();
|
||||
p->vel.XY() -= p->angle.ZzANGLE.ToVector();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2925,7 +2925,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
|
||||
if (psectlotag != 857)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector();
|
||||
p->vel.XY() -= p->angle.ZzANGLE.ToVector();
|
||||
}
|
||||
checkavailweapon(p);
|
||||
|
||||
|
@ -3065,7 +3065,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
else if (p->kickback_pic == 12)
|
||||
{
|
||||
p->vel.XY() -= p->angle.ang.ToVector();
|
||||
p->vel.XY() -= p->angle.ZzANGLE.ToVector();
|
||||
p->horizon.addPitch(DAngle::fromDeg(-8.88));
|
||||
p->recoil += 20;
|
||||
}
|
||||
|
@ -3091,7 +3091,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
zvel -= 4;
|
||||
}
|
||||
|
||||
CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 16, POWDERKEG, -16, DVector2(0.140625, 0.140625), p->angle.ang, vel * 2, zvel, pact, 1);
|
||||
CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 16, POWDERKEG, -16, DVector2(0.140625, 0.140625), p->angle.ZzANGLE, vel * 2, zvel, pact, 1);
|
||||
}
|
||||
p->kickback_pic++;
|
||||
if (p->kickback_pic > 20)
|
||||
|
@ -3112,7 +3112,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
|
|||
}
|
||||
if (p->kickback_pic < 30)
|
||||
{
|
||||
p->vel.XY() += p->angle.ang.ToVector();
|
||||
p->vel.XY() += p->angle.ZzANGLE.ToVector();
|
||||
}
|
||||
p->kickback_pic++;
|
||||
if (p->kickback_pic > 40)
|
||||
|
@ -3949,7 +3949,7 @@ void OnMotorcycle(player_struct *p, DDukeActor* motosprite)
|
|||
if (motosprite)
|
||||
{
|
||||
p->GetActor()->spr.pos.XY() = motosprite->spr.pos.XY();
|
||||
p->angle.ang = motosprite->spr.Angles.Yaw; // check me out later.
|
||||
p->angle.ZzANGLE = motosprite->spr.Angles.Yaw; // check me out later.
|
||||
p->ammo_amount[MOTORCYCLE_WEAPON] = motosprite->saved_ammo;
|
||||
motosprite->Destroy();
|
||||
}
|
||||
|
@ -3999,12 +3999,12 @@ void OffMotorcycle(player_struct *p)
|
|||
p->VBumpTarget = 0;
|
||||
p->VBumpNow = 0;
|
||||
p->TurbCount = 0;
|
||||
p->vel.XY() = p->angle.ang.ToVector() / 2048.;
|
||||
p->vel.XY() = p->angle.ZzANGLE.ToVector() / 2048.;
|
||||
p->moto_underwater = 0;
|
||||
auto spawned = spawn(p->GetActor(), EMPTYBIKE);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
spawned->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
spawned->saved_ammo = p->ammo_amount[MOTORCYCLE_WEAPON];
|
||||
}
|
||||
}
|
||||
|
@ -4023,7 +4023,7 @@ void OnBoat(player_struct *p, DDukeActor* boat)
|
|||
if (boat)
|
||||
{
|
||||
p->GetActor()->spr.pos.XY() = boat->spr.pos.XY();
|
||||
p->angle.ang = boat->spr.Angles.Yaw; // check me out later.
|
||||
p->angle.ZzANGLE = boat->spr.Angles.Yaw; // check me out later.
|
||||
p->ammo_amount[BOAT_WEAPON] = boat->saved_ammo;
|
||||
boat->Destroy();
|
||||
}
|
||||
|
@ -4060,12 +4060,12 @@ void OffBoat(player_struct *p)
|
|||
p->VBumpTarget = 0;
|
||||
p->VBumpNow = 0;
|
||||
p->TurbCount = 0;
|
||||
p->vel.XY() = p->angle.ang.ToVector() / 2048.;
|
||||
p->vel.XY() = p->angle.ZzANGLE.ToVector() / 2048.;
|
||||
p->moto_underwater = 0;
|
||||
auto spawned = spawn(p->GetActor(), EMPTYBOAT);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.Angles.Yaw = p->angle.ang; // check me out later.
|
||||
spawned->spr.Angles.Yaw = p->angle.ZzANGLE; // check me out later.
|
||||
spawned->saved_ammo = p->ammo_amount[BOAT_WEAPON];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -342,8 +342,8 @@ void operateweapon_ww(int snum, ESyncBits actions)
|
|||
zvel -= 4;
|
||||
}
|
||||
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ang, vel + p->hbomb_hold_delay * 2, zvel, pact, 1);
|
||||
auto spawned = CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),
|
||||
p->angle.ZzANGLE, vel + p->hbomb_hold_delay * 2, zvel, pact, 1);
|
||||
|
||||
if (spawned)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ void resetmys()
|
|||
{
|
||||
mypos = omypos = ps[myconnectindex].GetActor()->getPosWithOffsetZ();
|
||||
myxvel = myyvel = myzvel = 0;
|
||||
myang = ps[myconnectindex].angle.ang;
|
||||
myang = ps[myconnectindex].angle.ZzANGLE;
|
||||
myhoriz = omyhoriz = ps[myconnectindex].horizon.ZzHORIZON;
|
||||
myhorizoff = omyhorizoff = ps[myconnectindex].horizon.ZzHORIZOFF;
|
||||
mycursectnum = sectindex(ps[myconnectindex].cursector);
|
||||
|
|
|
@ -72,7 +72,7 @@ void pickrandomspot(int snum)
|
|||
p->GetActor()->spr.pos = po[i].opos;
|
||||
p->GetActor()->backuppos();
|
||||
p->setbobpos();
|
||||
p->angle.oang = p->angle.ang = po[i].oa;
|
||||
p->angle.oang = p->angle.ZzANGLE = po[i].oa;
|
||||
p->setCursector(po[i].os);
|
||||
}
|
||||
|
||||
|
@ -513,7 +513,7 @@ void resetpspritevars(int g, const DVector3& startpos)
|
|||
STATUSBARTYPE tsbar[MAXPLAYERS];
|
||||
|
||||
auto newActor = CreateActor(ps[0].cursector, startpos.plusZ(gs.playerheight),
|
||||
TILE_APLAYER, 0, DVector2(0, 0), ps[0].angle.ang, 0., 0., nullptr, 10);
|
||||
TILE_APLAYER, 0, DVector2(0, 0), ps[0].angle.ZzANGLE, 0., 0., nullptr, 10);
|
||||
|
||||
newActor->viewzoffset = -gs.playerheight;
|
||||
newActor->backupz();
|
||||
|
@ -626,7 +626,7 @@ void resetpspritevars(int g, const DVector3& startpos)
|
|||
act->SetOwner(act);
|
||||
|
||||
ps[j].setbobpos();
|
||||
ps[j].angle.oang = ps[j].angle.ang = act->spr.Angles.Yaw; // check me out later.
|
||||
ps[j].angle.oang = ps[j].angle.ZzANGLE = act->spr.Angles.Yaw; // check me out later.
|
||||
|
||||
updatesector(act->spr.pos, &ps[j].cursector);
|
||||
|
||||
|
@ -982,7 +982,7 @@ static int LoadTheMap(MapRecord *mi, player_struct*p, int gamemode)
|
|||
STAT_NewLevel(mi->fileName);
|
||||
TITLE_InformName(mi->name);
|
||||
|
||||
p->angle.ang = mapangle(lbang);
|
||||
p->angle.ZzANGLE = mapangle(lbang);
|
||||
|
||||
gotpic.Zero();
|
||||
|
||||
|
|
|
@ -1296,8 +1296,8 @@ void moveclouds(double interpfrac)
|
|||
cloudclock = myclock + 6;
|
||||
|
||||
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
|
||||
cloudx += (float)ps[screenpeek].angle.ang.Cos() * 0.5f;
|
||||
cloudy += (float)ps[screenpeek].angle.ang.Sin() * 0.5f;
|
||||
cloudx += (float)ps[screenpeek].angle.ZzANGLE.Cos() * 0.5f;
|
||||
cloudy += (float)ps[screenpeek].angle.ZzANGLE.Sin() * 0.5f;
|
||||
for (int i = 0; i < numclouds; i++)
|
||||
{
|
||||
// no clamping here!
|
||||
|
|
|
@ -681,7 +681,7 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
|
|||
if (wal->twoSided())
|
||||
wal->nextWall()->cstat = 0;
|
||||
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ang, 0., 0., spr, 3);
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ZzANGLE, 0., 0., spr, 3);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.lotag = SE_128_GLASS_BREAKING;
|
||||
|
@ -875,15 +875,15 @@ void checkplayerhurt_d(player_struct* p, const Collision& coll)
|
|||
p->hurt_delay = 16;
|
||||
SetPlayerPal(p, PalEntry(32, 32, 0, 0));
|
||||
|
||||
p->vel.XY() = -p->angle.ang.ToVector() * 16;
|
||||
p->vel.XY() = -p->angle.ZzANGLE.ToVector() * 16;
|
||||
S_PlayActorSound(DUKE_LONGTERM_PAIN, p->GetActor());
|
||||
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 2, -1);
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 2, -1);
|
||||
break;
|
||||
|
||||
case BIGFORCE:
|
||||
p->hurt_delay = 26;
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 2, -1);
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 2, -1);
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -976,7 +976,7 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
|
|||
if (wal->twoSided())
|
||||
wal->nextWall()->cstat = 0;
|
||||
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ang, 0., 0., spr, 3);
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ZzANGLE, 0., 0., spr, 3);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.lotag = SE_128_GLASS_BREAKING;
|
||||
|
@ -997,7 +997,7 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw
|
|||
if (wal->twoSided())
|
||||
wal->nextWall()->cstat = 0;
|
||||
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ang, 0., 0., spr, 3);
|
||||
auto spawned = CreateActor(sptr, pos, SECTOREFFECTOR, 0, DVector2(0, 0), ps[0].angle.ZzANGLE, 0., 0., spr, 3);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.lotag = SE_128_GLASS_BREAKING;
|
||||
|
@ -1339,7 +1339,7 @@ void checkplayerhurt_r(player_struct* p, const Collision &coll)
|
|||
{
|
||||
case BIGFORCE:
|
||||
p->hurt_delay = 26;
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ang.ToVector() * 2, -1);
|
||||
fi.checkhitwall(p->GetActor(), wal, p->GetActor()->getPosWithOffsetZ() + p->angle.ZzANGLE.ToVector() * 2, -1);
|
||||
break;
|
||||
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ void S_GetCamera(DVector3* c, DAngle* ca, sectortype** cs)
|
|||
else c->Zero();
|
||||
}
|
||||
if (cs) *cs = p->cursector;
|
||||
if (ca) *ca = p->angle.ang;
|
||||
if (ca) *ca = p->angle.ZzANGLE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -427,7 +427,7 @@ void initshell(DDukeActor* actj, DDukeActor* act, bool isshell)
|
|||
if (actj->isPlayer())
|
||||
{
|
||||
snum = actj->PlayerIndex();
|
||||
ang = ps[snum].angle.ang - mapangle((krand() & 63) + 8); //Fine tune
|
||||
ang = ps[snum].angle.ZzANGLE - mapangle((krand() & 63) + 8); //Fine tune
|
||||
|
||||
act->temp_data[0] = krand() & 1;
|
||||
act->spr.pos.Z = 3 + ps[snum].GetActor()->getOffsetZ() + ps[snum].pyoff + (ps[snum].horizon.horizSUM().Tan() * 8.) + (!isshell ? 3 : 0);
|
||||
|
|
|
@ -863,7 +863,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, settargetangle, dukeplayer_settargeta
|
|||
|
||||
double dukeplayer_angle(player_struct* self)
|
||||
{
|
||||
return self->angle.ang.Degrees();
|
||||
return self->angle.ZzANGLE.Degrees();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, angle, dukeplayer_angle)
|
||||
|
|
|
@ -48,7 +48,7 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
|||
|
||||
if (ang != DAngle::fromDeg(INT_MIN))
|
||||
{
|
||||
nPlayer->angle.oang = nPlayer->angle.ang = ang;
|
||||
nPlayer->angle.oang = nPlayer->angle.ZzANGLE = ang;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -293,8 +293,8 @@ void RestartPlayer(int nPlayer)
|
|||
|
||||
pActor->spr.pos = nNStartSprite->spr.pos;
|
||||
ChangeActorSect(pActor, nNStartSprite->sector());
|
||||
plr->angle.ang = nNStartSprite->spr.Angles.Yaw; // check me out later.
|
||||
pActor->spr.Angles.Yaw = plr->angle.ang; // check me out later.
|
||||
plr->angle.ZzANGLE = nNStartSprite->spr.Angles.Yaw; // check me out later.
|
||||
pActor->spr.Angles.Yaw = plr->angle.ZzANGLE; // check me out later.
|
||||
|
||||
floorsprt = insertActor(pActor->sector(), 0);
|
||||
|
||||
|
@ -307,8 +307,8 @@ void RestartPlayer(int nPlayer)
|
|||
{
|
||||
pActor->spr.pos.XY() = plr->sPlayerSave.pos.XY();
|
||||
pActor->spr.pos.Z = plr->sPlayerSave.pSector->floorz;
|
||||
plr->angle.ang = plr->sPlayerSave.nAngle;
|
||||
pActor->spr.Angles.Yaw = plr->angle.ang; // check me out later.
|
||||
plr->angle.ZzANGLE = plr->sPlayerSave.nAngle;
|
||||
pActor->spr.Angles.Yaw = plr->angle.ZzANGLE; // check me out later.
|
||||
|
||||
floorsprt = nullptr;
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ static void pickupMessage(int no)
|
|||
|
||||
void UpdatePlayerSpriteAngle(Player* pPlayer)
|
||||
{
|
||||
inita = pPlayer->angle.ang;
|
||||
inita = pPlayer->angle.ZzANGLE;
|
||||
if (pPlayer->pActor) pPlayer->pActor->spr.Angles.Yaw = inita;
|
||||
}
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
|
|||
double x = ChunkXpos[nFrameBase] + (160 + xOffset);
|
||||
double y = ChunkYpos[nFrameBase] + (100 + yOffset);
|
||||
|
||||
hud_drawsprite(x, y, 65536, fmod(-2 * PlayerList[nLocalPlayer].angle.ang.Buildfang(), kAngleMask + 1), nTile, 0, 0, 1);
|
||||
hud_drawsprite(x, y, 65536, fmod(-2 * PlayerList[nLocalPlayer].angle.ZzANGLE.Buildfang(), kAngleMask + 1), nTile, 0, 0, 1);
|
||||
nFrameBase++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1263,7 +1263,7 @@ void drawscreen(PLAYER* pp, double interpfrac, bool sceneonly)
|
|||
if (pp->sop_control && (!cl_sointerpolation || (CommEnabled && !pp->sop_remote)))
|
||||
{
|
||||
tpos = pp->actor->getPosWithOffsetZ();
|
||||
tang = pp->angle.ang;
|
||||
tang = pp->angle.ZzANGLE;
|
||||
}
|
||||
tsect = pp->cursector;
|
||||
updatesectorz(tpos, &tsect);
|
||||
|
|
|
@ -414,7 +414,7 @@ void InitLevel(MapRecord *maprec)
|
|||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(currentLevel->fileName);
|
||||
TITLE_InformName(currentLevel->name);
|
||||
Player[0].angle.ang = DAngle::fromBuild(ang);
|
||||
Player[0].angle.ZzANGLE = DAngle::fromBuild(ang);
|
||||
|
||||
auto vissect = §or[0]; // hack alert!
|
||||
if (vissect->extra != -1)
|
||||
|
|
|
@ -1956,7 +1956,7 @@ inline bool SectorIsUnderwaterArea(sectortype* sect)
|
|||
|
||||
inline bool PlayerFacingRange(PLAYER* pp, DSWActor* a, DAngle range)
|
||||
{
|
||||
return absangle((a->spr.pos.XY() - pp->actor->spr.pos.XY()).Angle(), pp->angle.ang) < range;
|
||||
return absangle((a->spr.pos.XY() - pp->actor->spr.pos.XY()).Angle(), pp->angle.ZzANGLE) < range;
|
||||
}
|
||||
|
||||
inline bool FacingRange(DSWActor* a1, DSWActor* a2, DAngle range)
|
||||
|
|
|
@ -207,7 +207,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
|||
if (packet)
|
||||
{
|
||||
*packet = loc;
|
||||
auto velvect = DVector2(loc.fvel, loc.svel).Rotated(pp->angle.ang);
|
||||
auto velvect = DVector2(loc.fvel, loc.svel).Rotated(pp->angle.ZzANGLE);
|
||||
packet->fvel = (float)velvect.X;
|
||||
packet->svel = (float)velvect.Y;
|
||||
loc = {};
|
||||
|
|
|
@ -612,7 +612,7 @@ void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio)
|
|||
|
||||
if (TEST_BOOL11(camactor) && numplayers > 1)
|
||||
{
|
||||
drawroomstotile(cp->actor->getPosWithOffsetZ(), cp->angle.ang, cp->horizon.ZzHORIZON, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
drawroomstotile(cp->actor->getPosWithOffsetZ(), cp->angle.ZzANGLE, cp->horizon.ZzHORIZON, cp->cursector, mirror[cnt].campic, smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1260,7 +1260,7 @@ int PlayerInitChemBomb(PLAYER* pp)
|
|||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, pp->cursector, pos, pp->angle.ang, CHEMBOMB_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, pp->cursector, pos, pp->angle.ZzANGLE, CHEMBOMB_VELOCITY);
|
||||
|
||||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
|
@ -1632,7 +1632,7 @@ int PlayerInitCaltrops(PLAYER* pp)
|
|||
|
||||
auto pos = pp->actor->getPosWithOffsetZ().plusZ(pp->bob_z + 8);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, pp->cursector, pos, pp->angle.ang, (CHEMBOMB_VELOCITY + RandomRangeF(CHEMBOMB_VELOCITY)) / 2);
|
||||
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, pp->cursector, pos, pp->angle.ZzANGLE, (CHEMBOMB_VELOCITY + RandomRangeF(CHEMBOMB_VELOCITY)) / 2);
|
||||
|
||||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
|
|
|
@ -59,7 +59,7 @@ Collision MultiClipMove(PLAYER* pp, double zz, double floordist)
|
|||
{
|
||||
// move the box to position instead of using offset- this prevents small rounding errors
|
||||
// allowing you to move through wall
|
||||
DAngle ang = (pp->angle.ang + sop->clipbox_ang[i]);
|
||||
DAngle ang = (pp->angle.ZzANGLE + sop->clipbox_ang[i]);
|
||||
DVector3 spos(pp->actor->getPosWithOffsetZ(), zz);
|
||||
|
||||
DVector2 vect = ang.ToVector() * sop->clipbox_vdist[i];
|
||||
|
|
|
@ -2393,7 +2393,7 @@ void InitPlayerSprite(PLAYER* pp, const DVector3& spawnpos)
|
|||
|
||||
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, spawnpos.plusZ(PLAYER_HEIGHTF), pp->angle.ang);
|
||||
auto actor = SpawnActor(STAT_PLAYER0 + pnum, NINJA_RUN_R0, nullptr, pp->cursector, spawnpos.plusZ(PLAYER_HEIGHTF), pp->angle.ZzANGLE);
|
||||
actor->viewzoffset = -PLAYER_HEIGHTF;
|
||||
|
||||
// if too close to the floor - stand up
|
||||
|
@ -2475,7 +2475,7 @@ void SpawnPlayerUnderSprite(PLAYER* pp)
|
|||
int pnum = int(pp - Player);
|
||||
|
||||
pp->PlayerUnderActor = SpawnActor(STAT_PLAYER_UNDER0 + pnum,
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->actor->getPosWithOffsetZ(), pp->angle.ang);
|
||||
NINJA_RUN_R0, nullptr, pp->cursector, pp->actor->getPosWithOffsetZ(), pp->angle.ZzANGLE);
|
||||
|
||||
DSWActor* actor = pp->PlayerUnderActor;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void GameInterface::WarpToCoords(double x, double y, double z, DAngle ang)
|
|||
|
||||
if (ang != DAngle::fromDeg(INT_MIN))
|
||||
{
|
||||
Player->angle.oang = Player->angle.ang = ang;
|
||||
Player->angle.oang = Player->angle.ZzANGLE = ang;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1311,7 +1311,7 @@ void DoPlayerTeleportPause(PLAYER* pp)
|
|||
|
||||
void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang)
|
||||
{
|
||||
pp->angle.ang = pp->angle.oang = ang;
|
||||
pp->angle.ZzANGLE = pp->angle.oang = ang;
|
||||
pp->actor->spr.pos = pos;
|
||||
pp->actor->backuppos();
|
||||
|
||||
|
@ -1510,14 +1510,14 @@ void UpdatePlayerSpriteAngle(PLAYER* pp)
|
|||
{
|
||||
DSWActor* plActor = pp->actor;
|
||||
plActor->backupang();
|
||||
plActor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
plActor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
|
||||
plActor = pp->PlayerUnderActor;
|
||||
|
||||
if (!Prediction && plActor)
|
||||
{
|
||||
plActor->backupang();
|
||||
plActor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
plActor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1557,11 +1557,11 @@ void DoPlayerTurnVehicle(PLAYER* pp, float avel, double zz, double floordist)
|
|||
|
||||
if (avel != 0)
|
||||
{
|
||||
auto sum = pp->angle.ang + DAngle::fromDeg(avel);
|
||||
auto sum = pp->angle.ZzANGLE + DAngle::fromDeg(avel);
|
||||
if (MultiClipTurn(pp, sum, zz, floordist))
|
||||
{
|
||||
pp->angle.ang = sum;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
pp->angle.ZzANGLE = sum;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1591,11 +1591,11 @@ void DoPlayerTurnVehicleRect(PLAYER* pp, DVector2* pos, DVector2* opos)
|
|||
|
||||
if (avel != 0)
|
||||
{
|
||||
auto sum = pp->angle.ang + DAngle::fromDeg(avel);
|
||||
auto sum = pp->angle.ZzANGLE + DAngle::fromDeg(avel);
|
||||
if (RectClipTurn(pp, sum, pos, opos))
|
||||
{
|
||||
pp->angle.ang = sum;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
pp->angle.ZzANGLE = sum;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1625,7 +1625,7 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel)
|
|||
|
||||
if (fabs(avel) >= FLT_EPSILON)
|
||||
{
|
||||
new_ang = pp->angle.ang + DAngle::fromDeg(avel);
|
||||
new_ang = pp->angle.ZzANGLE + DAngle::fromDeg(avel);
|
||||
|
||||
if (sop->limit_ang_center >= nullAngle)
|
||||
{
|
||||
|
@ -1640,11 +1640,11 @@ void DoPlayerTurnTurret(PLAYER* pp, float avel)
|
|||
}
|
||||
}
|
||||
|
||||
pp->angle.ang = new_ang;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
pp->angle.ZzANGLE = new_ang;
|
||||
pp->actor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
|
||||
OperateSectorObject(pp->sop, pp->angle.ang, pp->sop->pmid);
|
||||
OperateSectorObject(pp->sop, pp->angle.ZzANGLE, pp->sop->pmid);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1677,7 +1677,7 @@ void SlipSlope(PLAYER* pp)
|
|||
void DoPlayerHorizon(PLAYER* pp, float const horz, double const scaleAdjust)
|
||||
{
|
||||
bool const canslopetilt = !(pp->Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)) && pp->cursector && (pp->cursector->floorstat & CSTAT_SECTOR_SLOPE);
|
||||
pp->horizon.doViewPitch(pp->actor->spr.pos.XY(), pp->angle.ang, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursector, scaleAdjust, (pp->Flags & PF_CLIMBING));
|
||||
pp->horizon.doViewPitch(pp->actor->spr.pos.XY(), pp->angle.ZzANGLE, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursector, scaleAdjust, (pp->Flags & PF_CLIMBING));
|
||||
pp->horizon.applyPitch(horz, &pp->input.actions, scaleAdjust);
|
||||
}
|
||||
|
||||
|
@ -1850,7 +1850,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
if (pp->Flags & (PF_DEAD))
|
||||
{
|
||||
ChangeActorSect(pp->actor, pp->cursector);
|
||||
actor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
actor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
UpdatePlayerUnderSprite(pp);
|
||||
return;
|
||||
}
|
||||
|
@ -1896,7 +1896,7 @@ void UpdatePlayerSprite(PLAYER* pp)
|
|||
|
||||
UpdatePlayerUnderSprite(pp);
|
||||
|
||||
actor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
actor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -2353,7 +2353,7 @@ void DoTankTreads(PLAYER* pp)
|
|||
return;
|
||||
|
||||
int vel = int(pp->vect.Length() * 1024);
|
||||
double dot = pp->vect.dot(pp->angle.ang.ToVector());
|
||||
double dot = pp->vect.dot(pp->angle.ZzANGLE.ToVector());
|
||||
if (dot < 0)
|
||||
reverse = true;
|
||||
|
||||
|
@ -2551,7 +2551,7 @@ void DriveCrush(PLAYER* pp, DVector2* quad)
|
|||
continue;
|
||||
|
||||
damage = -(actor->user.Health + 100);
|
||||
PlayerDamageSlide(actor->user.PlayerP, damage, pp->angle.ang);
|
||||
PlayerDamageSlide(actor->user.PlayerP, damage, pp->angle.ZzANGLE);
|
||||
PlayerUpdateHealth(actor->user.PlayerP, damage);
|
||||
PlayerCheckDeath(actor->user.PlayerP, pp->actor);
|
||||
}
|
||||
|
@ -2671,7 +2671,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
|
|||
}
|
||||
|
||||
auto save_sect = pp->cursector;
|
||||
OperateSectorObject(pp->sop, pp->angle.ang, { MAXSO, MAXSO });
|
||||
OperateSectorObject(pp->sop, pp->angle.ZzANGLE, { MAXSO, MAXSO });
|
||||
pp->setcursector(pp->sop->op_main_sector); // for speed
|
||||
|
||||
double floordist = abs(zz - pp->sop->floor_loz);
|
||||
|
@ -2699,7 +2699,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
|
|||
DVector3 hitpos((pos[0] + pos[1]) * 0.5, pp->cursector->floorz - 10);
|
||||
|
||||
hitscan(hitpos, pp->cursector,
|
||||
DVector3(pp->angle.ang.ToVector() * 16, 0),
|
||||
DVector3(pp->angle.ZzANGLE.ToVector() * 16, 0),
|
||||
hit, CLIPMASK_PLAYER);
|
||||
|
||||
if ((hit.hitpos.XY() - hitpos.XY()).LengthSquared() < 50 * 50)
|
||||
|
@ -2772,7 +2772,7 @@ void DoPlayerMoveVehicle(PLAYER* pp)
|
|||
}
|
||||
}
|
||||
|
||||
OperateSectorObject(pp->sop, pp->angle.ang, pp->actor->spr.pos.XY());
|
||||
OperateSectorObject(pp->sop, pp->angle.ZzANGLE, pp->actor->spr.pos.XY());
|
||||
pp->cursector = save_sect; // for speed
|
||||
|
||||
if (!SyncInput())
|
||||
|
@ -3265,7 +3265,7 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
pp->vect.X = pp->vect.Y = 0;
|
||||
|
||||
double climbVel = pp->vect.Length();
|
||||
double dot = pp->vect.dot(pp->angle.ang.ToVector());
|
||||
double dot = pp->vect.dot(pp->angle.ZzANGLE.ToVector());
|
||||
if (dot < 0)
|
||||
climbVel = -climbVel;
|
||||
|
||||
|
@ -3406,7 +3406,7 @@ void DoPlayerClimb(PLAYER* pp)
|
|||
HitInfo near;
|
||||
|
||||
// constantly look for new ladder sector because of warping at any time
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ang, near, 50., NT_Lotag | NT_Hitag | NT_NoSpriteCheck);
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ZzANGLE, near, 50., NT_Lotag | NT_Hitag | NT_NoSpriteCheck);
|
||||
|
||||
if (near.hitWall)
|
||||
{
|
||||
|
@ -3446,7 +3446,7 @@ int DoPlayerWadeSuperJump(PLAYER* pp)
|
|||
|
||||
//for (i = 0; i < SIZ(angs); i++)
|
||||
{
|
||||
FAFhitscan(DVector3(pp->actor->spr.pos.XY(), zh), pp->cursector, DVector3(pp->angle.ang.ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
FAFhitscan(DVector3(pp->actor->spr.pos.XY(), zh), pp->cursector, DVector3(pp->angle.ZzANGLE.ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitWall != nullptr && hit.hitSector != nullptr)
|
||||
{
|
||||
|
@ -3759,9 +3759,9 @@ bool PlayerOnLadder(PLAYER* pp)
|
|||
if (Prediction)
|
||||
return false;
|
||||
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ang, near, 64. + 48., NT_Lotag | NT_Hitag);
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ZzANGLE, near, 64. + 48., NT_Lotag | NT_Hitag);
|
||||
|
||||
double dir = pp->vect.dot(pp->angle.ang.ToVector());
|
||||
double dir = pp->vect.dot(pp->angle.ZzANGLE.ToVector());
|
||||
|
||||
if (dir < 0)
|
||||
return false;
|
||||
|
@ -3771,12 +3771,12 @@ bool PlayerOnLadder(PLAYER* pp)
|
|||
|
||||
for (i = 0; i < SIZ(angles); i++)
|
||||
{
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ang + angles[i], near, 37.5, NT_Lotag | NT_Hitag | NT_NoSpriteCheck);
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ZzANGLE + angles[i], near, 37.5, NT_Lotag | NT_Hitag | NT_NoSpriteCheck);
|
||||
|
||||
if (near.hitWall == nullptr || near.hitpos.X < 6.25 || near.hitWall->lotag != TAG_WALL_CLIMB)
|
||||
return false;
|
||||
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3((pp->angle.ang + angles[i]).ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3((pp->angle.ZzANGLE + angles[i]).ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
|
@ -5122,7 +5122,7 @@ void DoPlayerBeginOperate(PLAYER* pp)
|
|||
pp->sop = pp->sop_control = sop;
|
||||
sop->controller = pp->actor;
|
||||
|
||||
pp->angle.oang = pp->angle.ang = sop->ang;
|
||||
pp->angle.oang = pp->angle.ZzANGLE = sop->ang;
|
||||
pp->actor->spr.pos.XY() = sop->pmid.XY();
|
||||
updatesector(pp->actor->getPosWithOffsetZ(), &pp->cursector);
|
||||
calcSlope(pp->cursector, pp->actor->getPosWithOffsetZ(), &cz, &fz);
|
||||
|
@ -5212,7 +5212,7 @@ void DoPlayerBeginRemoteOperate(PLAYER* pp, SECTOR_OBJECT* sop)
|
|||
|
||||
auto save_sect = pp->cursector;
|
||||
|
||||
pp->angle.oang = pp->angle.ang = sop->ang;
|
||||
pp->angle.oang = pp->angle.ZzANGLE = sop->ang;
|
||||
pp->actor->spr.pos.XY() = sop->pmid.XY();
|
||||
updatesector(pp->actor->getPosWithOffsetZ(), &pp->cursector);
|
||||
calcSlope(pp->cursector, pp->actor->getPosWithOffsetZ(), &cz, &fz);
|
||||
|
@ -5334,9 +5334,9 @@ void DoPlayerStopOperate(PLAYER* pp)
|
|||
{
|
||||
DSWActor* rsp = pp->remoteActor;
|
||||
if (TEST_BOOL1(rsp))
|
||||
pp->angle.ang = pp->angle.oang = rsp->spr.Angles.Yaw; // check me out later.
|
||||
pp->angle.ZzANGLE = pp->angle.oang = rsp->spr.Angles.Yaw; // check me out later.
|
||||
else
|
||||
pp->angle.ang = pp->angle.oang = (pp->sop_remote->pmid.XY() - pp->actor->spr.pos.XY()).Angle();
|
||||
pp->angle.ZzANGLE = pp->angle.oang = (pp->sop_remote->pmid.XY() - pp->actor->spr.pos.XY()).Angle();
|
||||
}
|
||||
|
||||
if (pp->sop_control)
|
||||
|
@ -5968,7 +5968,7 @@ void DoPlayerDeathFollowKiller(PLAYER* pp)
|
|||
{
|
||||
if (FAFcansee(ActorVectOfTop(killer), killer->sector(), pp->actor->getPosWithOffsetZ(), pp->cursector))
|
||||
{
|
||||
pp->angle.addadjustment(deltaangle(pp->angle.ang, (killer->spr.pos.XY() - pp->actor->spr.pos.XY()).Angle()) * (1. / 16.));
|
||||
pp->angle.addadjustment(deltaangle(pp->angle.ZzANGLE, (killer->spr.pos.XY() - pp->actor->spr.pos.XY()).Angle()) * (1. / 16.));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6004,7 +6004,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
|
|||
plActor->spr.picnum = plActor->user.State->Pic;
|
||||
plActor->spr.picnum = plActor->user.State->Pic;
|
||||
plActor->spr.cstat &= ~(CSTAT_SPRITE_YCENTER);
|
||||
plActor->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
plActor->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
|
||||
DoSpawnTeleporterEffect(plActor);
|
||||
PlaySound(DIGI_TELEPORT, pp, v3df_none);
|
||||
|
@ -7047,7 +7047,7 @@ void InitAllPlayers(void)
|
|||
// Initialize all [MAX_SW_PLAYERS] arrays here!
|
||||
for (pp = Player; pp < &Player[MAX_SW_PLAYERS]; pp++)
|
||||
{
|
||||
pp->angle.ang = pp->angle.oang = pfirst->angle.ang;
|
||||
pp->angle.ZzANGLE = pp->angle.oang = pfirst->angle.ZzANGLE;
|
||||
pp->horizon.ZzHORIZON = pp->horizon.ZzOLDHORIZON = pfirst->horizon.ZzHORIZON;
|
||||
pp->cursector = pfirst->cursector;
|
||||
// set like this so that player can trigger something on start of the level
|
||||
|
@ -7203,7 +7203,7 @@ void PlayerSpawnPosition(PLAYER* pp)
|
|||
|
||||
ASSERT(spawn_sprite != nullptr);
|
||||
|
||||
pp->angle.ang = pp->angle.oang = spawn_sprite->spr.Angles.Yaw; // check me out later.
|
||||
pp->angle.ZzANGLE = pp->angle.oang = spawn_sprite->spr.Angles.Yaw; // check me out later.
|
||||
pp->setcursector(spawn_sprite->sector());
|
||||
|
||||
if (pp->actor)
|
||||
|
@ -7266,7 +7266,7 @@ void InitMultiPlayerInfo(const DVector3& spawnpos)
|
|||
continue;
|
||||
}
|
||||
|
||||
auto start0 = SpawnActor(MultiStatList[stat], ST1, nullptr, pp->cursector, spawnpos.plusZ(PLAYER_HEIGHTF), pp->angle.ang);
|
||||
auto start0 = SpawnActor(MultiStatList[stat], ST1, nullptr, pp->cursector, spawnpos.plusZ(PLAYER_HEIGHTF), pp->angle.ZzANGLE);
|
||||
start0->viewzoffset = -PLAYER_HEIGHTF;
|
||||
|
||||
// if too close to the floor - stand up
|
||||
|
@ -7559,7 +7559,7 @@ DEFINE_ACTION_FUNCTION(_SWPlayer, MaxUserHealth)
|
|||
DEFINE_ACTION_FUNCTION(_SWPlayer, GetBuildAngle)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(PLAYER);
|
||||
ACTION_RETURN_INT(self->angle.ang.Buildang());
|
||||
ACTION_RETURN_INT(self->angle.ZzANGLE.Buildang());
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_SW, WeaponMaxAmmo)
|
||||
|
|
|
@ -2140,7 +2140,7 @@ bool NearThings(PLAYER* pp)
|
|||
return false;
|
||||
}
|
||||
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ang, near, 64., NT_Lotag | NT_Hitag);
|
||||
neartag(pp->actor->getPosWithOffsetZ(), pp->cursector, pp->angle.ZzANGLE, near, 64., NT_Lotag | NT_Hitag);
|
||||
|
||||
|
||||
// hit a sprite? Check to see if it has sound info in it!
|
||||
|
@ -2173,7 +2173,7 @@ bool NearThings(PLAYER* pp)
|
|||
{
|
||||
HitInfo hit{};
|
||||
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ().plusZ(-30), pp->cursector, DVector3(pp->angle.ang.ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ().plusZ(-30), pp->cursector, DVector3(pp->angle.ZzANGLE.ToVector() * 1024, 0), hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitSector == nullptr)
|
||||
return false;
|
||||
|
@ -2221,7 +2221,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, double z, double dist, int typ
|
|||
HitInfo near;
|
||||
|
||||
|
||||
neartag(DVector3(pp->actor->spr.pos.XY(), z), pp->cursector, pp->angle.ang, near, dist, type);
|
||||
neartag(DVector3(pp->actor->spr.pos.XY(), z), pp->cursector, pp->angle.ZzANGLE, near, dist, type);
|
||||
|
||||
if (near.hitSector != nullptr)
|
||||
{
|
||||
|
|
|
@ -603,7 +603,7 @@ void GameInterface::UpdateSounds(void)
|
|||
else
|
||||
tang = (pp->sop_remote->pmid.XY() - pp->actor->spr.pos.XY()).Angle();
|
||||
}
|
||||
else tang = pp->angle.ang;
|
||||
else tang = pp->angle.ZzANGLE;
|
||||
|
||||
listener.angle = float(-tang.Radians());
|
||||
listener.velocity.Zero();
|
||||
|
|
|
@ -1480,7 +1480,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
|
|||
{
|
||||
pp->Flags |= (PF_PLAYER_RIDING);
|
||||
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveAng = pp->angle.ZzANGLE;
|
||||
pp->Revolve.XY() = pp->actor->spr.pos.XY();
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
|
@ -1502,7 +1502,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
|
|||
// save the current information so when Player stops
|
||||
// moving then you
|
||||
// know where he was last
|
||||
pp->RevolveAng = pp->angle.ang;
|
||||
pp->RevolveAng = pp->angle.ZzANGLE;
|
||||
pp->Revolve.XY() = pp->actor->spr.pos.XY();
|
||||
|
||||
// set the delta angle to 0 when moving
|
||||
|
@ -1516,7 +1516,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
|
|||
pp->Revolve += move;
|
||||
|
||||
// Last known angle is now adjusted by the delta angle
|
||||
pp->RevolveAng = deltaangle(pp->RevolveDeltaAng, pp->angle.ang);
|
||||
pp->RevolveAng = deltaangle(pp->RevolveDeltaAng, pp->angle.ZzANGLE);
|
||||
}
|
||||
|
||||
// increment Players delta angle
|
||||
|
@ -1529,7 +1529,7 @@ void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move)
|
|||
|
||||
// New angle is formed by taking last known angle and
|
||||
// adjusting by the delta angle
|
||||
pp->angle.addadjustment(deltaangle(pp->RevolveAng + pp->RevolveDeltaAng, pp->angle.ang));
|
||||
pp->angle.addadjustment(deltaangle(pp->RevolveAng + pp->RevolveDeltaAng, pp->angle.ZzANGLE));
|
||||
|
||||
UpdatePlayerSprite(pp);
|
||||
}
|
||||
|
|
|
@ -11584,7 +11584,7 @@ void InitSpellRing(PLAYER* pp)
|
|||
|
||||
DAngle ang_diff = DAngle360 / max_missiles;
|
||||
|
||||
DAngle ang_start = pp->angle.ang - DAngle180;
|
||||
DAngle ang_start = pp->angle.ZzANGLE - DAngle180;
|
||||
|
||||
if (!SW_SHAREWARE)
|
||||
PlaySound(DIGI_RFWIZ, pp, v3df_none);
|
||||
|
@ -11971,7 +11971,7 @@ void InitSpellNapalm(PLAYER* pp)
|
|||
for (i = 0; i < SIZ(mp); i++)
|
||||
{
|
||||
auto actor = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, pp->cursector,
|
||||
pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ang, NAPALM_VELOCITY*2);
|
||||
pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ZzANGLE, NAPALM_VELOCITY*2);
|
||||
|
||||
actor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -12106,7 +12106,7 @@ int InitSpellMirv(PLAYER* pp)
|
|||
if (!pp->insector())
|
||||
return 0;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Mirv, pp->cursector, pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ang, MIRV_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Mirv, pp->cursector, pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ZzANGLE, MIRV_VELOCITY);
|
||||
|
||||
PlaySound(DIGI_MIRVWIZ, actorNew, v3df_follow);
|
||||
|
||||
|
@ -12201,7 +12201,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
bubble = SpawnBubble(pp->actor);
|
||||
if (bubble != nullptr)
|
||||
{
|
||||
bubble->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
bubble->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
|
||||
auto random_amt = RandomAngle(DAngle22_5 / 4) - DAngle22_5 / 8;
|
||||
|
||||
|
@ -12248,9 +12248,9 @@ int InitSwordAttack(PLAYER* pp)
|
|||
HitInfo hit{};
|
||||
|
||||
double dax = 1024., daz = 0;
|
||||
DAngle daang = pp->angle.ang;
|
||||
DAngle daang = pp->angle.ZzANGLE;
|
||||
setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ZzANGLE.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
@ -12326,7 +12326,7 @@ int InitSwordAttack(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos, pp->angle.ang, plActor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos, pp->angle.ZzANGLE, plActor->user.ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
|
@ -12369,7 +12369,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
bubble = SpawnBubble(pp->actor);
|
||||
if (bubble != nullptr)
|
||||
{
|
||||
bubble->spr.Angles.Yaw = pp->angle.ang; // check me out later.
|
||||
bubble->spr.Angles.Yaw = pp->angle.ZzANGLE; // check me out later.
|
||||
|
||||
auto random_amt = RandomAngle(DAngle22_5 / 4) - DAngle22_5 / 8;
|
||||
|
||||
|
@ -12426,9 +12426,9 @@ int InitFistAttack(PLAYER* pp)
|
|||
{
|
||||
HitInfo hit{};
|
||||
double dax = 1024., daz = 0;
|
||||
auto daang = pp->angle.ang;
|
||||
auto daang = pp->angle.ZzANGLE;
|
||||
setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.));
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
|
||||
FAFhitscan(pp->actor->getPosWithOffsetZ(), pp->cursector, DVector3(pp->angle.ZzANGLE.ToVector() * dax, daz), hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitSector == nullptr)
|
||||
return 0;
|
||||
|
@ -12517,7 +12517,7 @@ int InitFistAttack(PLAYER* pp)
|
|||
|
||||
if (hit.hitWall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit.hitWall, hit.hitpos, pp->angle.ang, plActor->user.ID);
|
||||
HitBreakWall(hit.hitWall, hit.hitpos, pp->angle.ZzANGLE, plActor->user.ID);
|
||||
}
|
||||
// hit non breakable wall - do sound and puff
|
||||
else
|
||||
|
@ -12980,7 +12980,7 @@ int InitStar(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, STAR1, s_Star, pp->cursector, pos, pp->angle.ang, STAR_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, STAR1, s_Star, pp->cursector, pos, pp->angle.ZzANGLE, STAR_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.scale = DVector2(STAR_REPEAT, STAR_REPEAT);
|
||||
|
@ -13080,7 +13080,7 @@ void InitHeartAttack(PLAYER* pp)
|
|||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE_SKIP4, BLOOD_WORM, s_BloodWorm, pp->cursector,
|
||||
pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ang, BLOOD_WORM_VELOCITY*2);
|
||||
pp->actor->getPosWithOffsetZ().plusZ(12), pp->angle.ZzANGLE, BLOOD_WORM_VELOCITY*2);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -13231,7 +13231,7 @@ int InitShotgun(PLAYER* pp)
|
|||
if (WeaponAutoAimHitscan(pp->actor, &daz, &daang, false) == nullptr)
|
||||
{
|
||||
setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000.);
|
||||
daang = pp->angle.ang;
|
||||
daang = pp->angle.ZzANGLE;
|
||||
}
|
||||
|
||||
double ndaz;
|
||||
|
@ -13383,7 +13383,7 @@ int InitLaser(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, s_Laser, pp->cursector, pos, pp->angle.ang, 18.75);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, s_Laser, pp->cursector, pos, pp->angle.ZzANGLE, 18.75);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(pp->actor, actorNew);
|
||||
|
@ -13481,7 +13481,7 @@ int InitRail(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], pp->cursector, pos, pp->angle.ang, 75);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], pp->cursector, pos, pp->angle.ZzANGLE, 75);
|
||||
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
|
@ -13646,7 +13646,7 @@ int InitRocket(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector, pos, pp->angle.ang, ROCKET_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector, pos, pp->angle.ZzANGLE, ROCKET_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.scale = DVector2(1.40626, 1.40625);
|
||||
|
@ -13753,7 +13753,7 @@ int InitBunnyRocket(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R4, &s_BunnyRocket[0][0], pp->cursector, pos, pp->angle.ang, ROCKET_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R4, &s_BunnyRocket[0][0], pp->cursector, pos, pp->angle.ZzANGLE, ROCKET_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.scale = DVector2(1, 1);
|
||||
|
@ -13855,7 +13855,7 @@ int InitNuke(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector, pos, pp->angle.ang, 700/16.);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], pp->cursector, pos, pp->angle.ZzANGLE, 700/16.);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.scale = DVector2(2, 2);
|
||||
|
@ -13912,7 +13912,7 @@ int InitNuke(PLAYER* pp)
|
|||
UpdateChangeXY(actorNew);
|
||||
actorNew->user.change.Z = zvel;
|
||||
|
||||
PlayerDamageSlide(pp, -40, pp->angle.ang + DAngle180); // Recoil slide
|
||||
PlayerDamageSlide(pp, -40, pp->angle.ZzANGLE + DAngle180); // Recoil slide
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -14031,7 +14031,7 @@ int InitMicro(PLAYER* pp)
|
|||
else
|
||||
{
|
||||
picked = nullptr;
|
||||
angle = pp->angle.ang;
|
||||
angle = pp->angle.ZzANGLE;
|
||||
}
|
||||
|
||||
auto pos = pp->actor->getPosWithOffsetZ().plusZ(pp->bob_z + 4 + RandomRange(20));
|
||||
|
@ -15226,7 +15226,7 @@ int InitTracerUzi(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_Tracer, pp->cursector, pp->actor->getPosWithOffsetZ().plusZ(nz), pp->angle.ang, TRACER_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_Tracer, pp->cursector, pp->actor->getPosWithOffsetZ().plusZ(nz), pp->angle.ZzANGLE, TRACER_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(pp->actor, actorNew);
|
||||
|
@ -15524,7 +15524,7 @@ int InitUzi(PLAYER* pp)
|
|||
}
|
||||
else
|
||||
{
|
||||
daang = pp->angle.ang + mapangle(RandomRange(24) - 12);
|
||||
daang = pp->angle.ZzANGLE + mapangle(RandomRange(24) - 12);
|
||||
setFreeAimVelocity(dax, daz, pp->horizon.ZzHORIZON, 1000. - (RandomRangeF(24000/256.) - 12000/256.));
|
||||
}
|
||||
|
||||
|
@ -16667,7 +16667,7 @@ int InitGrenade(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0][0], pp->cursector, pos, pp->angle.ang, GRENADE_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0][0], pp->cursector, pos, pp->angle.ZzANGLE, GRENADE_VELOCITY);
|
||||
|
||||
// don't throw it as far if crawling
|
||||
if (pp->Flags & (PF_CRAWLING))
|
||||
|
@ -16805,7 +16805,7 @@ int InitMine(PLAYER* pp)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, pp->cursector, pos, pp->angle.ang, MINE_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, pp->cursector, pos, pp->angle.ZzANGLE, MINE_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.scale = DVector2(0.5, 0.5);
|
||||
|
@ -16828,7 +16828,7 @@ int InitMine(PLAYER* pp)
|
|||
|
||||
UpdateChange(actorNew, 0.5);
|
||||
|
||||
double dot = pp->vect.dot(pp->angle.ang.ToVector());
|
||||
double dot = pp->vect.dot(pp->angle.ZzANGLE.ToVector());
|
||||
|
||||
// don't adjust for strafing
|
||||
// not really sure what to do here as the original formula was very likely to overflow, creating a Q0.32 value.
|
||||
|
@ -16933,7 +16933,7 @@ int InitFireball(PLAYER* pp)
|
|||
|
||||
auto pos = pp->actor->getPosWithOffsetZ().plusZ(pp->bob_z + 15);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Fireball, pp->cursector, pos, pp->angle.ang, FIREBALL_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Fireball, pp->cursector, pos, pp->angle.ZzANGLE, FIREBALL_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.scale = DVector2(0.625, 0.625);
|
||||
|
|
|
@ -787,7 +787,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->actor->getPosWithOffsetZ(), pp->angle.ang, 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->actor->getPosWithOffsetZ(), pp->angle.ZzANGLE, 0);
|
||||
SetOwner(actorNew, ownerActor);
|
||||
actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal;
|
||||
actorNew->spr.Angles.Yaw = RandomAngle();
|
||||
|
|
Loading…
Reference in a new issue