mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
[Fix] A bunch of fixes for artillery strike
* Avoid using hard-coded Signal and HE mortar shell indices. This caused art.strikes malfunctioning in item mods. * Trim max nubers of waves to duration of signal smoke. Otherwise art.strike turns into unnatural stupidity. * If enemy AI tried to get art.strike but lacked of resources, player will not a warning anymore.
This commit is contained in:
@@ -16015,3 +16015,21 @@ bool HasScopeMagFactorForGun( UINT16 ausItemGun, FLOAT aFactor )
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
UINT16 GetLaunchableOfExplosionType(UINT16 launcher, UINT8 explosionType)
|
||||
{
|
||||
for (int i = 0; i < MAXITEMS; i++)
|
||||
{
|
||||
UINT16 launchable = Launchable[i][0];
|
||||
|
||||
if (launchable == 0) // if reached end of Launchable list, then stop
|
||||
break;
|
||||
|
||||
if (Launchable[i][1] == launcher)
|
||||
{
|
||||
if (Explosive[Item[launchable].ubClassIndex].ubType == explosionType)
|
||||
return launchable;
|
||||
}
|
||||
}
|
||||
return NOTHING;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user