- fixed many compilation errors with GCC and Clang

This commit is contained in:
alexey.lysiuk 2019-01-07 10:14:52 +02:00 committed by Christoph Oelckers
commit 11958b713e
25 changed files with 110 additions and 110 deletions

View file

@ -1336,7 +1336,7 @@ int P_LookForTID (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (actor->LastLookActor != NULL &&
actor->LastLookActor->tid != actor->TIDtoHate)
{
actor->LastLookActor = NULL;
actor->LastLookActor = nullptr;
}
FActorIterator iterator (actor->TIDtoHate, actor->LastLookActor);
@ -1401,12 +1401,12 @@ int P_LookForTID (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1540,12 +1540,12 @@ int P_LookForEnemies (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1674,12 +1674,12 @@ int P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
if (!actor->IsFriend(actor->lastenemy))
{
actor->target = actor->lastenemy;
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
return true;
}
else
{
actor->lastenemy = NULL;
actor->lastenemy = nullptr;
}
}
}
@ -1839,7 +1839,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
if (self->target == self->goal)
{
if (self->reactiontime > level.maptime)
self->target = NULL;
self->target = nullptr;
}
else if (self->SeeSound)
{
@ -1926,7 +1926,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
if (maxheardist && dist > maxheardist)
{
targ = NULL;
self->LastHeard = NULL;
self->LastHeard = nullptr;
}
}
}
@ -1985,7 +1985,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
// [KS] The target can become ourselves in rare circumstances (like
// if we committed suicide), so if that's the case, just ignore it.
if (self->target == self) self->target = NULL;
if (self->target == self) self->target = nullptr;
if (self->target != NULL)
{
@ -2021,7 +2021,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
if (self->target == self->goal)
{
if (self->reactiontime > level.maptime)
self->target = NULL;
self->target = nullptr;
}
else if (self->SeeSound && !(flags & LOF_NOSEESOUND))
{
@ -2063,7 +2063,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
DEFINE_ACTION_FUNCTION(AActor, A_ClearLastHeard)
{
PARAM_SELF_PROLOGUE(AActor);
self->LastHeard = NULL;
self->LastHeard = nullptr;
return 0;
}
@ -2225,7 +2225,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
actor->target->renderflags & RF_INVISIBLE &&
actor->target != actor->goal)
{
actor->target = NULL;
actor->target = nullptr;
}
// modify target threshold
@ -2274,7 +2274,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
// [RH] If the target is dead or a friend (and not a goal), stop chasing it.
if (actor->target && actor->target != actor->goal && (actor->target->health <= 0 || actor->IsFriend(actor->target)))
actor->target = NULL;
actor->target = nullptr;
// [RH] Friendly monsters will consider chasing whoever hurts a player if they
// don't already have a target.
@ -2398,7 +2398,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
actor->reactiontime = actor->GetDefault()->reactiontime;
actor->Angles.Yaw = lastgoalang; // Look in direction of last goal
}
if (actor->target == actor->goal) actor->target = NULL;
if (actor->target == actor->goal) actor->target = nullptr;
actor->flags |= MF_JUSTATTACKED;
if (newgoal != NULL && delay != 0)
{
@ -2692,8 +2692,8 @@ bool P_CheckForResurrection(AActor *self, bool usevilestates)
{
// If this is a friendly Arch-Vile (which is turning the resurrected monster into its friend)
// and the Arch-Vile is currently targetting the resurrected monster the target must be cleared.
if (self->lastenemy == temp) self->lastenemy = NULL;
if (self->lastenemy == corpsehit) self->lastenemy = NULL;
if (self->lastenemy == temp) self->lastenemy = nullptr;
if (self->lastenemy == corpsehit) self->lastenemy = nullptr;
if (temp == self->target) temp = NULL;
}
self->target = temp;