mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- use the newly added flag to consolidate ifhitsector.
This commit is contained in:
parent
46078323ff
commit
e42fc5e743
5 changed files with 18 additions and 41 deletions
|
@ -4030,6 +4030,23 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DDukeActor* ifhitsectors(sectortype* sect)
|
||||
{
|
||||
DukeStatIterator it(STAT_MISC);
|
||||
while (auto a1 = it.Next())
|
||||
{
|
||||
if (actorflag(a1, SFLAG2_TRIGGER_IFHITSECTOR) && sect == a1->sector())
|
||||
return a1;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void handle_se19(DDukeActor *actor, int BIGFORCE)
|
||||
{
|
||||
auto sc = actor->sector();
|
||||
|
@ -4080,7 +4097,7 @@ void handle_se19(DDukeActor *actor, int BIGFORCE)
|
|||
}
|
||||
else //Not hit yet
|
||||
{
|
||||
auto hitter = fi.ifhitsectors(actor->sector());
|
||||
auto hitter = ifhitsectors(actor->sector());
|
||||
if (hitter)
|
||||
{
|
||||
FTA(8, &ps[myconnectindex]);
|
||||
|
|
|
@ -694,23 +694,6 @@ void movefta_d(void)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
DDukeActor* ifhitsectors_d(sectortype* sect)
|
||||
{
|
||||
DukeStatIterator it(STAT_MISC);
|
||||
while (auto a1 = it.Next())
|
||||
{
|
||||
if (a1->spr.picnum == EXPLOSION2 && sect == a1->sector())
|
||||
return a1;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int ifhitbyweapon_d(DDukeActor *actor)
|
||||
{
|
||||
int p;
|
||||
|
|
|
@ -613,24 +613,6 @@ void movefta_r(void)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
DDukeActor* ifhitsectors_r(sectortype* sect)
|
||||
{
|
||||
DukeStatIterator it(STAT_MISC);
|
||||
while (auto a1 = it.Next())
|
||||
{
|
||||
if (a1->spr.picnum == EXPLOSION2 || (a1->spr.picnum == EXPLOSION3 && sect == a1->sector()))
|
||||
return a1;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int ifhitbyweapon_r(DDukeActor *actor)
|
||||
{
|
||||
int p;
|
||||
|
|
|
@ -70,8 +70,6 @@ void lotsofpaper_d(DDukeActor* s, int n);
|
|||
void lotsoffeathers_r(DDukeActor* s, int n);
|
||||
void guts_d(DDukeActor* s, int gtype, int n, int p);
|
||||
void guts_r(DDukeActor* s, int gtype, int n, int p);
|
||||
DDukeActor* ifhitsectors_d(sectortype* sectnum);
|
||||
DDukeActor* ifhitsectors_r(sectortype* sectnum);
|
||||
int ifhitbyweapon_r(DDukeActor* sn);
|
||||
int ifhitbyweapon_d(DDukeActor* sn);
|
||||
void fall_d(DDukeActor* i, int g_p);
|
||||
|
@ -134,7 +132,6 @@ void SetDispatcher()
|
|||
lotsofmail_d,
|
||||
lotsofpaper_d,
|
||||
guts_d,
|
||||
ifhitsectors_d,
|
||||
ifhitbyweapon_d,
|
||||
fall_d,
|
||||
spawnweapondebris_d,
|
||||
|
@ -178,7 +175,6 @@ void SetDispatcher()
|
|||
lotsoffeathers_r,
|
||||
lotsoffeathers_r,
|
||||
guts_r,
|
||||
ifhitsectors_r,
|
||||
ifhitbyweapon_r,
|
||||
fall_r,
|
||||
spawnweapondebris_r,
|
||||
|
|
|
@ -95,7 +95,6 @@ struct Dispatcher
|
|||
void (*lotsofmail)(DDukeActor *s, int n);
|
||||
void (*lotsofpaper)(DDukeActor *s, int n);
|
||||
void (*guts)(DDukeActor* s, int gtype, int n, int p);
|
||||
DDukeActor* (*ifhitsectors)(sectortype* sectnum);
|
||||
int (*ifhitbyweapon)(DDukeActor* sectnum);
|
||||
void (*fall)(DDukeActor* actor, int g_p);
|
||||
bool (*spawnweapondebris)(int picnum, int dnum);
|
||||
|
|
Loading…
Reference in a new issue