- removed all remaining references to level and TThinkerIterator from p_enemy.cpp.

This commit is contained in:
Christoph Oelckers 2019-01-27 14:53:08 +01:00
parent 2ed2202caa
commit 5aa379e50e

View file

@ -2022,7 +2022,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Respawn)
}
if (self->CountsAsKill())
{
level.total_monsters++;
self->Level->total_monsters++;
}
}
else
@ -2620,9 +2620,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChangeCountFlags)
PARAM_INT(item);
PARAM_INT(secret);
if (self->CountsAsKill() && self->health > 0) --level.total_monsters;
if (self->flags & MF_COUNTITEM) --level.total_items;
if (self->flags5 & MF5_COUNTSECRET) --level.total_secrets;
if (self->CountsAsKill() && self->health > 0) --self->Level->total_monsters;
if (self->flags & MF_COUNTITEM) --self->Level->total_items;
if (self->flags5 & MF5_COUNTSECRET) --self->Level->total_secrets;
if (kill != -1)
{
@ -2641,9 +2641,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChangeCountFlags)
if (secret == 0) self->flags5 &= ~MF5_COUNTSECRET;
else self->flags5 |= MF5_COUNTSECRET;
}
if (self->CountsAsKill() && self->health > 0) ++level.total_monsters;
if (self->flags & MF_COUNTITEM) ++level.total_items;
if (self->flags5 & MF5_COUNTSECRET) ++level.total_secrets;
if (self->CountsAsKill() && self->health > 0) ++self->Level->total_monsters;
if (self->flags & MF_COUNTITEM) ++self->Level->total_items;
if (self->flags5 & MF5_COUNTSECRET) ++self->Level->total_secrets;
return 0;
}
@ -2674,7 +2674,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseChildren)
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT(flags);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
while ((mo = it.Next()) != NULL)
@ -2697,7 +2697,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RaiseSiblings)
PARAM_SELF_PROLOGUE(AActor);
PARAM_INT(flags);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
if (self->master != NULL)
@ -3298,7 +3298,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LineEffect)
if ((oldjunk.special = special)) // Linedef type
{
oldjunk.tag = tag; // Sector tag for linedef
level.TranslateLineDef(&junk, &oldjunk); // Turn into native type
self->Level->TranslateLineDef(&junk, &oldjunk); // Turn into native type
res = !!P_ExecuteSpecial(junk.special, NULL, self, false, junk.args[0],
junk.args[1], junk.args[2], junk.args[3], junk.args[4]);
if (res && !(junk.flags & ML_REPEAT_SPECIAL)) // If only once,
@ -3454,7 +3454,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Warp)
if ((flags & WARPF_USETID))
{
reference = level.SingleActorFromTID(destination_selector, self);
reference = self->Level->SingleActorFromTID(destination_selector, self);
}
else
{
@ -3702,7 +3702,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RadiusGive)
int given = 0;
if (flags & RGF_MISSILES)
{
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
while ((thing = it.Next()) && ((unlimited) || (given < limit)))
{
given += DoRadiusGive(self, thing, item, amount, distance, flags, filter, species, mindist);
@ -3931,7 +3931,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DamageChildren)
AActor *source = COPY_AAPTR(self, src);
AActor *inflictor = COPY_AAPTR(self, inflict);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
while ( (mo = it.Next()) )
@ -3961,7 +3961,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_DamageSiblings)
AActor *source = COPY_AAPTR(self, src);
AActor *inflictor = COPY_AAPTR(self, inflict);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
if (self->master != NULL)
@ -4112,7 +4112,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillChildren)
AActor *source = COPY_AAPTR(self, src);
AActor *inflictor = COPY_AAPTR(self, inflict);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
while ( (mo = it.Next()) )
@ -4143,7 +4143,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_KillSiblings)
AActor *source = COPY_AAPTR(self, src);
AActor *inflictor = COPY_AAPTR(self, inflict);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
if (self->master != NULL)
@ -4271,7 +4271,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RemoveChildren)
PARAM_CLASS(filter, AActor);
PARAM_NAME(species);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
while ((mo = it.Next()) != NULL)
@ -4297,7 +4297,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RemoveSiblings)
PARAM_CLASS(filter, AActor);
PARAM_NAME(species);
TThinkerIterator<AActor> it;
auto it = self->Level->GetThinkerIterator<AActor>();
AActor *mo;
if (self->master != NULL)
@ -4838,7 +4838,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_CheckTerrain)
}
else if (sec->special == Scroll_StrifeCurrent)
{
int anglespeed = level.GetFirstSectorTag(sec) - 100;
int anglespeed = self->Level->GetFirstSectorTag(sec) - 100;
double speed = (anglespeed % 10) / 16.;
DAngle an = (anglespeed / 10) * (360 / 8.);
self->Thrust(an, speed);