mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
- added NULL pointer checks to SpecialDropAction methods that call CheckLocalView.
This commit is contained in:
parent
6949afc334
commit
aff8b00575
1 changed files with 12 additions and 6 deletions
|
@ -188,10 +188,13 @@ bool ARaiseAlarm::TryPickup (AActor *&toucher)
|
|||
|
||||
bool ARaiseAlarm::SpecialDropAction (AActor *dropper)
|
||||
{
|
||||
P_NoiseAlert (dropper->target, dropper->target);
|
||||
if (dropper->target->CheckLocalView (consoleplayer))
|
||||
if (dropper->target != nullptr)
|
||||
{
|
||||
Printf ("You Fool! You've set off the alarm.\n");
|
||||
P_NoiseAlert(dropper->target, dropper->target);
|
||||
if (dropper->target->CheckLocalView(consoleplayer))
|
||||
{
|
||||
Printf("You Fool! You've set off the alarm.\n");
|
||||
}
|
||||
}
|
||||
Destroy ();
|
||||
return true;
|
||||
|
@ -237,11 +240,14 @@ bool ACloseDoor222::TryPickup (AActor *&toucher)
|
|||
bool ACloseDoor222::SpecialDropAction (AActor *dropper)
|
||||
{
|
||||
EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2., 0, 0, 0);
|
||||
if (dropper->target->CheckLocalView (consoleplayer))
|
||||
if (dropper->target != nullptr)
|
||||
{
|
||||
Printf ("You're dead! You set off the alarm.\n");
|
||||
if (dropper->target->CheckLocalView(consoleplayer))
|
||||
{
|
||||
Printf("You're dead! You set off the alarm.\n");
|
||||
}
|
||||
P_NoiseAlert(dropper->target, dropper->target);
|
||||
}
|
||||
P_NoiseAlert (dropper->target, dropper->target);
|
||||
Destroy ();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue