mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-29 02:10:36 +00:00
- activatebysector.
This commit is contained in:
parent
7aca51a6c4
commit
7c6ea9cff7
8 changed files with 21 additions and 24 deletions
|
@ -3636,7 +3636,7 @@ void handle_se10(DDukeActor* actor, const int* specialtags)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fi.activatebysector(s->sectnum, actor->GetIndex());
|
fi.activatebysector(s->sectnum, actor);
|
||||||
t[0] = 0;
|
t[0] = 0;
|
||||||
}
|
}
|
||||||
else t[0]++;
|
else t[0]++;
|
||||||
|
|
|
@ -45,8 +45,8 @@ void operateforcefields_r(int s, int low);
|
||||||
void operateforcefields_d(int s, int low);
|
void operateforcefields_d(int s, int low);
|
||||||
bool checkhitswitch_d(int snum, int w, DDukeActor *act);
|
bool checkhitswitch_d(int snum, int w, DDukeActor *act);
|
||||||
bool checkhitswitch_r(int snum, int w, DDukeActor* act);
|
bool checkhitswitch_r(int snum, int w, DDukeActor* act);
|
||||||
void activatebysector_d(int sect, int j);
|
void activatebysector_d(int sect, DDukeActor* j);
|
||||||
void activatebysector_r(int sect, int j);
|
void activatebysector_r(int sect, DDukeActor* j);
|
||||||
void checkhitwall_d(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
void checkhitwall_d(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
||||||
void checkhitwall_r(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
void checkhitwall_r(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
||||||
bool checkhitceiling_d(int sn);
|
bool checkhitceiling_d(int sn);
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct Dispatcher
|
||||||
void (*operaterespawns)(int low);
|
void (*operaterespawns)(int low);
|
||||||
void (*operateforcefields)(int s, int low);
|
void (*operateforcefields)(int s, int low);
|
||||||
bool (*checkhitswitch)(int snum, int w, DDukeActor* act);
|
bool (*checkhitswitch)(int snum, int w, DDukeActor* act);
|
||||||
void (*activatebysector)(int sect, int j);
|
void (*activatebysector)(int sect, DDukeActor* j);
|
||||||
void (*checkhitwall)(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
void (*checkhitwall)(DDukeActor* spr, int dawallnum, int x, int y, int z, int atwith);
|
||||||
bool (*checkhitceiling)(int sn);
|
bool (*checkhitceiling)(int sn);
|
||||||
void (*checkhitsprite)(DDukeActor* i, DDukeActor* sn);
|
void (*checkhitsprite)(DDukeActor* i, DDukeActor* sn);
|
||||||
|
|
|
@ -3093,7 +3093,7 @@ HORIZONLY:
|
||||||
{
|
{
|
||||||
if (!(sector[s->sectnum].lotag & 0x8000) && (isanunderoperator(sector[s->sectnum].lotag) ||
|
if (!(sector[s->sectnum].lotag & 0x8000) && (isanunderoperator(sector[s->sectnum].lotag) ||
|
||||||
isanearoperator(sector[s->sectnum].lotag)))
|
isanearoperator(sector[s->sectnum].lotag)))
|
||||||
fi.activatebysector(s->sectnum, pi);
|
fi.activatebysector(s->sectnum, pact);
|
||||||
if (j)
|
if (j)
|
||||||
{
|
{
|
||||||
quickkill(p);
|
quickkill(p);
|
||||||
|
@ -3101,7 +3101,7 @@ HORIZONLY:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (abs(fz - cz) < (32 << 8) && isanunderoperator(sector[psect].lotag))
|
else if (abs(fz - cz) < (32 << 8) && isanunderoperator(sector[psect].lotag))
|
||||||
fi.activatebysector(psect, pi);
|
fi.activatebysector(psect, pact);
|
||||||
}
|
}
|
||||||
|
|
||||||
// center_view
|
// center_view
|
||||||
|
|
|
@ -4063,7 +4063,7 @@ HORIZONLY:
|
||||||
{
|
{
|
||||||
if (!(sector[s->sectnum].lotag & 0x8000) && (isanunderoperator(sector[s->sectnum].lotag) ||
|
if (!(sector[s->sectnum].lotag & 0x8000) && (isanunderoperator(sector[s->sectnum].lotag) ||
|
||||||
isanearoperator(sector[s->sectnum].lotag)))
|
isanearoperator(sector[s->sectnum].lotag)))
|
||||||
fi.activatebysector(s->sectnum, pact->GetIndex());
|
fi.activatebysector(s->sectnum, pact);
|
||||||
if (j)
|
if (j)
|
||||||
{
|
{
|
||||||
quickkill(p);
|
quickkill(p);
|
||||||
|
@ -4071,7 +4071,7 @@ HORIZONLY:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (abs(fz - cz) < (32 << 8) && isanunderoperator(sector[psect].lotag))
|
else if (abs(fz - cz) < (32 << 8) && isanunderoperator(sector[psect].lotag))
|
||||||
fi.activatebysector(psect, pact->GetIndex());
|
fi.activatebysector(psect, pact);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ud.clipping == 0 && sector[p->cursectnum].ceilingz > (sector[p->cursectnum].floorz - (12 << 8)))
|
if (ud.clipping == 0 && sector[p->cursectnum].ceilingz > (sector[p->cursectnum].floorz - (12 << 8)))
|
||||||
|
|
|
@ -404,7 +404,6 @@ void setdrugmode(player_struct *p, int oyrepeat)
|
||||||
static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixedhoriz choriz, int sect, int smoothratio)
|
static void geometryEffect(int cposx, int cposy, int cposz, binangle cang, fixedhoriz choriz, int sect, int smoothratio)
|
||||||
{
|
{
|
||||||
short gs, tgsect, geosect, geoid = 0;
|
short gs, tgsect, geosect, geoid = 0;
|
||||||
int spr;
|
|
||||||
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), sect);
|
renderDrawRoomsQ16(cposx, cposy, cposz, cang.asq16(), choriz.asq16(), sect);
|
||||||
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
fi.animatesprites(cposx, cposy, cang.asbuild(), smoothratio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
|
|
|
@ -613,25 +613,25 @@ bool checkhitswitch_d(int snum, int ww, DDukeActor *act)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void activatebysector_d(int sect, int j)
|
void activatebysector_d(int sect, DDukeActor* activator)
|
||||||
{
|
{
|
||||||
short i, didit;
|
short didit;
|
||||||
|
|
||||||
didit = 0;
|
didit = 0;
|
||||||
|
|
||||||
SectIterator it(sect);
|
DukeSectIterator it(sect);
|
||||||
while ((i = it.NextIndex()) >= 0)
|
while (auto act = it.Next())
|
||||||
{
|
{
|
||||||
if (sprite[i].picnum == ACTIVATOR)
|
if (act->s.picnum == ACTIVATOR)
|
||||||
{
|
{
|
||||||
operateactivators(sprite[i].lotag, -1);
|
operateactivators(act->s.lotag, -1);
|
||||||
didit = 1;
|
didit = 1;
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (didit == 0)
|
if (didit == 0)
|
||||||
operatesectors(sect, &hittype[j]);
|
operatesectors(sect, activator);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -895,22 +895,20 @@ bool checkhitswitch_r(int snum, int ww, DDukeActor* act)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void activatebysector_r(int sect, int j)
|
void activatebysector_r(int sect, DDukeActor* activator)
|
||||||
{
|
{
|
||||||
short i;
|
DukeSectIterator it(sect);
|
||||||
|
while (auto act = it.Next())
|
||||||
SectIterator it(sect);
|
|
||||||
while ((i = it.NextIndex()) >= 0)
|
|
||||||
{
|
{
|
||||||
if (sprite[i].picnum == ACTIVATOR)
|
if (act->s.picnum == ACTIVATOR)
|
||||||
{
|
{
|
||||||
operateactivators(sprite[i].lotag, -1);
|
operateactivators(act->s.lotag, -1);
|
||||||
// return;
|
// return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sector[sect].lotag != 22)
|
if (sector[sect].lotag != 22)
|
||||||
operatesectors(sect, &hittype[j]);
|
operatesectors(sect, activator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue