From 8d4e6f82df6eeb1c4aa6974550df64384bf95258 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 6 Aug 2020 23:52:50 +0200 Subject: [PATCH] Goddamn Sabreclaws and their stupid ammo drops. --- language.version | 2 +- zscript/swwm_ammo.zsc | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/language.version b/language.version index b258d72c4..2c068961b 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\chSWWM \cwGZ\c- r458 (Thu 6 Aug 23:34:48 CEST 2020)"; +SWWM_MODVER="\chSWWM \cwGZ\c- r459 (Thu 6 Aug 23:52:50 CEST 2020)"; diff --git a/zscript/swwm_ammo.zsc b/zscript/swwm_ammo.zsc index 12400305e..f62283379 100644 --- a/zscript/swwm_ammo.zsc +++ b/zscript/swwm_ammo.zsc @@ -253,11 +253,11 @@ Class MagAmmo : Inventory abstract while ( amt > 0 ) { // drop full mag if possible - if ( amt >= pammo.Amount ) + if ( amt >= ClipSize ) { last = DoDrop(ParentAmmo); - amt -= pammo.Amount; - Amount -= pammo.Amount; + amt -= ClipSize; + Amount -= ClipSize; continue; } // drop individual bullets @@ -904,11 +904,6 @@ Class SilverBulletAmmo : Ammo +FLOATBOB; FloatBobStrength 0.25; } - override void ModifyDropAmount( int dropamount ) - { - Super.ModifyDropAmount(dropamount); - Amount = min(Amount,1); - } States { Spawn: @@ -934,11 +929,6 @@ Class SilverBulletAmmo2 : Ammo +FLOATBOB; FloatBobStrength 0.25; } - override void ModifyDropAmount( int dropamount ) - { - Super.ModifyDropAmount(dropamount); - Amount = min(Amount,1); - } States { Spawn: @@ -963,6 +953,11 @@ Class SilverBullets : MagAmmo +FLOATBOB; FloatBobStrength 0.25; } + override void ModifyDropAmount( int dropamount ) + { + Super.ModifyDropAmount(dropamount); + Amount = min(Random[ShellDrop](1,MaxAmount),Amount); + } States { Spawn: @@ -986,6 +981,11 @@ Class SilverBullets2 : MagAmmo +FLOATBOB; FloatBobStrength 0.25; } + override void ModifyDropAmount( int dropamount ) + { + Super.ModifyDropAmount(dropamount); + Amount = min(Random[ShellDrop](1,MaxAmount),Amount); + } States { Spawn: @@ -1039,6 +1039,11 @@ Class CandyGunBullets : MagAmmo +FLOATBOB; FloatBobStrength 0.25; } + override void ModifyDropAmount( int dropamount ) + { + Super.ModifyDropAmount(dropamount); + Amount = min(Random[ShellDrop](1,MaxAmount),Amount); + } States { Spawn: