- reroute all uses of FActorIterator and NActorIterator through FLevelLocals.

This commit is contained in:
Christoph Oelckers 2019-01-24 18:50:22 +01:00
parent 1f2162fea8
commit 4c250a58ca
9 changed files with 91 additions and 87 deletions

View file

@ -3206,7 +3206,7 @@ void AM_drawAuthorMarkers ()
tex = TexMan.GetTexture(picnum);
}
}
FActorIterator it (mark->args[0]);
auto it = level.GetActorIterator(mark->args[0]);
AActor *marked = mark->args[0] == 0 ? mark : it.Next();
while (marked != NULL)

View file

@ -1175,7 +1175,7 @@ static void PrintSecretString(const char *string, bool thislevel)
{
long tid = (long)strtoll(string+2, (char**)&string, 10);
if (*string == ';') string++;
FActorIterator it(tid);
auto it = level.GetActorIterator(tid);
AActor *actor;
bool foundone = false;
if (thislevel)

View file

@ -142,6 +142,10 @@ struct FLevelLocals : public FLevelData
{
return FActorIterator(tid);
}
FActorIterator GetActorIterator(int tid, AActor *start)
{
return FActorIterator(tid, start);
}
NActorIterator GetActorIterator(FName type, int tid)
{
return NActorIterator(type, tid);

View file

@ -31,6 +31,7 @@
#include "serializer.h"
#include "d_player.h"
#include "r_utility.h"
#include "g_levellocals.h"
static FRandom pr_quake ("Quake");
@ -401,7 +402,7 @@ bool P_StartQuakeXYZ(AActor *activator, int tid, int intensityX, int intensityY,
}
else
{
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
while ( (center = iterator.Next ()) )
{
res = true;

View file

@ -3603,7 +3603,7 @@ int DLevelScript::ThingCount (int type, int stringid, int tid, int tag)
do_count:
if (tid)
{
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
while ( (actor = iterator.Next ()) )
{
if (actor->health > 0 &&
@ -3779,7 +3779,7 @@ int DLevelScript::DoSpawnSpot (int type, int spot, int tid, int angle, bool forc
if (spot != 0)
{
FActorIterator iterator (spot);
auto iterator = level.GetActorIterator(spot);
AActor *aspot;
while ( (aspot = iterator.Next ()) )
@ -3800,7 +3800,7 @@ int DLevelScript::DoSpawnSpotFacing (int type, int spot, int tid, bool force)
if (spot != 0)
{
FActorIterator iterator (spot);
auto iterator = level.GetActorIterator(spot);
AActor *aspot;
while ( (aspot = iterator.Next ()) )
@ -3984,7 +3984,7 @@ AActor *SingleActorFromTID (int tid, AActor *defactor)
}
else
{
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
return iterator.Next();
}
}
@ -4069,7 +4069,7 @@ void DLevelScript::SetActorProperty (int tid, int property, int value)
else
{
AActor *actor;
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
while ((actor = iterator.Next()) != NULL)
{
@ -4566,7 +4566,7 @@ int DLevelScript::DoClassifyActor(int tid)
}
else
{
FActorIterator it(tid);
auto it = level.GetActorIterator(tid);
actor = it.Next();
}
if (actor == NULL)
@ -5050,7 +5050,7 @@ static void SetActorAngle(AActor *activator, int tid, int angle, bool interpolat
}
else
{
FActorIterator iterator(tid);
auto iterator = level.GetActorIterator(tid);
AActor *actor;
while ((actor = iterator.Next()))
@ -5072,7 +5072,7 @@ static void SetActorPitch(AActor *activator, int tid, int angle, bool interpolat
}
else
{
FActorIterator iterator(tid);
auto iterator = level.GetActorIterator(tid);
AActor *actor;
while ((actor = iterator.Next()))
@ -5094,7 +5094,7 @@ static void SetActorRoll(AActor *activator, int tid, int angle, bool interpolate
}
else
{
FActorIterator iterator(tid);
auto iterator = level.GetActorIterator(tid);
AActor *actor;
while ((actor = iterator.Next()))
@ -5121,7 +5121,7 @@ static void SetActorTeleFog(AActor *activator, int tid, FString telefogsrc, FStr
}
else
{
FActorIterator iterator(tid);
auto iterator = level.GetActorIterator(tid);
AActor *actor;
PClassActor * src = PClass::FindActor(telefogsrc);
@ -5149,7 +5149,7 @@ static int SwapActorTeleFog(AActor *activator, int tid)
}
else
{
FActorIterator iterator(tid);
auto iterator = level.GetActorIterator(tid);
AActor *actor;
while ((actor = iterator.Next()))
@ -5503,7 +5503,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
FActorIterator iterator(args[0]);
auto iterator = level.GetActorIterator(args[0]);
while ((actor = iterator.Next()))
{
@ -5529,7 +5529,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
FActorIterator iterator(args[0]);
auto iterator = level.GetActorIterator(args[0]);
while ( (actor = iterator.Next()) )
{
@ -5568,7 +5568,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
FActorIterator iterator(args[0]);
auto iterator = level.GetActorIterator(args[0]);
while ( (actor = iterator.Next()) )
{
@ -5621,7 +5621,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *actor;
while ( (actor = it.Next()) )
@ -5699,8 +5699,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
if (args[1] == 0) return 1; // [KS] I'm sure the activator can see itself.
FActorIterator dstiter (args[1]);
auto dstiter = level.GetActorIterator(args[1]);
while ( (dest = dstiter.Next ()) )
{
if (P_CheckSight(source, dest, flags)) return 1;
@ -5708,13 +5707,13 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
else
{
FActorIterator srciter (args[0]);
auto srciter = level.GetActorIterator(args[0]);
while ( (source = srciter.Next ()) )
{
if (args[1] != 0)
{
FActorIterator dstiter (args[1]);
auto dstiter = level.GetActorIterator(args[1]);
while ( (dest = dstiter.Next ()) )
{
if (P_CheckSight(source, dest, flags)) return 1;
@ -5856,7 +5855,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
else
{
AActor *source;
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
while ((source = it.Next()) != NULL)
{
@ -5887,7 +5886,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, int32_t *args)
}
if (sid != 0 || funcIndex == ACSF_PlayActorSound)
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *spot;
int chan = argCount > 2 ? args[2] : CHAN_BODY;
@ -5933,7 +5932,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *spot;
while ((spot = it.Next()) != NULL)
@ -5956,7 +5955,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *spot;
while ((spot = it.Next()) != NULL)
@ -6074,7 +6073,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *actor;
while ((actor = it.Next()) != NULL)
@ -6110,7 +6109,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *actor;
while ((actor = it.Next()) != NULL)
@ -6144,7 +6143,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(args[0]);
auto it = level.GetActorIterator(args[0]);
AActor *actor;
while ((actor = it.Next()) != NULL)
@ -6321,7 +6320,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
}
FActorIterator iterator(args[0]);
auto iterator = level.GetActorIterator(args[0]);
bool canraiseall = true;
while ((actor = iterator.Next()))
{
@ -6531,7 +6530,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(tid);
auto it = level.GetActorIterator(tid);
while ((actor = it.Next()) != nullptr)
{
// Don't log errors when affecting many actors because things might share a TID but not share the flag
@ -6555,7 +6554,7 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
}
else
{
FActorIterator it(tid);
auto it = level.GetActorIterator(tid);
while ((actor = it.Next()) != nullptr)
{
actor->SetTranslation(trname);
@ -9005,7 +9004,7 @@ scriptwait:
if (STACK(7) != 0)
{
FActorIterator iterator (STACK(7));
auto iterator = level.GetActorIterator(STACK(7));
AActor *actor;
while ( (actor = iterator.Next ()) )
@ -9035,7 +9034,7 @@ scriptwait:
lookup = level.Behaviors.LookupString (STACK(2));
if (lookup != NULL)
{
FActorIterator iterator (STACK(3));
auto iterator = level.GetActorIterator(STACK(3));
AActor *spot;
while ( (spot = iterator.Next ()) )
@ -9116,7 +9115,7 @@ scriptwait:
}
else
{
FActorIterator it(STACK(1));
auto it = level.GetActorIterator(STACK(1));
AActor *actor;
for (actor = it.Next(); actor != NULL; actor = it.Next())
{
@ -9144,7 +9143,7 @@ scriptwait:
}
else
{
FActorIterator it(STACK(3));
auto it = level.GetActorIterator(STACK(3));
AActor *actor;
for (actor = it.Next(); actor != NULL; actor = it.Next())
{
@ -9181,7 +9180,7 @@ scriptwait:
}
else
{
FActorIterator it(STACK(3));
auto it = level.GetActorIterator(STACK(3));
AActor *actor;
for (actor = it.Next(); actor != NULL; actor = it.Next())
{
@ -9229,7 +9228,7 @@ scriptwait:
}
else
{
FActorIterator it(STACK(2));
auto it = level.GetActorIterator(STACK(2));
AActor *actor;
for (actor = it.Next(); actor != NULL; actor = it.Next())
{
@ -9801,7 +9800,7 @@ scriptwait:
}
else
{
FActorIterator it (STACK(3));
auto it = level.GetActorIterator(STACK(3));
camera = it.Next ();
}
@ -9854,7 +9853,7 @@ scriptwait:
}
else
{
FActorIterator iterator (STACK(3));
auto iterator = level.GetActorIterator(STACK(3));
AActor *actor;
int count = 0;
@ -10025,7 +10024,7 @@ scriptwait:
}
else
{
FActorIterator iterator (tag);
auto iterator = level.GetActorIterator(tag);
AActor *actor;
while ( (actor = iterator.Next ()) )
@ -10051,7 +10050,7 @@ scriptwait:
}
else
{
FActorIterator iterator (tag);
auto iterator = level.GetActorIterator(tag);
AActor *actor;
while ( (actor = iterator.Next ()) )

View file

@ -1339,7 +1339,7 @@ int P_LookForTID (AActor *actor, INTBOOL allaround, FLookExParams *params)
actor->LastLookActor = nullptr;
}
FActorIterator iterator (actor->TIDtoHate, actor->LastLookActor);
auto iterator = level.GetActorIterator(actor->TIDtoHate, actor->LastLookActor);
int c = (pr_look3() & 31) + 7; // Look for between 7 and 38 hatees at a time
while ((other = iterator.Next()) != actor->LastLookActor)
{
@ -1760,7 +1760,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
// [RH] Set goal now if appropriate
if (self->special == Thing_SetGoal && self->args[0] == 0)
{
NActorIterator iterator (NAME_PatrolPoint, self->args[1]);
auto iterator = level.GetActorIterator(NAME_PatrolPoint, self->args[1]);
self->special = 0;
self->goal = iterator.Next ();
self->reactiontime = self->args[2] * TICRATE + level.maptime;
@ -1889,7 +1889,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
// [RH] Set goal now if appropriate
if (self->special == Thing_SetGoal && self->args[0] == 0)
{
NActorIterator iterator(NAME_PatrolPoint, self->args[1]);
auto iterator = level.GetActorIterator(NAME_PatrolPoint, self->args[1]);
self->special = 0;
self->goal = iterator.Next ();
self->reactiontime = self->args[2] * TICRATE + level.maptime;
@ -2372,8 +2372,8 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
if (result)
{
// reached the goal
NActorIterator iterator (NAME_PatrolPoint, actor->goal->args[0]);
NActorIterator specit (NAME_PatrolSpecial, actor->goal->tid);
auto iterator = level.GetActorIterator(NAME_PatrolPoint, actor->goal->args[0]);
auto specit = level.GetActorIterator(NAME_PatrolSpecial, actor->goal->tid);
AActor *spec;
// Execute the specials of any PatrolSpecials with the same TID

View file

@ -171,7 +171,7 @@ FUNC(LS_Polyobj_MoveTo)
FUNC(LS_Polyobj_MoveToSpot)
// Polyobj_MoveToSpot (po, speed, tid)
{
FActorIterator iterator (arg2);
auto iterator = Level->GetActorIterator(arg2);
AActor *spot = iterator.Next();
if (spot == NULL) return false;
return EV_MovePolyTo (Level, ln, arg0, SPEED(arg1), spot->Pos(), false);
@ -222,7 +222,7 @@ FUNC(LS_Polyobj_OR_MoveTo)
FUNC(LS_Polyobj_OR_MoveToSpot)
// Polyobj_OR_MoveToSpot (po, speed, tid)
{
FActorIterator iterator (arg2);
auto iterator = Level->GetActorIterator(arg2);
AActor *spot = iterator.Next();
if (spot == NULL) return false;
return EV_MovePolyTo (Level, ln, arg0, SPEED(arg1), spot->Pos(), true);
@ -1210,7 +1210,7 @@ FUNC(LS_ThrustThing)
{
if (arg3 != 0)
{
FActorIterator iterator (arg3);
auto iterator = Level->GetActorIterator(arg3);
while ((it = iterator.Next()) != NULL)
{
ThrustThingHelper (it, BYTEANGLE(arg0), arg1, arg2);
@ -1241,7 +1241,7 @@ FUNC(LS_ThrustThingZ) // [BC]
if (arg0 != 0)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
while ( (victim = iterator.Next ()) )
{
@ -1281,7 +1281,7 @@ FUNC(LS_Thing_SetSpecial) // [BC]
else
{
AActor *actor;
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
while ( (actor = iterator.Next ()) )
{
@ -1308,7 +1308,7 @@ FUNC(LS_Thing_ChangeTID)
}
else
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
AActor *actor, *next;
next = iterator.Next ();
@ -1424,7 +1424,7 @@ FUNC(LS_Thing_Activate)
if (arg0 != 0)
{
AActor *actor;
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
int count = 0;
actor = iterator.Next ();
@ -1454,7 +1454,7 @@ FUNC(LS_Thing_Deactivate)
if (arg0 != 0)
{
AActor *actor;
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
int count = 0;
actor = iterator.Next ();
@ -1483,7 +1483,7 @@ FUNC(LS_Thing_Remove)
{
if (arg0 != 0)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
AActor *actor;
actor = iterator.Next ();
@ -1527,7 +1527,7 @@ FUNC(LS_Thing_Destroy)
}
else
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
actor = iterator.Next ();
while (actor)
@ -1565,9 +1565,9 @@ FUNC(LS_Thing_ProjectileGravity)
FUNC(LS_Thing_Hate)
// Thing_Hate (hater, hatee, group/"xray"?)
{
FActorIterator haterIt (arg0);
AActor *hater, *hatee = NULL;
FActorIterator hateeIt (arg1);
AActor *hater, *hatee = nullptr;
auto haterIt = Level->GetActorIterator(arg0);
auto hateeIt = Level->GetActorIterator(arg1);
bool nothingToHate = false;
if (arg1 != 0)
@ -1768,7 +1768,7 @@ FUNC(LS_Thing_Raise)
}
else
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
while ( (target = iterator.Next ()) )
{
@ -1795,7 +1795,7 @@ FUNC(LS_Thing_Stop)
}
else
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
while ( (target = iterator.Next ()) )
{
@ -1811,8 +1811,8 @@ FUNC(LS_Thing_Stop)
FUNC(LS_Thing_SetGoal)
// Thing_SetGoal (tid, goal, delay, chasegoal)
{
FActorIterator selfiterator (arg0);
NActorIterator goaliterator (NAME_PatrolPoint, arg1);
auto selfiterator = Level->GetActorIterator(arg0);
auto goaliterator = Level->GetActorIterator(NAME_PatrolPoint, arg1);
AActor *self;
AActor *goal = goaliterator.Next ();
bool ok = false;
@ -1861,7 +1861,7 @@ enum
FUNC(LS_Thing_SetTranslation)
// Thing_SetTranslation (tid, range)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
int range;
AActor *target;
bool ok = false;
@ -2278,7 +2278,7 @@ FUNC(LS_Sector_SetLink)
{
if (arg0 != 0) // control tag == 0 is for static initialization and must not be handled here
{
int control = level.FindFirstSectorFromTag(arg0);
int control = Level->FindFirstSectorFromTag(arg0);
if (control >= 0)
{
return P_AddSectorLinks(&Level->sectors[control], arg1, arg2, arg3);
@ -2822,7 +2822,7 @@ FUNC(LS_ChangeCamera)
AActor *camera;
if (arg0 != 0)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
camera = iterator.Next ();
}
else
@ -3159,7 +3159,7 @@ FUNC(LS_NoiseAlert)
}
else
{
FActorIterator iter (arg0);
auto iter = Level->GetActorIterator(arg0);
target = iter.Next();
}
@ -3173,7 +3173,7 @@ FUNC(LS_NoiseAlert)
}
else
{
FActorIterator iter (arg1);
auto iter = Level->GetActorIterator(arg1);
emitter = iter.Next();
}
@ -3333,7 +3333,7 @@ FUNC(LS_GlassBreak)
FUNC(LS_StartConversation)
// StartConversation (tid, facetalker)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
AActor *target = iterator.Next();
@ -3384,7 +3384,7 @@ FUNC(LS_Thing_SetConversation)
if (arg0 != 0)
{
FActorIterator iterator (arg0);
auto iterator = Level->GetActorIterator(arg0);
while ((it = iterator.Next()) != NULL)
{
it->ConversationRoot = dlg_index;

View file

@ -250,7 +250,7 @@ static AActor *SelectTeleDest (int tid, int tag, bool norandom)
if (tid != 0)
{
NActorIterator iterator (NAME_TeleportDest, tid);
auto iterator = level.GetActorIterator(NAME_TeleportDest, tid);
int count = 0;
while ( (searcher = iterator.Next ()) )
{
@ -268,12 +268,12 @@ static AActor *SelectTeleDest (int tid, int tag, bool norandom)
if (tag == 0)
{
// Try to find a matching map spot (fixes Hexen MAP10)
NActorIterator it2 (NAME_MapSpot, tid);
auto it2 = level.GetActorIterator(NAME_MapSpot, tid);
searcher = it2.Next ();
if (searcher == NULL)
if (searcher == nullptr)
{
// Try to find a matching non-blocking spot of any type (fixes Caldera MAP13)
FActorIterator it3 (tid);
auto it3 = level.GetActorIterator(tid);
searcher = it3.Next ();
while (searcher != NULL && (searcher->flags & MF_SOLID))
{
@ -607,7 +607,7 @@ bool EV_TeleportOther (int other_tid, int dest_tid, bool fog)
if (other_tid != 0 && dest_tid != 0)
{
AActor *victim;
FActorIterator iterator (other_tid);
auto iterator = level.GetActorIterator(other_tid);
while ( (victim = iterator.Next ()) )
{
@ -642,7 +642,7 @@ bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_t
{
AActor *sourceOrigin, *destOrigin;
{
FActorIterator iterator (source_tid);
auto iterator = level.GetActorIterator(source_tid);
sourceOrigin = iterator.Next ();
}
if (sourceOrigin == NULL)
@ -651,7 +651,7 @@ bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_t
}
{
NActorIterator iterator (NAME_TeleportDest, dest_tid);
auto iterator = level.GetActorIterator(NAME_TeleportDest, dest_tid);
destOrigin = iterator.Next ();
}
if (destOrigin == NULL)
@ -669,7 +669,7 @@ bool EV_TeleportGroup (int group_tid, AActor *victim, int source_tid, int dest_t
}
else
{
FActorIterator iterator (group_tid);
auto iterator = level.GetActorIterator(group_tid);
// For each actor with tid matching arg0, move it to the same
// position relative to destOrigin as it is relative to sourceOrigin
@ -697,7 +697,7 @@ bool EV_TeleportSector (int tag, int source_tid, int dest_tid, bool fog, int gro
{
AActor *sourceOrigin, *destOrigin;
{
FActorIterator iterator (source_tid);
auto iterator = level.GetActorIterator(source_tid);
sourceOrigin = iterator.Next ();
}
if (sourceOrigin == NULL)
@ -705,7 +705,7 @@ bool EV_TeleportSector (int tag, int source_tid, int dest_tid, bool fog, int gro
return false;
}
{
NActorIterator iterator (NAME_TeleportDest, dest_tid);
auto iterator = level.GetActorIterator(NAME_TeleportDest, dest_tid);
destOrigin = iterator.Next ();
}
if (destOrigin == NULL)

View file

@ -57,7 +57,7 @@ bool P_Thing_Spawn (int tid, AActor *source, int type, DAngle angle, bool fog, i
int rtn = 0;
PClassActor *kind;
AActor *spot, *mobj;
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
kind = P_GetSpawnableType(type);
@ -150,10 +150,10 @@ bool P_Thing_Move (int tid, AActor *source, int mapspot, bool fog)
if (tid != 0)
{
FActorIterator iterator1(tid);
auto iterator1 = level.GetActorIterator(tid);
source = iterator1.Next();
}
FActorIterator iterator2 (mapspot);
auto iterator2 = level.GetActorIterator(mapspot);
target = iterator2.Next ();
if (source != NULL && target != NULL)
@ -263,7 +263,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char *type_nam
int rtn = 0;
PClassActor *kind;
AActor *spot, *mobj, *targ = forcedest;
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
int defflags3;
if (type_name == NULL)
@ -297,7 +297,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char *type_nam
}
while (spot != NULL)
{
FActorIterator tit (dest);
auto tit = level.GetActorIterator(dest);
if (dest == 0 || (targ = tit.Next()))
{
@ -396,7 +396,7 @@ bool P_Thing_Projectile (int tid, AActor *source, int type, const char *type_nam
int P_Thing_Damage (int tid, AActor *whofor0, int amount, FName type)
{
FActorIterator iterator (tid);
auto iterator = level.GetActorIterator(tid);
int count = 0;
AActor *actor;