mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- Added Blue Shadow's DropInventory ACS function.
This commit is contained in:
parent
33f83cc7f9
commit
16a380f82a
1 changed files with 37 additions and 0 deletions
|
@ -4367,6 +4367,7 @@ enum EACSFunctions
|
||||||
ACSF_ChangeActorAngle,
|
ACSF_ChangeActorAngle,
|
||||||
ACSF_ChangeActorPitch, // 80
|
ACSF_ChangeActorPitch, // 80
|
||||||
ACSF_GetArmorInfo,
|
ACSF_GetArmorInfo,
|
||||||
|
ACSF_DropInventory,
|
||||||
|
|
||||||
/* Zandronum's - these must be skipped when we reach 99!
|
/* Zandronum's - these must be skipped when we reach 99!
|
||||||
-100:ResetMap(0),
|
-100:ResetMap(0),
|
||||||
|
@ -5491,6 +5492,42 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case ACSF_DropInventory:
|
||||||
|
{
|
||||||
|
const char *type = FBehavior::StaticLookupString(args[1]);
|
||||||
|
AInventory *inv;
|
||||||
|
|
||||||
|
if (type != NULL)
|
||||||
|
{
|
||||||
|
if (args[0] == 0)
|
||||||
|
{
|
||||||
|
if (activator != NULL)
|
||||||
|
{
|
||||||
|
inv = activator->FindInventory(type);
|
||||||
|
if (inv)
|
||||||
|
{
|
||||||
|
activator->DropInventory(inv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FActorIterator it(args[0]);
|
||||||
|
AActor *actor;
|
||||||
|
|
||||||
|
while ((actor = it.Next()) != NULL)
|
||||||
|
{
|
||||||
|
inv = actor->FindInventory(type);
|
||||||
|
if (inv)
|
||||||
|
{
|
||||||
|
actor->DropInventory(inv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case ACSF_CheckFlag:
|
case ACSF_CheckFlag:
|
||||||
{
|
{
|
||||||
AActor *actor = SingleActorFromTID(args[0], activator);
|
AActor *actor = SingleActorFromTID(args[0], activator);
|
||||||
|
|
Loading…
Reference in a new issue