- 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:
Christoph Oelckers 2010-09-15 21:41:49 +00:00
parent 5dfc57336e
commit 106cf82f62

View file

@ -5833,6 +5833,12 @@ int DLevelScript::RunScript ()
case PCD_GETACTORX:
case PCD_GETACTORY:
case PCD_GETACTORZ:
{
if(STACK(1) == 0)
{
STACK(1) = (&activator->x)[pcd - PCD_GETACTORX];
}
else
{
AActor *actor = SingleActorFromTID (STACK(1), activator);
@ -5845,10 +5851,24 @@ int DLevelScript::RunScript ()
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
}
}
}
break;
case PCD_GETACTORFLOORZ:
case PCD_GETACTORCEILINGZ:
{
if(STACK(1) == 0)
{
if (pcd == PCD_GETACTORFLOORZ)
{
STACK(1) = activator->floorz;
}
else if(STACK(1) == 0)
{
STACK(1) = activator->ceilingz;
}
}
else
{
AActor *actor = SingleActorFromTID (STACK(1), activator);
@ -5864,11 +5884,17 @@ int DLevelScript::RunScript ()
{
STACK(1) = actor->ceilingz;
}
}
}
break;
case PCD_GETACTORANGLE:
{
if(STACK(1) == 0)
{
STACK(1) = activator->angle >> 16;
}
else
{
AActor *actor = SingleActorFromTID (STACK(1), activator);
@ -5881,9 +5907,16 @@ int DLevelScript::RunScript ()
STACK(1) = actor->angle >> 16;
}
}
}
break;
case PCD_GETACTORPITCH:
{
if(STACK(1) == 0)
{
STACK(1) = activator->pitch >> 16;
}
else
{
AActor *actor = SingleActorFromTID (STACK(1), activator);
@ -5896,6 +5929,7 @@ int DLevelScript::RunScript ()
STACK(1) = actor->pitch >> 16;
}
}
}
break;
case PCD_GETLINEROWOFFSET: