mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- Fixed typo in r3795's change to GetActorZ and a potential null pointer dereference.
SVN r3796 (trunk)
This commit is contained in:
parent
9c0b0dc774
commit
0aee56be15
1 changed files with 10 additions and 3 deletions
|
@ -6345,10 +6345,17 @@ scriptwait:
|
||||||
case PCD_GETACTORZ:
|
case PCD_GETACTORZ:
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID(STACK(1), activator);
|
AActor *actor = SingleActorFromTID(STACK(1), activator);
|
||||||
STACK(1) = actor == NULL ? 0 : (&actor->x)[pcd - PCD_GETACTORX];
|
if (actor == NULL)
|
||||||
if (pcd == PCD_GETACTORZ)
|
|
||||||
{
|
{
|
||||||
pcd += actor->GetBobOffset();
|
STACK(1) = 0;
|
||||||
|
}
|
||||||
|
else if (pcd == PCD_GETACTORZ)
|
||||||
|
{
|
||||||
|
STACK(1) = actor->z + actor->GetBobOffset();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue