mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- final cleanup.
This commit is contained in:
parent
e12ae040de
commit
ed2d8373fc
11 changed files with 14 additions and 32 deletions
|
@ -57,7 +57,6 @@ typedef struct NODETREEstruct NODETREE, *NODETREEp;
|
|||
|
||||
struct NODETREEstruct
|
||||
{
|
||||
short SpriteNum; // Sprite number in sprite array of goal item
|
||||
NODEp tree; // This is the node tree used to navigate to goal
|
||||
bool Locked; // If list is locked, a bot is using/modifying it and
|
||||
// other bots cannot modify it while it's locked
|
||||
|
|
|
@ -552,7 +552,6 @@ void DoStarView(tspriteptr_t tsp, USERp tu, int viewz)
|
|||
void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int viewy, int viewz, int camang)
|
||||
{
|
||||
int tSpriteNum;
|
||||
short SpriteNum;
|
||||
int smr4, smr2;
|
||||
USERp tu;
|
||||
static int ang = 0;
|
||||
|
@ -569,7 +568,7 @@ void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int view
|
|||
|
||||
for (tSpriteNum = spritesortcnt - 1; tSpriteNum >= 0; tSpriteNum--)
|
||||
{
|
||||
SpriteNum = tsprite[tSpriteNum].owner;
|
||||
int SpriteNum = tsprite[tSpriteNum].owner;
|
||||
auto tActor = &swActors[SpriteNum];
|
||||
tspriteptr_t tsp = &tsprite[tSpriteNum];
|
||||
tu = tActor->u();
|
||||
|
@ -705,7 +704,7 @@ void analyzesprites(spritetype* tsprite, int& spritesortcnt, int viewx, int view
|
|||
{
|
||||
tsp->pal = PALETTE_RED_LIGHTING;
|
||||
// Turn it off, it gets reset by PrintSpriteInfo
|
||||
sprite[tu->SpriteNum].hitag = 0;
|
||||
tActor->s().hitag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -870,12 +869,11 @@ void
|
|||
post_analyzesprites(spritetype* tsprite, int& spritesortcnt)
|
||||
{
|
||||
int tSpriteNum;
|
||||
short SpriteNum;
|
||||
USERp tu;
|
||||
|
||||
for (tSpriteNum = spritesortcnt - 1; tSpriteNum >= 0; tSpriteNum--)
|
||||
{
|
||||
SpriteNum = tsprite[tSpriteNum].owner;
|
||||
int SpriteNum = tsprite[tSpriteNum].owner;
|
||||
if (SpriteNum < 0) continue; // JBF: verify this is safe
|
||||
tspriteptr_t tsp = &tsprite[tSpriteNum];
|
||||
tu = swActors[SpriteNum].u();
|
||||
|
|
|
@ -739,7 +739,7 @@ struct PLAYERstruct
|
|||
DSWActor* remoteActor;
|
||||
DSWActor* PlayerUnderActor;
|
||||
DSWActor* KillerActor; //who killed me
|
||||
DSWActor* HitBy; // SpriteNum of whatever player was last hit by
|
||||
DSWActor* HitBy; // Sprite num of whatever player was last hit by
|
||||
|
||||
DSWActor* Actor() const
|
||||
{
|
||||
|
@ -1097,6 +1097,7 @@ struct USER
|
|||
DSWActor* attachActor; // attach to sprite if needed - electro snake
|
||||
DSWActor* flagOwnerActor;
|
||||
DSWActor* WpnGoalActor;
|
||||
short SpriteNum; // only needed for writing out to savegames that can be loaded by older builds.
|
||||
|
||||
int Flags;
|
||||
int Flags2;
|
||||
|
@ -1128,8 +1129,6 @@ struct USER
|
|||
|
||||
int active_range;
|
||||
|
||||
short SpriteNum;
|
||||
|
||||
// if a player's sprite points to player structure
|
||||
PLAYERp PlayerP;
|
||||
short Sibling;
|
||||
|
@ -1820,7 +1819,6 @@ int Distance(int x1, int y1, int x2, int y2);
|
|||
|
||||
int NewStateGroup(DSWActor* actor, STATEp SpriteGroup[]);
|
||||
void SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid);
|
||||
//USERp SpawnUser(short SpriteNum, short id, STATEp state);
|
||||
USERp SpawnUser(DSWActor* actor, short id, STATEp state);
|
||||
|
||||
short ActorFindTrack(DSWActor* actor, int8_t player_dir, int track_type, short *track_point_num, short *track_dir);
|
||||
|
|
|
@ -190,9 +190,6 @@ int DoToiletGirl(DSWActor* actor)
|
|||
u->FlagOwner = 0;
|
||||
}
|
||||
|
||||
//(*u->ActorActionFunc) (SpriteNum);
|
||||
|
||||
|
||||
// stay on floor unless doing certain things
|
||||
if (!TEST(u->Flags, SPR_JUMPING | SPR_FALLING | SPR_CLIMBING))
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ static int osdcmd_mirror(CCmdFuncPtr parm)
|
|||
}
|
||||
|
||||
Printf("camera is the ST1 sprite used as the view spot");
|
||||
Printf("camspite is the SpriteNum of the drawtotile tile in editart");
|
||||
Printf("camspite is the sprite number of the drawtotile tile in editart");
|
||||
Printf("camspic is the tile number of the drawtotile in editart");
|
||||
Printf("iscamera is whether or not this mirror is a camera type");
|
||||
Printf(" ");
|
||||
|
|
|
@ -1704,7 +1704,6 @@ void UpdatePlayerUnderSprite(PLAYERp pp)
|
|||
|
||||
SPRITEp sp;
|
||||
USERp u;
|
||||
short SpriteNum;
|
||||
|
||||
int water_level_z, zdiff;
|
||||
bool above_water, in_dive_area;
|
||||
|
|
|
@ -58,7 +58,8 @@ DSWActor* InsertActor(int sectnum, int stat)
|
|||
{
|
||||
short spnum;
|
||||
spnum = insertsprite(sectnum, stat);
|
||||
auto pSprite = &sprite[spnum];
|
||||
auto pActor = &swActors[spnum];
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
PRODUCTION_ASSERT(spnum >= 0);
|
||||
|
||||
|
@ -77,7 +78,7 @@ DSWActor* InsertActor(int sectnum, int stat)
|
|||
pSprite->hitag = 0;
|
||||
pSprite->extra = 0;
|
||||
|
||||
return &swActors[spnum];
|
||||
return pActor;
|
||||
}
|
||||
|
||||
bool FAF_Sector(short sectnum)
|
||||
|
|
|
@ -870,7 +870,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, USER& w, USER* def
|
|||
("hi_sp", w.highActor, def->highActor)
|
||||
("lo_sp", w.lowActor, def->lowActor)
|
||||
("active_range", w.active_range, def->active_range)
|
||||
("SpriteNum", w.SpriteNum, def->SpriteNum)
|
||||
("Attach", w.attachActor, def->attachActor)
|
||||
("PlayerP", w.PlayerP, def->PlayerP)
|
||||
("Sibling", w.Sibling, def->Sibling)
|
||||
|
@ -930,7 +929,11 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, USER& w, USER* def
|
|||
("oz", w.oz, def->oz);
|
||||
|
||||
if (arc.isWriting()) // we need this for loading saves in older builds for debugging.
|
||||
arc("SpriteP", w.SpriteNum, def->SpriteNum);
|
||||
{
|
||||
arc("SpriteP", w.SpriteNum, def->SpriteNum)
|
||||
("SpriteNum", w.SpriteNum, def->SpriteNum);
|
||||
}
|
||||
|
||||
|
||||
|
||||
SerializeCodePtr(arc, "ActorActionFunc", (void**)&w.ActorActionFunc);
|
||||
|
|
|
@ -38,7 +38,6 @@ int InitSpriteGrenade(DSWActor* actor);
|
|||
int InitSpriteChemBomb(DSWActor*);
|
||||
int InitFlashBomb(DSWActor* actor);
|
||||
int InitCaltrops(DSWActor* actor);
|
||||
int InitPhosphorus(int16_t SpriteNum);
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
|
@ -442,7 +441,6 @@ int DoSkullSpawnShrap(DSWActor* actor)
|
|||
int DoSkullWait(DSWActor* actor)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = &actor->s();
|
||||
int a,b,c,dist;
|
||||
|
||||
|
|
|
@ -604,12 +604,6 @@ void ClearOwner(DSWActor* child)
|
|||
if (child) child->s().owner = -1;
|
||||
}
|
||||
|
||||
void SetOwner(int a, int b)
|
||||
{
|
||||
if (a >= 0 && b >= 0) SetOwner(&swActors[a], &swActors[b]);
|
||||
else if (b >= 0) ClearOwner(&swActors[b]);
|
||||
}
|
||||
|
||||
void SetAttach(DSWActor* ownr, DSWActor* child)
|
||||
{
|
||||
if (child && child->hasU() && ownr->hasU())
|
||||
|
@ -4871,7 +4865,6 @@ DropAhead(DSWActor* actor, short min_height)
|
|||
int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
||||
{
|
||||
USER* u = actor->u();
|
||||
int SpriteNum = u->SpriteNum;
|
||||
SPRITEp sp = &actor->s();
|
||||
|
||||
int x, y, z, loz, hiz;
|
||||
|
|
|
@ -38,10 +38,6 @@ short GetSpriteDir(short sn);
|
|||
short GetDirToPlayer(short sn);
|
||||
short PlayerInVision(short sn, short view_deg);
|
||||
short PlayerVisible(short sn);
|
||||
short SpriteLookSector(short SpriteNum, short range);
|
||||
short SpriteCanGoForward(short SpriteNum, short range);
|
||||
void SpriteFindNewDirection(short SpriteNum, short range);
|
||||
bool CanMoveHere(int16_t spritenum);
|
||||
bool SpriteOverlap(DSWActor*, DSWActor*);
|
||||
int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath);
|
||||
void SpriteControl(void);
|
||||
|
|
Loading…
Reference in a new issue