mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- If SetActivatorToTarget is used for a player-run script, and the player is
alive, it now sets the activator to the actor the player is aiming at. I also noticed that this looked like it was a quick copy'n'paste job from SetActivator. It returns false if the activator at the end of the function was the world, but it never sets the activator to the world. I'm not sure that's the best use of the return value. SVN r1760 (trunk)
This commit is contained in:
parent
8e1ce082f4
commit
d4c8c47796
2 changed files with 23 additions and 3 deletions
|
@ -1,4 +1,10 @@
|
|||
August 7, 2009
|
||||
- If SetActivatorToTarget is used for a player-run script, and the player is
|
||||
alive, it now sets the activator to the actor the player is aiming at. I
|
||||
also noticed that this looked like it was a quick copy'n'paste job from
|
||||
SetActivator. It returns false if the activator at the end of the function
|
||||
was the world, but it never sets the activator to the world. I'm not sure
|
||||
that's the best use of the return value.
|
||||
- Added support for per-SpawnShot spawn lists. (Also fixed a potential
|
||||
infinite loop, though I'm not sure the parser allowed this condition to
|
||||
happen.)
|
||||
|
|
|
@ -2935,9 +2935,23 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
|||
return activator != NULL;
|
||||
|
||||
case ACSF_SetActivatorToTarget:
|
||||
actor = SingleActorFromTID(args[0], NULL);
|
||||
if (actor != NULL) actor = actor->target;
|
||||
if (actor != NULL) activator = actor;
|
||||
// [KS] I revised this a little bit
|
||||
actor = SingleActorFromTID(args[0], activator);
|
||||
if (actor != NULL)
|
||||
{
|
||||
if (actor->player != NULL && actor->player->playerstate == PST_LIVE)
|
||||
{
|
||||
P_BulletSlope(actor, &actor);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor = actor->target;
|
||||
}
|
||||
}
|
||||
if (actor != NULL)
|
||||
{
|
||||
activator = actor;
|
||||
}
|
||||
return activator != NULL;
|
||||
|
||||
case ACSF_GetActorViewHeight:
|
||||
|
|
Loading…
Reference in a new issue