mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- fixed: The special called by the InterpolationSpecial actor must have no activator.
This required splitting A_CallSpecial into a direct wrapper around P_ExecuteSpecial and implementing itself as a script function calling ExecuteSpecial so that this special case can use a version of the function that can be used without an activator.
This commit is contained in:
parent
b3d7980b90
commit
4df2a221a8
5 changed files with 31 additions and 22 deletions
|
@ -1410,26 +1410,6 @@ DEFINE_ACTION_FUNCTION(AActor, A_RadiusDamageSelf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Execute a line special / script
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_CallSpecial)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
PARAM_INT (special);
|
||||
PARAM_INT_DEF (arg1);
|
||||
PARAM_INT_DEF (arg2);
|
||||
PARAM_INT_DEF (arg3);
|
||||
PARAM_INT_DEF (arg4);
|
||||
PARAM_INT_DEF (arg5);
|
||||
|
||||
bool res = !!P_ExecuteSpecial(special, NULL, self, false, arg1, arg2, arg3, arg4, arg5);
|
||||
|
||||
ACTION_RETURN_BOOL(res);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// The ultimate code pointer: Fully customizable missiles!
|
||||
|
|
|
@ -3717,3 +3717,27 @@ int P_ExecuteSpecial(int num,
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Execute a line special / script
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_ACTION_FUNCTION(FLevelLocals, ExecuteSpecial)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(FLevelLocals);
|
||||
PARAM_INT(special);
|
||||
PARAM_OBJECT(activator, AActor);
|
||||
PARAM_POINTER(linedef, line_t);
|
||||
PARAM_BOOL(lineside);
|
||||
PARAM_INT_DEF(arg1);
|
||||
PARAM_INT_DEF(arg2);
|
||||
PARAM_INT_DEF(arg3);
|
||||
PARAM_INT_DEF(arg4);
|
||||
PARAM_INT_DEF(arg5);
|
||||
|
||||
bool res = !!P_ExecuteSpecial(special, linedef, activator, lineside, arg1, arg2, arg3, arg4, arg5);
|
||||
|
||||
ACTION_RETURN_BOOL(res);
|
||||
}
|
||||
|
||||
|
|
|
@ -737,7 +737,11 @@ class Actor : Thinker native
|
|||
native void A_VileChase();
|
||||
native void A_BossDeath();
|
||||
native void A_Detonate();
|
||||
native bool A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0);
|
||||
bool A_CallSpecial(int special, int arg1=0, int arg2=0, int arg3=0, int arg4=0, int arg5=0)
|
||||
{
|
||||
return Level.ExecuteSpecial(special, self, null, false, arg1, arg2, arg3, arg4, arg5);
|
||||
}
|
||||
|
||||
|
||||
native void A_ActiveSound();
|
||||
|
||||
|
|
|
@ -469,6 +469,7 @@ struct LevelLocals native
|
|||
native String GetUDMFString(int type, int index, Name key);
|
||||
native int GetUDMFInt(int type, int index, Name key);
|
||||
native double GetUDMFFloat(int type, int index, Name key);
|
||||
native bool ExecuteSpecial(int special, Actor activator, line linedef, bool lineside, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0, int arg5 = 0);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ class PathFollower : Actor
|
|||
|
||||
while ( (spec = InterpolationSpecial(iterator.Next ())) )
|
||||
{
|
||||
A_CallSpecial(spec.special, spec.args[0], spec.args[1], spec.args[2], spec.args[3], spec.args[4]);
|
||||
Level.ExecuteSpecial(spec.special, null, null, false, spec.args[0], spec.args[1], spec.args[2], spec.args[3], spec.args[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue