diff --git a/language.version b/language.version index 634a2c7bb..6b641a33f 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r98 \cu(Tue 7 Jun 13:33:10 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r98 \cu(2022-06-07 13:33:10)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r99 \cu(Tue 7 Jun 13:42:13 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r99 \cu(2022-06-07 13:42:13)\c-"; diff --git a/zscript/items/swwm_armor.zsc b/zscript/items/swwm_armor.zsc index 7d2b13571..dcb32a592 100644 --- a/zscript/items/swwm_armor.zsc +++ b/zscript/items/swwm_armor.zsc @@ -27,7 +27,7 @@ Class ArmorNuggetItem : SWWMSpareArmor // sell excess if ( !bUsed ) { - int sellprice = int(abs(Stamina)*.5); + int sellprice = abs(Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/items/swwm_baseitem.zsc b/zscript/items/swwm_baseitem.zsc index fb281e49c..473672a95 100644 --- a/zscript/items/swwm_baseitem.zsc +++ b/zscript/items/swwm_baseitem.zsc @@ -15,7 +15,7 @@ Mixin Class SWWMAutoUseFix // sell excess if there's a price if ( !deathmatch && bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) ) { - int sellprice = int(abs(Stamina)*.5); + int sellprice = abs(Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/items/swwm_health.zsc b/zscript/items/swwm_health.zsc index e456f8b85..1fd6384c1 100644 --- a/zscript/items/swwm_health.zsc +++ b/zscript/items/swwm_health.zsc @@ -73,7 +73,7 @@ Class HealthNuggetItem : SWWMHealth // sell excess if ( !bUsed ) { - int sellprice = int(abs(Stamina)*.5); + int sellprice = abs(Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/items/swwm_powerups.zsc b/zscript/items/swwm_powerups.zsc index bda0b34cb..8044273dc 100644 --- a/zscript/items/swwm_powerups.zsc +++ b/zscript/items/swwm_powerups.zsc @@ -1896,7 +1896,7 @@ Class SWWMLamp : Inventory if ( (Charge >= Default.Charge) && (Amount+item.Amount > MaxAmount) ) { // sell excess - int sellprice = SWWMUtility.Round100(Stamina*.7); + int sellprice = SWWMUtility.Round100(abs(Stamina)*.7); SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/weapons/swwm_baseweapon.zsc b/zscript/weapons/swwm_baseweapon.zsc index f42354885..d5bdc9390 100644 --- a/zscript/weapons/swwm_baseweapon.zsc +++ b/zscript/weapons/swwm_baseweapon.zsc @@ -193,10 +193,10 @@ Class SWWMWeapon : Weapon abstract { // subtract price of ammo we don't give int ammonotgiven = default.AmmoGive1-AmmoGive1; - if ( ammonotgiven > 0 ) Stamina -= int(ownedWeapon.Ammo1.Stamina*(1.+.75*(ammonotgiven-1))); + if ( ammonotgiven > 0 ) Stamina -= int(abs(ownedWeapon.Ammo1.Stamina)*(1.+.75*(ammonotgiven-1))); // subtract price of given ammo int ammogiven = ownedWeapon.Ammo1.Amount-oldamount1; - if ( ammogiven > 0 ) Stamina -= int(ownedWeapon.Ammo1.Stamina*(1.+.75*(ammogiven-1))); + if ( ammogiven > 0 ) Stamina -= int(abs(ownedWeapon.Ammo1.Stamina)*(1.+.75*(ammogiven-1))); // drop excess int dropme = AmmoGive1-ammogiven; if ( dropme > 0 ) @@ -210,10 +210,10 @@ Class SWWMWeapon : Weapon abstract { // subtract price of ammo we don't give int ammonotgiven = default.AmmoGive2-AmmoGive2; - if ( ammonotgiven > 0 ) Stamina -= int(ownedWeapon.Ammo2.Stamina*(1.+.75*(ammonotgiven-1))); + if ( ammonotgiven > 0 ) Stamina -= int(abs(ownedWeapon.Ammo2.Stamina)*(1.+.75*(ammonotgiven-1))); // subtract price of given ammo int ammogiven = ownedWeapon.Ammo2.Amount-oldamount2; - if ( ammogiven > 0 ) Stamina -= int(ownedWeapon.Ammo2.Stamina*(1.+.75*(ammogiven-1))); + if ( ammogiven > 0 ) Stamina -= int(abs(ownedWeapon.Ammo2.Stamina)*(1.+.75*(ammogiven-1))); // drop excess int dropme = AmmoGive2-ammogiven; if ( dropme > 0 ) @@ -234,10 +234,10 @@ Class SWWMWeapon : Weapon abstract { if ( SWWMWeapon(item).PickupForAmmoSWWM(self) ) item.bPickupGood = true; - if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (item.Stamina > 0) ) + if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (item.Stamina != 0) ) { // sell excess - int sellprice = item.Stamina/2; + int sellprice = abs(item.Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/weapons/swwm_splode.zsc b/zscript/weapons/swwm_splode.zsc index 68576ed54..dda03eaea 100644 --- a/zscript/weapons/swwm_splode.zsc +++ b/zscript/weapons/swwm_splode.zsc @@ -40,10 +40,10 @@ Class ExplodiumGun : SWWMWeapon return true; if ( (item.GetClass() == 'ExplodiumGun') && !item.ShouldStay() ) { - if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (Stamina > 0) ) + if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (item.Stamina != 0) ) { // sell excess - int sellprice = int(Stamina*.5); + int sellprice = abs(item.Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player ) diff --git a/zscript/weapons/swwm_tastytreat.zsc b/zscript/weapons/swwm_tastytreat.zsc index 2c093939f..afd63ab3c 100644 --- a/zscript/weapons/swwm_tastytreat.zsc +++ b/zscript/weapons/swwm_tastytreat.zsc @@ -23,7 +23,7 @@ Class CandyGun : SWWMWeapon if ( !deathmatch && !spareget ) { // sell excess - int sellprice = item.Stamina/2; + int sellprice = abs(item.Stamina)/2; SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); SWWMCredits.Give(Owner.player,sellprice); if ( Owner.player )