mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- added some NULL pointer checks to the kill CCMD and APlayerPawn::PostBeginPlay.
SVN r2697 (trunk)
This commit is contained in:
parent
3dbf807345
commit
e9211aaad3
2 changed files with 7 additions and 3 deletions
|
@ -2368,7 +2368,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
int killcount = 0;
|
||||
const PClass *cls = PClass::FindClass(classname);
|
||||
|
||||
if (classname != NULL)
|
||||
if (cls != NULL && cls->ActorInfo != NULL)
|
||||
{
|
||||
killcount = KillAll(cls);
|
||||
const PClass *cls_rep = cls->GetReplacement();
|
||||
|
@ -2376,9 +2376,13 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
{
|
||||
killcount += KillAll(cls_rep);
|
||||
}
|
||||
Printf ("Killed %d monsters of type %s.\n",killcount, classname);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("%s is not an actor class.\n", classname);
|
||||
}
|
||||
|
||||
Printf ("Killed %d monsters of type %s.\n",killcount, classname);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -505,7 +505,7 @@ void APlayerPawn::PostBeginPlay()
|
|||
SetupWeaponSlots();
|
||||
|
||||
// Voodoo dolls: restore original floorz/ceilingz logic
|
||||
if (player->mo != this)
|
||||
if (player == NULL || player->mo != this)
|
||||
{
|
||||
dropoffz = floorz = Sector->floorplane.ZatPoint(x, y);
|
||||
ceilingz = Sector->ceilingplane.ZatPoint(x, y);
|
||||
|
|
Loading…
Reference in a new issue