mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- added new ACS function SetSectorDamage which allows the use of actual damage types, unlike the old Sector_SetDamage. Unlike Sector_SetDamage this function does not use damage amount dependent defaults for the interval and the leakiness if none are passed.
This commit is contained in:
parent
2b519a92b1
commit
d0c372692b
2 changed files with 18 additions and 1 deletions
|
@ -4458,6 +4458,7 @@ enum EACSFunctions
|
|||
ACSF_QuakeEx,
|
||||
ACSF_Warp, // 92
|
||||
ACSF_GetMaxInventory,
|
||||
ACSF_SetSectorDamage,
|
||||
|
||||
/* Zandronum's - these must be skipped when we reach 99!
|
||||
-100:ResetMap(0),
|
||||
|
@ -5950,6 +5951,23 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
|
|||
}
|
||||
break;
|
||||
|
||||
case ACSF_SetSectorDamage:
|
||||
if (argCount >= 2)
|
||||
{
|
||||
FSectorTagIterator it(args[0]);
|
||||
int s;
|
||||
while ((s = it.Next()) >= 0)
|
||||
{
|
||||
sector_t *sec = §ors[s];
|
||||
|
||||
sec->damageamount = args[1];
|
||||
sec->damagetype = argCount >= 3 ? FName(FBehavior::StaticLookupString(args[2])) : FName(NAME_None);
|
||||
sec->damageinterval = argCount >= 4 ? clamp(args[3], 1, INT_MAX) : 32;
|
||||
sec->leakydamage = argCount >= 5 ? args[4] : 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1300,7 +1300,6 @@ public:
|
|||
sec->heightsec = NULL; // sector used to get floor and ceiling height
|
||||
sec->sectornum = index;
|
||||
sec->damageinterval = 32;
|
||||
sec->leakydamage = 5;
|
||||
if (floordrop) sec->Flags = SECF_FLOORDROP;
|
||||
// killough 3/7/98: end changes
|
||||
|
||||
|
|
Loading…
Reference in a new issue