mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
- sectnum() cleanup and AnimSet return type.
This commit is contained in:
parent
f68d17133a
commit
b936345e11
6 changed files with 12 additions and 14 deletions
|
@ -1200,7 +1200,7 @@ PreDraw(void)
|
|||
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
RESET(sector[actor->s().sectnum].floorstat, FLOOR_STAT_SLOPE);
|
||||
RESET(actor->s().sector()->floorstat, FLOOR_STAT_SLOPE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1211,7 +1211,7 @@ PostDraw(void)
|
|||
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
|
||||
while (auto actor = it.Next())
|
||||
{
|
||||
SET(sector[actor->s().sectnum].floorstat, FLOOR_STAT_SLOPE);
|
||||
SET(actor->s().sector()->floorstat, FLOOR_STAT_SLOPE);
|
||||
}
|
||||
|
||||
it.Reset(STAT_FAF_COPY);
|
||||
|
@ -1292,7 +1292,7 @@ void PreDrawStackedWater(void)
|
|||
SWStatIterator it(STAT_CEILING_FLOOR_PIC_OVERRIDE);
|
||||
while (auto itActor = it.Next())
|
||||
{
|
||||
SWSectIterator it2(itActor->s().sectnum);
|
||||
SWSectIterator it2(itActor->s().sector());
|
||||
while (auto itActor2 = it2.Next())
|
||||
{
|
||||
if (itActor2->hasU())
|
||||
|
|
|
@ -1677,7 +1677,6 @@ struct SECTOR_OBJECTstruct
|
|||
op_main_sector, // main sector operational SO moves in - for speed purposes
|
||||
flags,
|
||||
sector[MAX_SO_SECTOR], // hold the sector numbers of the sector object
|
||||
sectnum, // current secnum of midpoint
|
||||
mid_sector; // middle sector
|
||||
|
||||
int16_t xorig[MAX_SO_POINTS], // save the original x & y location of each wall so it can be
|
||||
|
@ -1866,7 +1865,7 @@ void RefreshInfoLine(PLAYERp pp);
|
|||
void DoAnim(int numtics);
|
||||
void AnimDelete(int animtype, int animindex, DSWActor*);
|
||||
short AnimGetGoal(int animtype, int animindex, DSWActor*);
|
||||
short AnimSet(int animtype, int animindex, DSWActor* animactor, int thegoal, int thevel);
|
||||
int AnimSet(int animtype, int animindex, DSWActor* animactor, int thegoal, int thevel);
|
||||
short AnimSetCallback(short anim_ndx, ANIM_CALLBACKp call, SECTOR_OBJECTp data);
|
||||
short AnimSetVelAdj(short anim_ndx, short vel_adj);
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ MorphTornado(SECTOR_OBJECTp sop)
|
|||
sop->morph_z = ceilingz;
|
||||
}
|
||||
|
||||
alignceilslope(sectnum(*sectp), mx, my, sop->morph_z);
|
||||
alignceilslope(*sectp, mx, my, sop->morph_z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -453,7 +453,7 @@ MorphFloor(SECTOR_OBJECTp sop)
|
|||
if ((*sectp)->hasU() &&
|
||||
TEST((*sectp)->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||
{
|
||||
alignflorslope(sectnum(*sectp), mx, my, floorz + sop->morph_z);
|
||||
alignflorslope(*sectp, mx, my, floorz + sop->morph_z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
|||
if ((*sectp)->hasU() &&
|
||||
TEST((*sectp)->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||
{
|
||||
alignflorslope(int16_t(sectnum(*sectp)), x, y, z);
|
||||
alignflorslope(*sectp, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
|||
if ((*sectp)->hasU() &&
|
||||
TEST((*sectp)->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||
{
|
||||
alignceilslope(int16_t(sectnum(*sectp)), x, y, z);
|
||||
alignceilslope(*sectp, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -501,8 +501,8 @@ SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
|
|||
if ((*sectp)->hasU() &&
|
||||
TEST((*sectp)->flags, SECTFU_SO_SLOPE_CEILING_TO_POINT))
|
||||
{
|
||||
alignflorslope(sectnum(*sectp), x, y, z);
|
||||
alignceilslope(sectnum(*sectp), x, y, z);
|
||||
alignflorslope(*sectp, x, y, z);
|
||||
alignceilslope(*sectp, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -664,7 +664,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SECTOR_OBJECTstruc
|
|||
("drive_slide", w.drive_slide, def->drive_slide)
|
||||
("crush_z", w.crush_z, def->crush_z)
|
||||
("flags", w.flags, def->flags)
|
||||
("sectnum", w.sectnum, def->sectnum)
|
||||
("mid_sector", w.mid_sector, def->mid_sector)
|
||||
("max_damage", w.max_damage, def->max_damage)
|
||||
("ram_damage", w.ram_damage, def->ram_damage)
|
||||
|
|
|
@ -2664,7 +2664,7 @@ void AnimDelete(int animtype, int animindex, DSWActor* animactor)
|
|||
}
|
||||
|
||||
|
||||
short AnimSet(int animtype, int animindex, DSWActor* animactor, fixed_t thegoal, int thevel)
|
||||
int AnimSet(int animtype, int animindex, DSWActor* animactor, fixed_t thegoal, int thevel)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
|
|
@ -1741,7 +1741,7 @@ PlayerPart:
|
|||
if (!pp->lo_sectp)
|
||||
continue;
|
||||
|
||||
if (TEST(sector[sectnum(pp->lo_sectp)].extra, SECTFX_NO_RIDE))
|
||||
if (TEST(pp->lo_sectp->extra, SECTFX_NO_RIDE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue