- Added PinkSilver's SetActorVelocity code submission (with optimizations.)
SVN r1799 (trunk)
This commit is contained in:
parent
e8d1416d81
commit
93f6f1d701
4 changed files with 41 additions and 0 deletions
|
|
@ -2873,6 +2873,7 @@ enum EACSFunctions
|
|||
ACSF_SpawnSpotForced,
|
||||
ACSF_SpawnSpotFacingForced,
|
||||
ACSF_CheckActorProperty,
|
||||
ACSF_SetActorVelocity,
|
||||
};
|
||||
|
||||
int DLevelScript::SideFromID(int id, int side)
|
||||
|
|
@ -3054,6 +3055,22 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
|||
|
||||
case ACSF_CheckActorProperty:
|
||||
return (CheckActorProperty(args[0], args[1], args[2]));
|
||||
|
||||
case ACSF_SetActorVelocity:
|
||||
if (args[0] == 0)
|
||||
{
|
||||
P_Thing_SetVelocity(activator, args[1], args[2], args[3], !!args[4]);
|
||||
}
|
||||
else
|
||||
{
|
||||
TActorIterator<AActor> iterator (args[0]);
|
||||
|
||||
while ( (actor = iterator.Next ()) )
|
||||
{
|
||||
P_Thing_SetVelocity(actor, args[1], args[2], args[3], !!args[4]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue