mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- fixed many compilation errors with GCC and Clang
# Conflicts: # src/dobjgc.h
This commit is contained in:
parent
d6b18e5792
commit
d8d290cd51
24 changed files with 109 additions and 109 deletions
|
@ -151,7 +151,7 @@ void VerifyTargetChain(AActor *self, bool preciseMissileCheck)
|
|||
{
|
||||
// if any of the actors from self to (inclusive) origin match the next actor,
|
||||
// self has reached/created a loop
|
||||
self->target = NULL;
|
||||
self->target = nullptr;
|
||||
return;
|
||||
}
|
||||
if (compare == origin) break; // when "compare" = origin, we know that the next actor is, and should be "next"
|
||||
|
@ -177,7 +177,7 @@ void VerifyMasterChain(AActor *self)
|
|||
{
|
||||
if (compare == next)
|
||||
{
|
||||
self->master = NULL;
|
||||
self->master = nullptr;
|
||||
return;
|
||||
}
|
||||
if (compare == origin) break;
|
||||
|
@ -216,4 +216,4 @@ void ASSIGN_AAPTR(AActor *toActor, int toSlot, AActor *ptr, int flags)
|
|||
toActor->tracer = ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@ AActor *DBot::Choose_Mate ()
|
|||
if (mate)
|
||||
{
|
||||
if (mate->health <= 0)
|
||||
mate = NULL;
|
||||
mate = nullptr;
|
||||
else
|
||||
last_mate = mate;
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ AActor *DBot::Choose_Mate ()
|
|||
//Check old_mates status.
|
||||
if (last_mate)
|
||||
if (last_mate->health <= 0)
|
||||
last_mate = NULL;
|
||||
last_mate = nullptr;
|
||||
|
||||
target = NULL;
|
||||
closest_dist = FLT_MAX;
|
||||
|
|
|
@ -178,12 +178,12 @@ void FCajunMaster::Main ()
|
|||
void FCajunMaster::Init ()
|
||||
{
|
||||
botnum = 0;
|
||||
firstthing = NULL;
|
||||
firstthing = nullptr;
|
||||
spawn_tries = 0;
|
||||
freeze = false;
|
||||
observer = false;
|
||||
body1 = NULL;
|
||||
body2 = NULL;
|
||||
body1 = nullptr;
|
||||
body2 = nullptr;
|
||||
|
||||
if (ctf && teamplay == false)
|
||||
teamplay = true; //Need teamplay for ctf. (which is not done yet)
|
||||
|
|
|
@ -126,7 +126,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
(!missile->Vel.X || !missile->Vel.Y || !Check_LOS(missile, SHOOTFOV*3/2)))
|
||||
{
|
||||
sleft = !sleft;
|
||||
missile = NULL; //Probably ended its travel.
|
||||
missile = nullptr; //Probably ended its travel.
|
||||
}
|
||||
|
||||
#if 0 // this has always been broken and without any reference it cannot be fixed.
|
||||
|
@ -188,7 +188,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
|
||||
dest = NULL; //To let bot turn right
|
||||
dest = nullptr; //To let bot turn right
|
||||
|
||||
if (GetBotInfo(player->ReadyWeapon).MoveCombatDist == 0)
|
||||
player->mo->flags &= ~MF_DROPOFF; //Don't jump off any ledges when fighting.
|
||||
|
@ -242,7 +242,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
{
|
||||
if (mate == dest && pr_botmove.Random() < 32)
|
||||
{ // [RH] If the mate is the dest, pick a new dest sometimes
|
||||
dest = NULL;
|
||||
dest = nullptr;
|
||||
}
|
||||
goto roam;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
|
||||
if (dest && !(dest->flags&MF_SPECIAL) && dest->health < 0)
|
||||
{ //Roaming after something dead.
|
||||
dest = NULL;
|
||||
dest = nullptr;
|
||||
}
|
||||
|
||||
if (dest == NULL)
|
||||
|
@ -338,7 +338,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
if (!t_roam && dest)
|
||||
{
|
||||
prev = dest;
|
||||
dest = NULL;
|
||||
dest = nullptr;
|
||||
}
|
||||
|
||||
if (t_fight<(AFTERTICS/2))
|
||||
|
@ -443,5 +443,5 @@ void DBot::Set_enemy ()
|
|||
}
|
||||
//Verify that that enemy is really something alive that bot can kill.
|
||||
if (enemy && ((enemy->health < 0 || !(enemy->flags&MF_SHOOTABLE)) || player->mo->IsFriend(enemy)))
|
||||
enemy = NULL;
|
||||
enemy = nullptr;
|
||||
}
|
||||
|
|
|
@ -3322,7 +3322,7 @@ void FParser::SF_Resurrect()
|
|||
mo->Height = mo->GetDefault()->Height;
|
||||
mo->radius = mo->GetDefault()->radius;
|
||||
mo->Revive();
|
||||
mo->target = NULL;
|
||||
mo->target = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ void DFsScript::ClearSections()
|
|||
var->Destroy();
|
||||
var = next;
|
||||
}
|
||||
sections[i] = NULL;
|
||||
sections[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -178,9 +178,9 @@ DFsVariable::DFsVariable(const char * _name)
|
|||
{
|
||||
Name=_name;
|
||||
type=svt_int;
|
||||
actor = NULL;
|
||||
actor = nullptr;
|
||||
value.i=0;
|
||||
next=NULL;
|
||||
next = nullptr;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -1721,7 +1721,7 @@ void G_DoPlayerPop(int playernum)
|
|||
players[playernum].mo->Destroy();
|
||||
}
|
||||
players[playernum].mo = NULL;
|
||||
players[playernum].camera = NULL;
|
||||
players[playernum].camera = nullptr;
|
||||
}
|
||||
|
||||
players[playernum].DestroyPSprites();
|
||||
|
@ -2785,7 +2785,7 @@ bool G_CheckDemoStatus (void)
|
|||
for (int i = 1; i < MAXPLAYERS; i++)
|
||||
playeringame[i] = 0;
|
||||
consoleplayer = 0;
|
||||
players[0].camera = NULL;
|
||||
players[0].camera = nullptr;
|
||||
if (StatusBar != NULL)
|
||||
{
|
||||
StatusBar->AttachToPlayer (&players[0]);
|
||||
|
|
|
@ -1277,7 +1277,7 @@ void G_StartTravel ()
|
|||
{
|
||||
AActor *pawn = players[i].mo;
|
||||
AActor *inv;
|
||||
players[i].camera = NULL;
|
||||
players[i].camera = nullptr;
|
||||
|
||||
// Only living players travel. Dead ones get a new body on the new level.
|
||||
if (players[i].health > 0)
|
||||
|
@ -1379,8 +1379,8 @@ int G_FinishTravel ()
|
|||
{
|
||||
P_FindFloorCeiling(pawn);
|
||||
}
|
||||
pawn->target = NULL;
|
||||
pawn->lastenemy = NULL;
|
||||
pawn->target = nullptr;
|
||||
pawn->lastenemy = nullptr;
|
||||
pawn->player->mo = pawn;
|
||||
pawn->player->camera = pawn;
|
||||
pawn->player->viewheight = pawn->player->DefaultViewHeight();
|
||||
|
|
|
@ -451,7 +451,7 @@ void DBaseStatusBar::OnDestroy ()
|
|||
msg->Destroy();
|
||||
msg = next;
|
||||
}
|
||||
Messages[i] = NULL;
|
||||
Messages[i] = nullptr;
|
||||
}
|
||||
if (AltHud) AltHud->Destroy();
|
||||
Super::OnDestroy();
|
||||
|
@ -723,7 +723,7 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (DHUDMessageBase *msg)
|
|||
if (probe != NULL)
|
||||
{
|
||||
*prev = probe->Next;
|
||||
probe->Next = NULL;
|
||||
probe->Next = nullptr;
|
||||
return probe;
|
||||
}
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ DHUDMessageBase *DBaseStatusBar::DetachMessage (uint32_t id)
|
|||
if (probe != NULL)
|
||||
{
|
||||
*prev = probe->Next;
|
||||
probe->Next = NULL;
|
||||
probe->Next = nullptr;
|
||||
return probe;
|
||||
}
|
||||
}
|
||||
|
@ -764,7 +764,7 @@ void DBaseStatusBar::DetachAllMessages ()
|
|||
{
|
||||
DHUDMessageBase *probe = Messages[i];
|
||||
|
||||
Messages[i] = NULL;
|
||||
Messages[i] = nullptr;
|
||||
while (probe != NULL)
|
||||
{
|
||||
DHUDMessageBase *next = probe->Next;
|
||||
|
|
|
@ -729,7 +729,7 @@ DIntermissionController::DIntermissionController(FIntermissionDescriptor *Desc,
|
|||
mIndex = 0;
|
||||
mAdvance = false;
|
||||
mSentAdvance = false;
|
||||
mScreen = NULL;
|
||||
mScreen = nullptr;
|
||||
mFirst = true;
|
||||
mGameState = state;
|
||||
}
|
||||
|
|
|
@ -4023,15 +4023,15 @@ int DoSetMaster (AActor *self, AActor *master)
|
|||
self->flags = (self->flags & ~MF_FRIENDLY) | (master->flags & MF_FRIENDLY);
|
||||
level.total_monsters += self->CountsAsKill();
|
||||
// Don't attack your new master
|
||||
if (self->target == self->master) self->target = NULL;
|
||||
if (self->lastenemy == self->master) self->lastenemy = NULL;
|
||||
if (self->LastHeard == self->master) self->LastHeard = NULL;
|
||||
if (self->target == self->master) self->target = nullptr;
|
||||
if (self->lastenemy == self->master) self->lastenemy = nullptr;
|
||||
if (self->LastHeard == self->master) self->LastHeard = nullptr;
|
||||
return 1;
|
||||
}
|
||||
else if (master->player)
|
||||
{
|
||||
// [KS] Be friendly to this player
|
||||
self->master = NULL;
|
||||
self->master = nullptr;
|
||||
level.total_monsters -= self->CountsAsKill();
|
||||
self->flags|=MF_FRIENDLY;
|
||||
self->SetFriendPlayer(master->player);
|
||||
|
@ -4046,15 +4046,15 @@ int DoSetMaster (AActor *self, AActor *master)
|
|||
}
|
||||
}
|
||||
// And stop attacking him if necessary.
|
||||
if (self->target == master) self->target = NULL;
|
||||
if (self->lastenemy == master) self->lastenemy = NULL;
|
||||
if (self->LastHeard == master) self->LastHeard = NULL;
|
||||
if (self->target == master) self->target = nullptr;
|
||||
if (self->lastenemy == master) self->lastenemy = nullptr;
|
||||
if (self->LastHeard == master) self->LastHeard = nullptr;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self->master = NULL;
|
||||
self->master = nullptr;
|
||||
self->FriendPlayer = 0;
|
||||
// Go back to whatever friendliness we usually have...
|
||||
defs = self->GetDefault();
|
||||
|
@ -4062,9 +4062,9 @@ int DoSetMaster (AActor *self, AActor *master)
|
|||
self->flags = (self->flags & ~MF_FRIENDLY) | (defs->flags & MF_FRIENDLY);
|
||||
level.total_monsters += self->CountsAsKill();
|
||||
// ...And re-side with our friends.
|
||||
if (self->target && !self->IsHostile (self->target)) self->target = NULL;
|
||||
if (self->lastenemy && !self->IsHostile (self->lastenemy)) self->lastenemy = NULL;
|
||||
if (self->LastHeard && !self->IsHostile (self->LastHeard)) self->LastHeard = NULL;
|
||||
if (self->target && !self->IsHostile (self->target)) self->target = nullptr;
|
||||
if (self->lastenemy && !self->IsHostile (self->lastenemy)) self->lastenemy = nullptr;
|
||||
if (self->LastHeard && !self->IsHostile (self->LastHeard)) self->LastHeard = nullptr;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -585,7 +585,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
|
|||
if (!(PTROP_UNSAFETARGET & flags)) VerifyTargetChain(self);
|
||||
break;
|
||||
case AAPTR_NULL:
|
||||
self->target = NULL;
|
||||
self->target = nullptr;
|
||||
// THIS IS NOT "A_ClearTarget", so no other targeting info is removed
|
||||
break;
|
||||
}
|
||||
|
@ -602,7 +602,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
|
|||
if (!(PTROP_UNSAFEMASTER & flags)) VerifyMasterChain(self);
|
||||
break;
|
||||
case AAPTR_NULL:
|
||||
self->master = NULL;
|
||||
self->master = nullptr;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_RearrangePointers)
|
|||
self->tracer = getmaster;
|
||||
break; // no verification deemed necessary; the engine never follows a tracer chain(?)
|
||||
case AAPTR_NULL:
|
||||
self->tracer = NULL;
|
||||
self->tracer = nullptr;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
@ -786,7 +786,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SeekerMissile)
|
|||
{
|
||||
if (flags & SMF_LOOK)
|
||||
{ // This monster is no longer seekable, so let us look for another one next time.
|
||||
self->tracer = NULL;
|
||||
self->tracer = nullptr;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -1996,17 +1996,17 @@ DEFINE_ACTION_FUNCTION(AActor, A_Respawn)
|
|||
// ...Actually it's better off an option, so you have better control over monster behavior.
|
||||
if (!(flags & RSF_KEEPTARGET))
|
||||
{
|
||||
self->target = NULL;
|
||||
self->LastHeard = NULL;
|
||||
self->lastenemy = NULL;
|
||||
self->target = nullptr;
|
||||
self->LastHeard = nullptr;
|
||||
self->lastenemy = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Don't attack yourself (Re: "Marine targets itself after suicide")
|
||||
if (self->target == self)
|
||||
self->target = NULL;
|
||||
self->target = nullptr;
|
||||
if (self->lastenemy == self)
|
||||
self->lastenemy = NULL;
|
||||
self->lastenemy = nullptr;
|
||||
}
|
||||
|
||||
self->flags = (defs->flags & ~MF_FRIENDLY) | (self->flags & MF_FRIENDLY);
|
||||
|
|
|
@ -1081,8 +1081,8 @@ static void HandleReply(player_t *player, bool isconsole, int nodenum, int reply
|
|||
{
|
||||
npc->flags5 &= ~MF5_INCONVERSATION;
|
||||
player->ConversationFaceTalker = false;
|
||||
player->ConversationNPC = NULL;
|
||||
player->ConversationPC = NULL;
|
||||
player->ConversationNPC = nullptr;
|
||||
player->ConversationPC = nullptr;
|
||||
player->ConversationNPCAngle = 0.;
|
||||
}
|
||||
|
||||
|
@ -1128,8 +1128,8 @@ void P_ConversationCommand (int netcode, int pnum, uint8_t **stream)
|
|||
if (netcode == DEM_CONVNULL)
|
||||
{
|
||||
player->ConversationFaceTalker = false;
|
||||
player->ConversationNPC = NULL;
|
||||
player->ConversationPC = NULL;
|
||||
player->ConversationNPC = nullptr;
|
||||
player->ConversationPC = nullptr;
|
||||
player->ConversationNPCAngle = 0.;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ void DDoor::Tick ()
|
|||
{
|
||||
case doorRaise:
|
||||
case doorClose:
|
||||
m_Sector->ceilingdata = NULL; //jff 2/22/98
|
||||
m_Sector->ceilingdata = nullptr; //jff 2/22/98
|
||||
Destroy (); // unlink and free
|
||||
break;
|
||||
|
||||
|
@ -202,7 +202,7 @@ void DDoor::Tick ()
|
|||
|
||||
case doorCloseWaitOpen:
|
||||
case doorOpen:
|
||||
m_Sector->ceilingdata = NULL; //jff 2/22/98
|
||||
m_Sector->ceilingdata = nullptr; //jff 2/22/98
|
||||
Destroy (); // unlink and free
|
||||
break;
|
||||
|
||||
|
@ -597,7 +597,7 @@ void DAnimatedDoor::Tick ()
|
|||
switch (m_Status)
|
||||
{
|
||||
case Dead:
|
||||
m_Sector->ceilingdata = NULL;
|
||||
m_Sector->ceilingdata = nullptr;
|
||||
Destroy ();
|
||||
break;
|
||||
|
||||
|
@ -612,7 +612,7 @@ void DAnimatedDoor::Tick ()
|
|||
|
||||
if (m_Delay == 0)
|
||||
{
|
||||
m_Sector->ceilingdata = NULL;
|
||||
m_Sector->ceilingdata = nullptr;
|
||||
Destroy ();
|
||||
break;
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ void DAnimatedDoor::Tick ()
|
|||
{
|
||||
// IF DOOR IS DONE CLOSING...
|
||||
m_Sector->MoveCeiling (2048., m_BotDist, -1);
|
||||
m_Sector->ceilingdata = NULL;
|
||||
m_Sector->ceilingdata = nullptr;
|
||||
Destroy ();
|
||||
// Unset blocking flags on lines that didn't start with them. Since the
|
||||
// ceiling is down now, we shouldn't need this flag anymore to keep things
|
||||
|
|
|
@ -1346,7 +1346,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);
|
||||
|
@ -1411,12 +1411,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1550,12 +1550,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1684,12 +1684,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1849,7 +1849,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)
|
||||
{
|
||||
|
@ -1936,7 +1936,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_LookEx)
|
|||
if (maxheardist && dist > maxheardist)
|
||||
{
|
||||
targ = NULL;
|
||||
self->LastHeard = NULL;
|
||||
self->LastHeard = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1995,7 +1995,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)
|
||||
{
|
||||
|
@ -2031,7 +2031,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))
|
||||
{
|
||||
|
@ -2073,7 +2073,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;
|
||||
}
|
||||
|
||||
|
@ -2235,7 +2235,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
|
||||
|
@ -2284,7 +2284,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.
|
||||
|
@ -2408,7 +2408,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)
|
||||
{
|
||||
|
@ -2702,8 +2702,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;
|
||||
|
|
|
@ -181,7 +181,7 @@ void DFloor::Tick ()
|
|||
}
|
||||
}
|
||||
|
||||
m_Sector->floordata = NULL; //jff 2/22/98
|
||||
m_Sector->floordata = nullptr; //jff 2/22/98
|
||||
StopInterpolation();
|
||||
|
||||
//jff 2/26/98 implement stair retrigger lockout while still building
|
||||
|
@ -561,7 +561,7 @@ bool EV_FloorCrushStop (int tag, line_t *line)
|
|||
{
|
||||
SN_StopSequence (sec, CHAN_FLOOR);
|
||||
sec->floordata->Destroy ();
|
||||
sec->floordata = NULL;
|
||||
sec->floordata = nullptr;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -900,12 +900,12 @@ void DElevator::OnDestroy()
|
|||
if (m_Interp_Ceiling != NULL)
|
||||
{
|
||||
m_Interp_Ceiling->DelRef();
|
||||
m_Interp_Ceiling = NULL;
|
||||
m_Interp_Ceiling = nullptr;
|
||||
}
|
||||
if (m_Interp_Floor != NULL)
|
||||
{
|
||||
m_Interp_Floor->DelRef();
|
||||
m_Interp_Floor = NULL;
|
||||
m_Interp_Floor = nullptr;
|
||||
}
|
||||
Super::OnDestroy();
|
||||
}
|
||||
|
@ -964,8 +964,8 @@ void DElevator::Tick ()
|
|||
// make floor stop sound
|
||||
SN_StopSequence (m_Sector, CHAN_FLOOR);
|
||||
|
||||
m_Sector->floordata = NULL; //jff 2/22/98
|
||||
m_Sector->ceilingdata = NULL; //jff 2/22/98
|
||||
m_Sector->floordata = nullptr; //jff 2/22/98
|
||||
m_Sector->ceilingdata = nullptr; //jff 2/22/98
|
||||
Destroy (); // remove elevator from actives
|
||||
}
|
||||
}
|
||||
|
@ -1225,11 +1225,11 @@ void DWaggleBase::DoWaggle (bool ceiling)
|
|||
P_ChangeSector (m_Sector, true, dist, ceiling, false);
|
||||
if (ceiling)
|
||||
{
|
||||
m_Sector->ceilingdata = NULL;
|
||||
m_Sector->ceilingdata = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Sector->floordata = NULL;
|
||||
m_Sector->floordata = nullptr;
|
||||
}
|
||||
Destroy ();
|
||||
return;
|
||||
|
|
|
@ -585,8 +585,8 @@ void AActor::Die (AActor *source, AActor *inflictor, int dmgflags, FName MeansOf
|
|||
if (players[i].Bot != NULL && this == players[i].Bot->enemy)
|
||||
{
|
||||
if (players[i].Bot->dest == players[i].Bot->enemy)
|
||||
players[i].Bot->dest = NULL;
|
||||
players[i].Bot->enemy = NULL;
|
||||
players[i].Bot->dest = nullptr;
|
||||
players[i].Bot->enemy = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1627,7 +1627,7 @@ FUNC(LS_Thing_Hate)
|
|||
if (arg2 != 0)
|
||||
{
|
||||
hater->TIDtoHate = arg1;
|
||||
hater->LastLookActor = NULL;
|
||||
hater->LastLookActor = nullptr;
|
||||
|
||||
// If the TID to hate is 0, then don't forget the target and
|
||||
// lastenemy fields.
|
||||
|
@ -1635,11 +1635,11 @@ FUNC(LS_Thing_Hate)
|
|||
{
|
||||
if (hater->target != NULL && hater->target->tid != arg1)
|
||||
{
|
||||
hater->target = NULL;
|
||||
hater->target = nullptr;
|
||||
}
|
||||
if (hater->lastenemy != NULL && hater->lastenemy->tid != arg1)
|
||||
{
|
||||
hater->lastenemy = NULL;
|
||||
hater->lastenemy = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1833,7 +1833,7 @@ FUNC(LS_Thing_SetGoal)
|
|||
{ // Targeting a goal already? -> don't target it anymore.
|
||||
// A_Look will set it to the goal, presuming no real targets
|
||||
// come into view by then.
|
||||
self->target = NULL;
|
||||
self->target = nullptr;
|
||||
}
|
||||
self->goal = goal;
|
||||
if (arg3 == 0)
|
||||
|
|
|
@ -2345,7 +2345,7 @@ bool P_TryMove(AActor *thing, const DVector2 &pos,
|
|||
&& bglobal.IsDangerous(tm.sector))
|
||||
{
|
||||
thing->player->Bot->prev = thing->player->Bot->dest;
|
||||
thing->player->Bot->dest = NULL;
|
||||
thing->player->Bot->dest = nullptr;
|
||||
thing->Vel.X = thing->Vel.Y = 0;
|
||||
thing->SetZ(oldz);
|
||||
thing->flags6 &= ~MF6_INTRYMOVE;
|
||||
|
|
|
@ -1727,7 +1727,7 @@ bool P_SeekerMissile (AActor *actor, double thresh, double turnMax, bool precise
|
|||
}
|
||||
if (!(target->flags & MF_SHOOTABLE))
|
||||
{ // Target died
|
||||
actor->tracer = NULL;
|
||||
actor->tracer = nullptr;
|
||||
return false;
|
||||
}
|
||||
if (speed == 0)
|
||||
|
@ -5071,14 +5071,14 @@ AActor *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
|
|||
p->fixedlightlevel = -1;
|
||||
p->viewheight = p->DefaultViewHeight();
|
||||
p->inconsistant = 0;
|
||||
p->attacker = NULL;
|
||||
p->attacker = nullptr;
|
||||
p->spreecount = 0;
|
||||
p->multicount = 0;
|
||||
p->lastkilltime = 0;
|
||||
p->BlendR = p->BlendG = p->BlendB = p->BlendA = 0.f;
|
||||
p->Uncrouch();
|
||||
p->MinPitch = p->MaxPitch = 0.; // will be filled in by PostBeginPlay()/netcode
|
||||
p->MUSINFOactor = NULL;
|
||||
p->MUSINFOactor = nullptr;
|
||||
p->MUSINFOtics = -1;
|
||||
p->Vel.Zero(); // killough 10/98: initialize bobbing to 0.
|
||||
|
||||
|
@ -5174,7 +5174,7 @@ AActor *P_SpawnPlayer (FPlayerStart *mthing, int playernum, int flags)
|
|||
TThinkerIterator<AActor> it;
|
||||
while ((th = it.Next()))
|
||||
{
|
||||
if (th->LastHeard == oldactor) th->LastHeard = NULL;
|
||||
if (th->LastHeard == oldactor) th->LastHeard = nullptr;
|
||||
}
|
||||
for(auto &sec : level.sectors)
|
||||
{
|
||||
|
@ -7141,8 +7141,8 @@ void AActor::Revive()
|
|||
if (SpawnFlags & MTF_FRIENDLY) flags |= MF_FRIENDLY;
|
||||
DamageType = info->DamageType;
|
||||
health = SpawnHealth();
|
||||
target = NULL;
|
||||
lastenemy = NULL;
|
||||
target = nullptr;
|
||||
lastenemy = nullptr;
|
||||
|
||||
// [RH] If it's a monster, it gets to count as another kill
|
||||
if (CountsAsKill())
|
||||
|
|
|
@ -996,7 +996,7 @@ void P_SetupPortals()
|
|||
if (s.mType == PORTS_STACKEDSECTORTHING && s.mSkybox)
|
||||
{
|
||||
s.mDisplacement = s.mSkybox->Pos() - s.mSkybox->target->Pos();
|
||||
s.mSkybox = NULL;
|
||||
s.mSkybox = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ void FInterpolator::AddInterpolation(DInterpolation *interp)
|
|||
{
|
||||
interp->Next = Head;
|
||||
if (Head != NULL) Head->Prev = interp;
|
||||
interp->Prev = NULL;
|
||||
interp->Prev = nullptr;
|
||||
Head = interp;
|
||||
count++;
|
||||
}
|
||||
|
@ -239,15 +239,15 @@ void FInterpolator::RemoveInterpolation(DInterpolation *interp)
|
|||
if (Head == interp)
|
||||
{
|
||||
Head = interp->Next;
|
||||
if (Head != NULL) Head->Prev = NULL;
|
||||
if (Head != nullptr) Head->Prev = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (interp->Prev != NULL) interp->Prev->Next = interp->Next;
|
||||
if (interp->Next != NULL) interp->Next->Prev = interp->Prev;
|
||||
}
|
||||
interp->Next = NULL;
|
||||
interp->Prev = NULL;
|
||||
interp->Next = nullptr;
|
||||
interp->Prev = nullptr;
|
||||
count--;
|
||||
}
|
||||
|
||||
|
@ -303,11 +303,11 @@ void FInterpolator::RestoreInterpolations()
|
|||
void FInterpolator::ClearInterpolations()
|
||||
{
|
||||
DInterpolation *probe = Head;
|
||||
Head = NULL;
|
||||
while (probe != NULL)
|
||||
Head = nullptr;
|
||||
while (probe != nullptr)
|
||||
{
|
||||
DInterpolation *next = probe->Next;
|
||||
probe->Next = probe->Prev = NULL;
|
||||
probe->Next = probe->Prev = nullptr;
|
||||
probe->Destroy();
|
||||
probe = next;
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ void FInterpolator::ClearInterpolations()
|
|||
|
||||
DInterpolation::DInterpolation()
|
||||
{
|
||||
Next = NULL;
|
||||
Prev = NULL;
|
||||
Next = nullptr;
|
||||
Prev = nullptr;
|
||||
refcount = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ IMPLEMENT_POINTERS_END
|
|||
DSeqNode::DSeqNode ()
|
||||
: m_SequenceChoices(0)
|
||||
{
|
||||
m_Next = m_Prev = m_ChildSeqNode = m_ParentSeqNode = NULL;
|
||||
m_Next = m_Prev = m_ChildSeqNode = m_ParentSeqNode = nullptr;
|
||||
}
|
||||
|
||||
void DSeqNode::Serialize(FSerializer &arc)
|
||||
|
@ -397,8 +397,8 @@ void DSeqNode::OnDestroy()
|
|||
if (m_ParentSeqNode != NULL && m_ParentSeqNode->m_ChildSeqNode == this)
|
||||
{
|
||||
m_ParentSeqNode->m_SequencePtr++;
|
||||
m_ParentSeqNode->m_ChildSeqNode = NULL;
|
||||
m_ParentSeqNode = NULL;
|
||||
m_ParentSeqNode->m_ChildSeqNode = nullptr;
|
||||
m_ParentSeqNode = nullptr;
|
||||
}
|
||||
if (SequenceListHead == this)
|
||||
{
|
||||
|
@ -823,7 +823,7 @@ DSeqNode::DSeqNode (int sequence, int modenum)
|
|||
m_Prev = NULL;
|
||||
}
|
||||
GC::WriteBarrier(this);
|
||||
m_ParentSeqNode = m_ChildSeqNode = NULL;
|
||||
m_ParentSeqNode = m_ChildSeqNode = nullptr;
|
||||
}
|
||||
|
||||
void DSeqNode::ActivateSequence (int sequence)
|
||||
|
|
Loading…
Reference in a new issue