mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- added a fixed version of Demolisher's GetActor** submission for returning the activator's info when the tid is 0.
SVN r2787 (trunk)
This commit is contained in:
parent
5dfc57336e
commit
106cf82f62
1 changed files with 59 additions and 25 deletions
|
@ -5834,15 +5834,22 @@ int DLevelScript::RunScript ()
|
|||
case PCD_GETACTORY:
|
||||
case PCD_GETACTORZ:
|
||||
{
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
if(STACK(1) == 0)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
STACK(1) = (&activator->x)[pcd - PCD_GETACTORX];
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -5850,50 +5857,77 @@ int DLevelScript::RunScript ()
|
|||
case PCD_GETACTORFLOORZ:
|
||||
case PCD_GETACTORCEILINGZ:
|
||||
{
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
if(STACK(1) == 0)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
}
|
||||
else if (pcd == PCD_GETACTORFLOORZ)
|
||||
{
|
||||
STACK(1) = actor->floorz;
|
||||
if (pcd == PCD_GETACTORFLOORZ)
|
||||
{
|
||||
STACK(1) = activator->floorz;
|
||||
}
|
||||
else if(STACK(1) == 0)
|
||||
{
|
||||
STACK(1) = activator->ceilingz;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->ceilingz;
|
||||
}
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
}
|
||||
else if (pcd == PCD_GETACTORFLOORZ)
|
||||
{
|
||||
STACK(1) = actor->floorz;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->ceilingz;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_GETACTORANGLE:
|
||||
{
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
if(STACK(1) == 0)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
STACK(1) = activator->angle >> 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->angle >> 16;
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->angle >> 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case PCD_GETACTORPITCH:
|
||||
{
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
if(STACK(1) == 0)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
STACK(1) = activator->pitch >> 16;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->pitch >> 16;
|
||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||
|
||||
if (actor == NULL)
|
||||
{
|
||||
STACK(1) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
STACK(1) = actor->pitch >> 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue