Add "on-demand" option to only spawn ammo for available weapons.
Add dedicated "Ammo Spawner" class to simplify code. Small code duplication cleanup.
This commit is contained in:
parent
6a7210cbbf
commit
fb0e8c45f3
14 changed files with 349 additions and 276 deletions
|
|
@ -380,3 +380,25 @@ Mixin Class SWWMShellAmmo
|
|||
Amount = Random[ShellDrop](1,clamp(dropamount,1,4));
|
||||
}
|
||||
}
|
||||
|
||||
// Ref class for ammo spawners, used by both on-demand replacers and bundles
|
||||
Class SWWMAmmoSpawner : Actor abstract
|
||||
{
|
||||
virtual void SpawnAmmo() {}
|
||||
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
SpawnAmmo();
|
||||
ClearCounters();
|
||||
Destroy();
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
+NOGRAVITY;
|
||||
+NOBLOCKMAP;
|
||||
+NOINTERACTION;
|
||||
+NOTELEPORT;
|
||||
+DONTSPLASH;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue