mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- Added ACS function LineAttack via Ryan Cordell.
SVN r4304 (trunk)
This commit is contained in:
parent
53b284fb5d
commit
2191b4bfa6
1 changed files with 28 additions and 0 deletions
|
@ -4112,6 +4112,7 @@ enum EACSFunctions
|
||||||
ACSF_SetCVarString,
|
ACSF_SetCVarString,
|
||||||
ACSF_GetUserCVarString,
|
ACSF_GetUserCVarString,
|
||||||
ACSF_SetUserCVarString,
|
ACSF_SetUserCVarString,
|
||||||
|
ACSF_LineAttack,
|
||||||
|
|
||||||
// ZDaemon
|
// ZDaemon
|
||||||
ACSF_GetTeamScore = 19620, // (int team)
|
ACSF_GetTeamScore = 19620, // (int team)
|
||||||
|
@ -4853,6 +4854,33 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
//[RC] A bullet firing function for ACS. Thanks to DavidPH.
|
||||||
|
case ACSF_LineAttack:
|
||||||
|
{
|
||||||
|
fixed_t angle = args[1] << FRACBITS;
|
||||||
|
fixed_t pitch = args[2] << FRACBITS;
|
||||||
|
int damage = args[3];
|
||||||
|
FName pufftype = argCount > 4 && args[4]? FName(FBehavior::StaticLookupString(args[4])) : NAME_BulletPuff;
|
||||||
|
FName damagetype = argCount > 5 && args[5]? FName(FBehavior::StaticLookupString(args[5])) : NAME_None;
|
||||||
|
fixed_t range = argCount > 6 && args[6]? args[6] : 0x7FFFFFFF;
|
||||||
|
|
||||||
|
if (args[0] == 0)
|
||||||
|
{
|
||||||
|
P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AActor *source;
|
||||||
|
FActorIterator it(args[0]);
|
||||||
|
|
||||||
|
while ((source = it.Next()) != NULL)
|
||||||
|
{
|
||||||
|
P_LineAttack(activator, angle, range, pitch, damage, damagetype, pufftype);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue