mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +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
|
@ -5833,6 +5833,12 @@ int DLevelScript::RunScript ()
|
||||||
case PCD_GETACTORX:
|
case PCD_GETACTORX:
|
||||||
case PCD_GETACTORY:
|
case PCD_GETACTORY:
|
||||||
case PCD_GETACTORZ:
|
case PCD_GETACTORZ:
|
||||||
|
{
|
||||||
|
if(STACK(1) == 0)
|
||||||
|
{
|
||||||
|
STACK(1) = (&activator->x)[pcd - PCD_GETACTORX];
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||||
|
|
||||||
|
@ -5845,10 +5851,24 @@ int DLevelScript::RunScript ()
|
||||||
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
|
STACK(1) = (&actor->x)[pcd - PCD_GETACTORX];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_GETACTORFLOORZ:
|
case PCD_GETACTORFLOORZ:
|
||||||
case PCD_GETACTORCEILINGZ:
|
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);
|
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||||
|
|
||||||
|
@ -5864,11 +5884,17 @@ int DLevelScript::RunScript ()
|
||||||
{
|
{
|
||||||
STACK(1) = actor->ceilingz;
|
STACK(1) = actor->ceilingz;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_GETACTORANGLE:
|
case PCD_GETACTORANGLE:
|
||||||
|
{
|
||||||
|
if(STACK(1) == 0)
|
||||||
|
{
|
||||||
|
STACK(1) = activator->angle >> 16;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||||
|
|
||||||
|
@ -5881,9 +5907,16 @@ int DLevelScript::RunScript ()
|
||||||
STACK(1) = actor->angle >> 16;
|
STACK(1) = actor->angle >> 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_GETACTORPITCH:
|
case PCD_GETACTORPITCH:
|
||||||
|
{
|
||||||
|
if(STACK(1) == 0)
|
||||||
|
{
|
||||||
|
STACK(1) = activator->pitch >> 16;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
AActor *actor = SingleActorFromTID (STACK(1), activator);
|
||||||
|
|
||||||
|
@ -5896,6 +5929,7 @@ int DLevelScript::RunScript ()
|
||||||
STACK(1) = actor->pitch >> 16;
|
STACK(1) = actor->pitch >> 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCD_GETLINEROWOFFSET:
|
case PCD_GETLINEROWOFFSET:
|
||||||
|
|
Loading…
Reference in a new issue