mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- got rid of all TILE_* globals, except TILE_CROSSHAIR.
This commit is contained in:
parent
b78d268ef2
commit
0249725ed8
17 changed files with 23 additions and 26 deletions
|
@ -188,6 +188,7 @@ static FFlagDef DukeActorFlagDefs[] =
|
|||
DEFINE_FLAG(SFLAG3, DONTENTERWATERONGROUND, DDukeActor, flags3),
|
||||
DEFINE_FLAG(SFLAG3, RANDOMANGLEONWATER, DDukeActor, flags3),
|
||||
DEFINE_FLAG(SFLAG3, NORANDOMANGLEWHENBLOCKED, DDukeActor, flags3),
|
||||
DEFINE_FLAG(SFLAG3, QUICKALTERANG, DDukeActor, flags3),
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -3553,7 +3553,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
|
|||
else
|
||||
goalang = (Owner->spr.pos.XY() - actor->spr.pos.XY()).Angle();
|
||||
|
||||
if (actor->vel.X != 0 && actor->spr.picnum != TILE_DRONE)
|
||||
if (actor->vel.X != 0 && !(actor->flags3 & SFLAG3_QUICKALTERANG))
|
||||
{
|
||||
angdif = deltaangle(aang, goalang);
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
continue;
|
||||
}
|
||||
|
||||
if (h->spr.picnum == DTILE_APLAYER)
|
||||
if (h->isPlayer())
|
||||
{
|
||||
p = h->PlayerIndex();
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
|
|||
continue;
|
||||
}
|
||||
|
||||
if (h->spr.picnum == RTILE_APLAYER)
|
||||
if (h->isPlayer())
|
||||
{
|
||||
p = h->PlayerIndex();
|
||||
|
||||
|
|
|
@ -112,3 +112,5 @@ xx(RedneckMoonshine)
|
|||
xx(RedneckTitgun)
|
||||
xx(RedneckTitAmmo)
|
||||
xx(DukeRadiusExplosion)
|
||||
xx(DukePlayerBase)
|
||||
xx(DukePlayerPawn)
|
||||
|
|
|
@ -421,6 +421,7 @@ enum sflags3_t
|
|||
SFLAG3_DONTENTERWATERONGROUND = 0x00080000,
|
||||
SFLAG3_RANDOMANGLEONWATER = 0x00100000,
|
||||
SFLAG3_NORANDOMANGLEWHENBLOCKED = 0x00200000,
|
||||
SFLAG3_QUICKALTERANG = 0x00400000,
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -136,10 +136,6 @@ void SetDispatcher()
|
|||
}
|
||||
|
||||
|
||||
int TILE_APLAYER;
|
||||
int TILE_DRONE;
|
||||
int TILE_WATERBUBBLE;
|
||||
int TILE_BLOODPOOL;
|
||||
int TILE_CROSSHAIR;
|
||||
|
||||
END_DUKE_NS
|
||||
|
|
|
@ -57,10 +57,6 @@ void initactorflags_d()
|
|||
gs.weaponsandammosprites[14] = DukeFreezeAmmoClass;
|
||||
gs.firstdebris = DTILE_SCRAP6;
|
||||
|
||||
TILE_APLAYER = DTILE_APLAYER;
|
||||
TILE_DRONE = DTILE_DRONE;
|
||||
TILE_WATERBUBBLE = DTILE_WATERBUBBLE;
|
||||
TILE_BLOODPOOL = DTILE_BLOODPOOL;
|
||||
TILE_CROSSHAIR = DTILE_CROSSHAIR;
|
||||
|
||||
}
|
||||
|
|
|
@ -50,10 +50,6 @@ void initactorflags_r()
|
|||
gs.weaponsandammosprites[13] = RedneckTitgunClass;
|
||||
gs.weaponsandammosprites[14] = RedneckTitAmmoClass;
|
||||
|
||||
TILE_APLAYER = RTILE_APLAYER;
|
||||
TILE_DRONE = RTILE_DRONE;
|
||||
TILE_WATERBUBBLE = RTILE_WATERBUBBLE;
|
||||
TILE_BLOODPOOL = RTILE_BLOODPOOL;
|
||||
TILE_CROSSHAIR = RTILE_CROSSHAIR;
|
||||
|
||||
gs.firstdebris = RTILE_SCRAP6;
|
||||
|
|
|
@ -296,6 +296,12 @@ inline const ActorInfo* DDukeActor::conInfo() const
|
|||
return tn < 0 ? nullptr : &gs.actorinfo[tn];
|
||||
}
|
||||
|
||||
inline bool DDukeActor::isPlayer() const
|
||||
{
|
||||
return IsKindOf(DukePlayerBaseClass);
|
||||
}
|
||||
|
||||
|
||||
inline void setPlayerActorViewZOffset(DDukeActor* const pact)
|
||||
{
|
||||
if (!PlayClock)
|
||||
|
|
|
@ -291,7 +291,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->GetActor()->spr.Angles.Yaw, 0., 0., nullptr, 10);
|
||||
CreateActor(p->cursector, p->GetActor()->getPosWithOffsetZ().plusZ(30), DukePlayerPawnClass, -64, DVector2(0, 0), p->GetActor()->spr.Angles.Yaw, 0., 0., nullptr, 10);
|
||||
pactor->temp_data[3] = pactor->temp_data[4] = 0;
|
||||
p->holoduke_on = pactor;
|
||||
pactor->spr.yint = plnum;
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
BEGIN_DUKE_NS
|
||||
|
||||
// These are all globally accessed tiles.
|
||||
extern int TILE_APLAYER;
|
||||
extern int TILE_DRONE;
|
||||
extern int TILE_WATERBUBBLE;
|
||||
extern int TILE_BLOODPOOL;
|
||||
extern int TILE_CROSSHAIR;
|
||||
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@ void resetpspritevars(int g, const DVector3& startpos, const DAngle startang)
|
|||
STATUSBARTYPE tsbar[MAXPLAYERS];
|
||||
|
||||
auto newActor = CreateActor(ps[0].cursector, startpos,
|
||||
TILE_APLAYER, 0, DVector2(0, 0), startang, 0., 0., nullptr, 10);
|
||||
DukePlayerPawnClass /*fixme for RR later!*/, 0, DVector2(0, 0), startang, 0., 0., nullptr, 10);
|
||||
|
||||
newActor->spr.Angles.Pitch = DAngle::fromDeg(-17.354);
|
||||
newActor->backuploc();
|
||||
|
|
|
@ -144,10 +144,7 @@ public:
|
|||
return spr.yint;
|
||||
}
|
||||
|
||||
bool isPlayer() const
|
||||
{
|
||||
return spr.picnum == TILE_APLAYER;
|
||||
}
|
||||
bool isPlayer() const;
|
||||
|
||||
void Serialize(FSerializer& arc) override;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ class DukeDrone : DukeActor
|
|||
+KILLCOUNT;
|
||||
+NOWATERDIP;
|
||||
+FLOATING;
|
||||
+QUICKALTERANG;
|
||||
falladjustz 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
class DukePlayerPawn : DukeActor
|
||||
class DukePlayerBase : DukeActor
|
||||
{
|
||||
}
|
||||
|
||||
class DukePlayerPawn : DukePlayerBase
|
||||
{
|
||||
default
|
||||
{
|
||||
|
|
|
@ -440,6 +440,7 @@ class RedneckMosquito : DukeActor
|
|||
+KILLCOUNT;
|
||||
+NOWATERDIP;
|
||||
+FLOATING;
|
||||
+QUICKALTERANG;
|
||||
falladjustz 0;
|
||||
}
|
||||
override void Initialize()
|
||||
|
|
Loading…
Reference in a new issue