diff --git a/zscript/biorifle.zsc b/zscript/biorifle.zsc index 919c7f3..4952d90 100644 --- a/zscript/biorifle.zsc +++ b/zscript/biorifle.zsc @@ -17,7 +17,7 @@ Class Tier3Weapon : RandomSpawner2 replaces Shotgun } Class Tier3Weapon2 : Tier3Weapon replaces SuperShotgun {} -Class BioAmmo : UTAmmo +Class BioAmmo : Ammo { Default { @@ -28,7 +28,6 @@ Class BioAmmo : UTAmmo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 100; Ammo.DropAmount 25; - UTAmmo.UsedInSlot AMMO_SLOT3; } States { diff --git a/zscript/eightball.zsc b/zscript/eightball.zsc index a7f508f..8ebdbf2 100644 --- a/zscript/eightball.zsc +++ b/zscript/eightball.zsc @@ -1,4 +1,4 @@ -Class UTRocketAmmo : UTAmmo +Class UTRocketAmmo : Ammo { Default { @@ -9,7 +9,6 @@ Class UTRocketAmmo : UTAmmo Ammo.BackpackAmount 12; Ammo.BackpackMaxAmount 48; Ammo.DropAmount 12; - UTAmmo.UsedInSlot AMMO_SLOT9; } States { diff --git a/zscript/flakcannon.zsc b/zscript/flakcannon.zsc index 9739279..cd8c6fc 100644 --- a/zscript/flakcannon.zsc +++ b/zscript/flakcannon.zsc @@ -24,7 +24,7 @@ Class Tier5Weapon : RandomSpawner2 replaces RocketLauncher } } -Class FlakAmmo : UTAmmo +Class FlakAmmo : Ammo { Default { @@ -35,7 +35,6 @@ Class FlakAmmo : UTAmmo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 10; - UTAmmo.UsedInSlot AMMO_SLOT8; } States { diff --git a/zscript/minigun.zsc b/zscript/minigun.zsc index cf43603..d956e45 100644 --- a/zscript/minigun.zsc +++ b/zscript/minigun.zsc @@ -24,7 +24,7 @@ Class Tier6Weapon : RandomSpawner2 replaces PlasmaRifle } } -Class MiniAmmo : UTAmmo +Class MiniAmmo : Ammo { Default { @@ -35,7 +35,6 @@ Class MiniAmmo : UTAmmo Ammo.BackpackAmount 100; Ammo.BackpackMaxAmount 199; Ammo.DropAmount 50; - UTAmmo.UsedInSlot AMMO_SLOT2|AMMO_SLOT7; } States { diff --git a/zscript/powerups.zsc b/zscript/powerups.zsc index c44737d..489a268 100644 --- a/zscript/powerups.zsc +++ b/zscript/powerups.zsc @@ -101,7 +101,7 @@ Class DamageAmplifier : Powerup } } -// Backpack that handles UT ammo types +// Backpack that only gives ammo for valid weapons Class UTBackpack : BackpackItem replaces Backpack { override Inventory CreateCopy( Actor other ) @@ -111,7 +111,7 @@ Class UTBackpack : BackpackItem replaces Backpack for ( int i=0; i)(AllActorClasses[i]); - if ( !type || ((type.GetParentClass() != 'Ammo') && (type.GetParentClass() != 'UTAmmo')) ) continue; + if ( !type || (type.GetParentClass() != 'Ammo') ) continue; // check that it's for a valid weapon bool isvalid = false; for ( int j=0; j= probe.MaxAmount && !sv_unlimited_pickup ) continue; int amount = Ammo(probe).Default.BackpackAmount; // extra ammo in baby mode and nightmare mode diff --git a/zscript/pulsegun.zsc b/zscript/pulsegun.zsc index c84b8ba..d0d9fb2 100644 --- a/zscript/pulsegun.zsc +++ b/zscript/pulsegun.zsc @@ -16,7 +16,7 @@ Class Tier4Weapon : RandomSpawner2 replaces Chaingun } } -Class PulseAmmo : UTAmmo +Class PulseAmmo : Ammo { Default { @@ -27,7 +27,6 @@ Class PulseAmmo : UTAmmo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 199; Ammo.DropAmount 25; - UTAmmo.UsedInSlot AMMO_SLOT5; } States { diff --git a/zscript/ripper.zsc b/zscript/ripper.zsc index 9cd99fc..ccd9e65 100644 --- a/zscript/ripper.zsc +++ b/zscript/ripper.zsc @@ -1,4 +1,4 @@ -Class RipperAmmo : UTAmmo +Class RipperAmmo : Ammo { Default { @@ -9,7 +9,6 @@ Class RipperAmmo : UTAmmo Ammo.BackpackAmount 50; Ammo.BackpackMaxAmount 75; Ammo.DropAmount 25; - UTAmmo.UsedInSlot AMMO_SLOT6; } States { diff --git a/zscript/shockrifle.zsc b/zscript/shockrifle.zsc index c24304f..f16e4ac 100644 --- a/zscript/shockrifle.zsc +++ b/zscript/shockrifle.zsc @@ -1,4 +1,4 @@ -Class ShockAmmo : UTAmmo +Class ShockAmmo : Ammo { Default { @@ -9,7 +9,6 @@ Class ShockAmmo : UTAmmo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 10; - UTAmmo.UsedInSlot AMMO_SLOT4; } States { @@ -869,7 +868,7 @@ Class ShockRifle : UTWeapon } } -Class EnhancedShockAmmo : UTAmmo +Class EnhancedShockAmmo : Ammo { Default { @@ -880,7 +879,6 @@ Class EnhancedShockAmmo : UTAmmo Ammo.BackpackAmount 0; Ammo.BackpackMaxAmount 25; Ammo.DropAmount 5; - UTAmmo.UsedInSlot AMMO_SLOT4; } States { diff --git a/zscript/sniperrifle.zsc b/zscript/sniperrifle.zsc index 05dbfbf..e7532c5 100644 --- a/zscript/sniperrifle.zsc +++ b/zscript/sniperrifle.zsc @@ -1,4 +1,4 @@ -Class RifleAmmo : UTAmmo +Class RifleAmmo : Ammo { Default { @@ -9,7 +9,6 @@ Class RifleAmmo : UTAmmo Ammo.BackpackAmount 20; Ammo.BackpackMaxAmount 50; Ammo.DropAmount 10; - UTAmmo.UsedInSlot AMMO_SLOT10; } States { diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index f121ee1..2b8842a 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -7,7 +7,7 @@ Class UTPlayer : DoomPlayer Player.StartItem "Enforcer"; } - // Have to modify the give cheat to recognize UT ammo and handle UT armor + // Have to modify the give cheat to handle UT armor override void CheatGive( String name, int amount ) { if ( PlayerNumber() != consoleplayer ) @@ -39,7 +39,7 @@ Class UTPlayer : DoomPlayer for ( int i=0; i)(AllActorClasses[i]); - if ( !type || ((type.GetParentClass() != "Ammo") && (type.GetParentClass() != "UTAmmo")) ) + if ( !type || (type.GetParentClass() != "Ammo") ) continue; // Only give if it's for a valid weapon, unless using "give everything" bool isvalid = false; @@ -158,32 +158,6 @@ Class UTPlayer : DoomPlayer } } -enum EAmmoSlot -{ - AMMO_SLOT10 = 1, - AMMO_SLOT1 = 2, - AMMO_SLOT2 = 4, - AMMO_SLOT3 = 8, - AMMO_SLOT4 = 16, - AMMO_SLOT5 = 32, - AMMO_SLOT6 = 64, - AMMO_SLOT7 = 128, - AMMO_SLOT8 = 256, - AMMO_SLOT9 = 512, -}; - -Class UTAmmo : Ammo -{ - int usedinslot; // bitfield indicating which weapon slots use this ammo - - Property UsedInSlot : usedinslot; - - Default - { - UTAmmo.UsedInSlot 0; - } -} - // Random Spawner that passes through dropped status to items Class RandomSpawner2 : RandomSpawner { diff --git a/zscript/warheadlauncher.zsc b/zscript/warheadlauncher.zsc index b6c30a7..b08866a 100644 --- a/zscript/warheadlauncher.zsc +++ b/zscript/warheadlauncher.zsc @@ -1,5 +1,5 @@ // shouldn't be placed in the world (it wasn't in UT99) -Class WarheadAmmo : UTAmmo +Class WarheadAmmo : Ammo { Default { @@ -11,7 +11,6 @@ Class WarheadAmmo : UTAmmo Ammo.BackpackMaxAmount 2; Ammo.DropAmount 1; Inventory.RespawnTics 2100; - UTAmmo.UsedInSlot AMMO_SLOT10; } States {