mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- SW GC preparation commit noise.
This commit is contained in:
parent
1d371b8cbf
commit
6cb260d916
9 changed files with 64 additions and 42 deletions
|
@ -42,18 +42,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
|
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DSWActor, false, true)
|
|
||||||
IMPLEMENT_POINTERS_START(DSWActor)
|
|
||||||
IMPLEMENT_POINTER(ownerActor)
|
|
||||||
IMPLEMENT_POINTER(user.lowActor)
|
|
||||||
IMPLEMENT_POINTER(user.lowActor)
|
|
||||||
IMPLEMENT_POINTER(user.highActor)
|
|
||||||
IMPLEMENT_POINTER(user.targetActor)
|
|
||||||
IMPLEMENT_POINTER(user.flameActor)
|
|
||||||
IMPLEMENT_POINTER(user.attachActor)
|
|
||||||
IMPLEMENT_POINTER(user.WpnGoalActor)
|
|
||||||
IMPLEMENT_POINTERS_END
|
|
||||||
|
|
||||||
extern int jump_grav;
|
extern int jump_grav;
|
||||||
|
|
||||||
extern STATE s_DebrisNinja[];
|
extern STATE s_DebrisNinja[];
|
||||||
|
|
|
@ -951,9 +951,9 @@ int DoBunnyQuickJump(DSWActor* actor)
|
||||||
DoPickCloseBunny(actor);
|
DoPickCloseBunny(actor);
|
||||||
|
|
||||||
// Random Chance of like sexes fighting
|
// Random Chance of like sexes fighting
|
||||||
if (u->lowActor)
|
DSWActor* hitActor = u->lowActor;
|
||||||
|
if (hitActor)
|
||||||
{
|
{
|
||||||
auto hitActor = u->lowActor;
|
|
||||||
SPRITEp tsp = &hitActor->s();
|
SPRITEp tsp = &hitActor->s();
|
||||||
USERp tu = hitActor->u();
|
USERp tu = hitActor->u();
|
||||||
|
|
||||||
|
@ -993,9 +993,9 @@ int DoBunnyQuickJump(DSWActor* actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get layed!
|
// Get layed!
|
||||||
if (u->lowActor && u->spal == PALETTE_PLAYER8) // Only males check this
|
hitActor = u->lowActor;
|
||||||
|
if (hitActor && u->spal == PALETTE_PLAYER8) // Only males check this
|
||||||
{
|
{
|
||||||
auto hitActor = u->lowActor;
|
|
||||||
SPRITEp tsp = &hitActor->s();
|
SPRITEp tsp = &hitActor->s();
|
||||||
USERp tu = hitActor->u();
|
USERp tu = hitActor->u();
|
||||||
|
|
||||||
|
|
|
@ -1364,12 +1364,16 @@ void UpdateWallPortalState()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto sp = &mirror[i].cameraActor->s();
|
DSWActor* cam = mirror[i].cameraActor;
|
||||||
if (!TEST_BOOL1(sp))
|
if (cam)
|
||||||
{
|
{
|
||||||
wal->portalflags = PORTAL_WALL_TO_SPRITE;
|
auto sp = &cam->s();
|
||||||
wal->portalnum = i;
|
if (!TEST_BOOL1(sp))
|
||||||
wall_to_sprite_actors[i] = mirror[i].cameraActor;
|
{
|
||||||
|
wal->portalflags = PORTAL_WALL_TO_SPRITE;
|
||||||
|
wal->portalnum = i;
|
||||||
|
wall_to_sprite_actors[i] = cam;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,6 +90,18 @@ CVAR(Bool, sw_bunnyrockets, false, CVAR_SERVERINFO | CVAR_CHEAT); // This is a
|
||||||
|
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
|
IMPLEMENT_CLASS(DSWActor, false, true)
|
||||||
|
IMPLEMENT_POINTERS_START(DSWActor)
|
||||||
|
IMPLEMENT_POINTER(ownerActor)
|
||||||
|
IMPLEMENT_POINTER(user.lowActor)
|
||||||
|
IMPLEMENT_POINTER(user.lowActor)
|
||||||
|
IMPLEMENT_POINTER(user.highActor)
|
||||||
|
IMPLEMENT_POINTER(user.targetActor)
|
||||||
|
IMPLEMENT_POINTER(user.flameActor)
|
||||||
|
IMPLEMENT_POINTER(user.attachActor)
|
||||||
|
IMPLEMENT_POINTER(user.WpnGoalActor)
|
||||||
|
IMPLEMENT_POINTERS_END
|
||||||
|
|
||||||
void pClearSpriteList(PLAYERp pp);
|
void pClearSpriteList(PLAYERp pp);
|
||||||
|
|
||||||
extern int sw_snd_scratch;
|
extern int sw_snd_scratch;
|
||||||
|
|
|
@ -353,7 +353,8 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
|
||||||
// instead, using TSPRITE info if possible.
|
// instead, using TSPRITE info if possible.
|
||||||
if (data->curelement >= soi_sprx && data->curelement <= soi_sprz)
|
if (data->curelement >= soi_sprx && data->curelement <= soi_sprz)
|
||||||
{
|
{
|
||||||
auto actor = data->actorofang;
|
DSWActor* actor = data->actorofang;
|
||||||
|
if (!actor) continue;
|
||||||
USERp u = actor->u();
|
USERp u = actor->u();
|
||||||
if (u && (actor->s().statnum != STAT_DEFAULT) &&
|
if (u && (actor->s().statnum != STAT_DEFAULT) &&
|
||||||
((TEST(u->Flags, SPR_SKIP4) && (actor->s().statnum <= STAT_SKIP4_INTERP_END)) ||
|
((TEST(u->Flags, SPR_SKIP4) && (actor->s().statnum <= STAT_SKIP4_INTERP_END)) ||
|
||||||
|
@ -362,7 +363,11 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->curelement == soi_sprang)
|
if (data->curelement == soi_sprang)
|
||||||
data->actorofang->s().ang = NORM_ANGLE(data->lastoldipos + MulScale(data->lastangdiff, ratio, 16));
|
{
|
||||||
|
DSWActor* actor = data->actorofang;
|
||||||
|
if (!actor) continue;
|
||||||
|
actor->s().ang = NORM_ANGLE(data->lastoldipos + MulScale(data->lastangdiff, ratio, 16));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
delta = data->lastipos - data->lastoldipos;
|
delta = data->lastipos - data->lastoldipos;
|
||||||
|
|
|
@ -2069,7 +2069,7 @@ int DoCarryFlag(DSWActor* actor)
|
||||||
SPRITEp sp = &actor->s();
|
SPRITEp sp = &actor->s();
|
||||||
|
|
||||||
const int FLAG_DETONATE_STATE = 99;
|
const int FLAG_DETONATE_STATE = 99;
|
||||||
auto fown = u->flagOwnerActor;
|
DSWActor* fown = u->flagOwnerActor;
|
||||||
if (!fown) return 0;
|
if (!fown) return 0;
|
||||||
SPRITEp fp = &fown->s();
|
SPRITEp fp = &fown->s();
|
||||||
USERp fu = fown->u();
|
USERp fu = fown->u();
|
||||||
|
@ -2226,7 +2226,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
|
||||||
|
|
||||||
SPRITEp ap = &u->attachActor->s();
|
SPRITEp ap = &u->attachActor->s();
|
||||||
USERp au = u->attachActor->u();
|
USERp au = u->attachActor->u();
|
||||||
auto fown = u->flagOwnerActor;
|
DSWActor* fown = u->flagOwnerActor;
|
||||||
if (!fown) return 0;
|
if (!fown) return 0;
|
||||||
SPRITEp fp = &fown->s();
|
SPRITEp fp = &fown->s();
|
||||||
USERp fu = fown->u();
|
USERp fu = fown->u();
|
||||||
|
|
|
@ -2556,7 +2556,8 @@ void DoPlayerMoveVehicle(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int z;
|
int z;
|
||||||
int floor_dist;
|
int floor_dist;
|
||||||
auto actor = pp->sop->sp_child;
|
DSWActor* actor = pp->sop->sp_child;
|
||||||
|
if (!actor) return;
|
||||||
SPRITEp sp = &actor->s();
|
SPRITEp sp = &actor->s();
|
||||||
auto psp = &pp->Actor()->s();
|
auto psp = &pp->Actor()->s();
|
||||||
USERp u = actor->u();
|
USERp u = actor->u();
|
||||||
|
|
|
@ -1748,7 +1748,8 @@ PlayerPart:
|
||||||
|
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto actor = sop->so_actors[i];
|
DSWActor* actor = sop->so_actors[i];
|
||||||
|
if (!actor) continue;
|
||||||
sp = &actor->s();
|
sp = &actor->s();
|
||||||
u = actor->u();
|
u = actor->u();
|
||||||
|
|
||||||
|
@ -1977,7 +1978,8 @@ void KillSectorObjectSprites(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto actor = sop->so_actors[i];
|
DSWActor* actor = sop->so_actors[i];
|
||||||
|
if (!actor) continue;
|
||||||
sp = &actor->s();
|
sp = &actor->s();
|
||||||
u = actor->u();
|
u = actor->u();
|
||||||
|
|
||||||
|
@ -2002,8 +2004,9 @@ void UpdateSectorObjectSprites(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto actor = sop->so_actors[i];
|
DSWActor* actor = sop->so_actors[i];
|
||||||
sp = &actor->s();
|
if (!actor) continue;
|
||||||
|
sp = &actor->s();
|
||||||
|
|
||||||
SetActorZ(actor, &sp->pos);
|
SetActorZ(actor, &sp->pos);
|
||||||
}
|
}
|
||||||
|
@ -2837,7 +2840,9 @@ void DoTornadoObject(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
void DoAutoTurretObject(SECTOR_OBJECTp sop)
|
void DoAutoTurretObject(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
auto actor = sop->sp_child;
|
DSWActor* actor = sop->sp_child;
|
||||||
|
if (!actor) return;
|
||||||
|
|
||||||
USERp u = actor->u();
|
USERp u = actor->u();
|
||||||
short delta_ang;
|
short delta_ang;
|
||||||
int diff;
|
int diff;
|
||||||
|
@ -2861,8 +2866,9 @@ void DoAutoTurretObject(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto sActor = sop->so_actors[i];
|
DSWActor* sActor = sop->so_actors[i];
|
||||||
auto shootp = &sActor->s();
|
if (!sActor) continue;
|
||||||
|
auto shootp = &sActor->s();
|
||||||
|
|
||||||
if (shootp->statnum == STAT_SO_SHOOT_POINT)
|
if (shootp->statnum == STAT_SO_SHOOT_POINT)
|
||||||
{
|
{
|
||||||
|
@ -2887,7 +2893,9 @@ void DoAutoTurretObject(SECTOR_OBJECTp sop)
|
||||||
{
|
{
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto sActor = sop->so_actors[i];
|
DSWActor* sActor = sop->so_actors[i];
|
||||||
|
if (!sActor) continue;
|
||||||
|
|
||||||
auto shootp = &sActor->s();
|
auto shootp = &sActor->s();
|
||||||
|
|
||||||
if (shootp->statnum == STAT_SO_SHOOT_POINT)
|
if (shootp->statnum == STAT_SO_SHOOT_POINT)
|
||||||
|
|
|
@ -4216,7 +4216,8 @@ bool VehicleMoveHit(DSWActor* actor)
|
||||||
sop = u->sop_parent;
|
sop = u->sop_parent;
|
||||||
|
|
||||||
// sprite controlling sop
|
// sprite controlling sop
|
||||||
auto ctrlr = sop->controller;
|
DSWActor* ctrlr = sop->controller;
|
||||||
|
if (!ctrlr) return false;
|
||||||
cp = &ctrlr->s();
|
cp = &ctrlr->s();
|
||||||
|
|
||||||
switch (u->coll.type)
|
switch (u->coll.type)
|
||||||
|
@ -5280,7 +5281,7 @@ int ActorStdMissile(DSWActor* actor, DSWActor* weapActor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset the weapons target before dying
|
// Reset the weapons target before dying
|
||||||
auto goal = wu->WpnGoalActor;
|
DSWActor* goal = wu->WpnGoalActor;
|
||||||
if (goal != nullptr)
|
if (goal != nullptr)
|
||||||
{
|
{
|
||||||
// attempt to see if it was killed
|
// attempt to see if it was killed
|
||||||
|
@ -8182,7 +8183,8 @@ int DoPlasmaFountain(DSWActor* actor)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto attachActor = u->attachActor;
|
DSWActor* attachActor = u->attachActor;
|
||||||
|
if (!attachActor) return 0;
|
||||||
ap = &attachActor->s();
|
ap = &attachActor->s();
|
||||||
|
|
||||||
// move with sprite
|
// move with sprite
|
||||||
|
@ -8887,7 +8889,7 @@ int DoMineStuck(DSWActor* actor)
|
||||||
constexpr int MINE_DETONATE_STATE = 99;
|
constexpr int MINE_DETONATE_STATE = 99;
|
||||||
|
|
||||||
// if no Owner then die
|
// if no Owner then die
|
||||||
auto attachActor = u->attachActor;
|
DSWActor* attachActor = u->attachActor;
|
||||||
if (attachActor != nullptr)
|
if (attachActor != nullptr)
|
||||||
{
|
{
|
||||||
SPRITEp ap = &attachActor->s();
|
SPRITEp ap = &attachActor->s();
|
||||||
|
@ -9343,7 +9345,7 @@ int DoEMPBurst(DSWActor* actor)
|
||||||
USER* u = actor->u();
|
USER* u = actor->u();
|
||||||
SPRITEp sp = &actor->s();
|
SPRITEp sp = &actor->s();
|
||||||
|
|
||||||
auto attachActor = u->attachActor;
|
DSWActor* attachActor = u->attachActor;
|
||||||
if (attachActor != nullptr)
|
if (attachActor != nullptr)
|
||||||
{
|
{
|
||||||
SPRITEp ap = &attachActor->s();
|
SPRITEp ap = &attachActor->s();
|
||||||
|
@ -13185,7 +13187,7 @@ DSWActor* AimHitscanToTarget(DSWActor* actor, int *z, short *ang, int z_ratio)
|
||||||
SPRITEp hp;
|
SPRITEp hp;
|
||||||
USERp hu;
|
USERp hu;
|
||||||
|
|
||||||
auto hitActor = u->targetActor;
|
DSWActor* hitActor = u->targetActor;
|
||||||
if (hitActor == nullptr)
|
if (hitActor == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -16808,7 +16810,8 @@ int InitSobjGun(PLAYERp pp)
|
||||||
|
|
||||||
for (i = 0; pp->sop->so_actors[i] != nullptr; i++)
|
for (i = 0; pp->sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto actor = pp->sop->so_actors[i];
|
DSWActor* actor = pp->sop->so_actors[i];
|
||||||
|
if (!actor) continue;
|
||||||
sp = &actor->s();
|
sp = &actor->s();
|
||||||
if (sp->statnum == STAT_SO_SHOOT_POINT)
|
if (sp->statnum == STAT_SO_SHOOT_POINT)
|
||||||
{
|
{
|
||||||
|
@ -17079,7 +17082,8 @@ int InitTurretMgun(SECTOR_OBJECTp sop)
|
||||||
|
|
||||||
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
for (i = 0; sop->so_actors[i] != nullptr; i++)
|
||||||
{
|
{
|
||||||
auto actor = sop->so_actors[i];
|
DSWActor* actor = sop->so_actors[i];
|
||||||
|
if (!actor) continue;
|
||||||
sp = &actor->s();
|
sp = &actor->s();
|
||||||
if (sp->statnum == STAT_SO_SHOOT_POINT)
|
if (sp->statnum == STAT_SO_SHOOT_POINT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue