diff --git a/language.version b/language.version index 78b8720bd..2c7736021 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r543 \cu(Wed 16 Jun 17:47:21 CEST 2021)\c-"; -SWWM_SHORTVER="\cw0.9.11b-pre r543 \cu(2021-06-16 17:47:21)\c-"; +SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r544 \cu(Wed 16 Jun 20:31:35 CEST 2021)\c-"; +SWWM_SHORTVER="\cw0.9.11b-pre r544 \cu(2021-06-16 20:31:35)\c-"; diff --git a/sndinfo.txt b/sndinfo.txt index c5bf050bb..6a60f40b3 100644 --- a/sndinfo.txt +++ b/sndinfo.txt @@ -936,6 +936,7 @@ misc/orbexplode sounds/ORBEXPLODE.ogg misc/omgfart sounds/omgfart.ogg misc/voice sounds/dlgvoice.ogg misc/sewercount sounds/sewercount.ogg +misc/frag sounds/GFRAG.ogg misc/gibber1 sounds/general/Gib1.ogg misc/gibber2 sounds/general/Gib2.ogg misc/gibber3 sounds/general/Gib3.ogg diff --git a/sounds/GFRAG.ogg b/sounds/GFRAG.ogg new file mode 100644 index 000000000..37a7e0122 Binary files /dev/null and b/sounds/GFRAG.ogg differ diff --git a/zscript/handler/swwm_handler_damage.zsc b/zscript/handler/swwm_handler_damage.zsc index 996eb48e2..cc1680081 100644 --- a/zscript/handler/swwm_handler_damage.zsc +++ b/zscript/handler/swwm_handler_damage.zsc @@ -209,7 +209,13 @@ extend Class SWWMHandler // scoring int score = min(1000,int(ceil(e.Thing.GetSpawnHealth()*.05)*10)); // player score is always the same - if ( e.Thing.player ) score = 1000; + if ( e.Thing.player ) + { + score = 1000; + // deathmatch frag sound + if ( src.player == players[consoleplayer] ) + S_StartSound("misc/frag",CHAN_WEAPON,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1.,ATTN_NONE); + } SWWMScoreObj scr = null; if ( src.player == players[consoleplayer] ) scr = SWWMScoreObj.Spawn(score,e.Thing.Vec3Offset(0,0,e.Thing.Height/2)); diff --git a/zscript/handler/swwm_handler_worldload.zsc b/zscript/handler/swwm_handler_worldload.zsc index 2e93f92b1..44e229ec1 100644 --- a/zscript/handler/swwm_handler_worldload.zsc +++ b/zscript/handler/swwm_handler_worldload.zsc @@ -214,6 +214,9 @@ extend Class SWWMHandler for ( int i=0; i MaxAmount) && (Stamina != 0) ) + if ( !deathmatch && bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) ) { int sellprice = int(abs(Stamina)*.5); SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2)); @@ -18,6 +24,16 @@ Mixin Class SWWMAutoUseFix } return Super.HandlePickup(item); } + override bool TryPickup( in out Actor toucher ) + { + if ( !deathmatch ) return Super.TryPickup(toucher); + // pretend to have a max amount of 0 so we can only be picked up if we can be used + int oldmax = MaxAmount; + MaxAmount = 0; + bool ret = Super.TryPickup(toucher); + MaxAmount = oldmax; + return ret; + } } Class CrossLineFinder : LineTracer diff --git a/zscript/items/swwm_powerups.zsc b/zscript/items/swwm_powerups.zsc index edbaafaf2..27cb670ac 100644 --- a/zscript/items/swwm_powerups.zsc +++ b/zscript/items/swwm_powerups.zsc @@ -1280,6 +1280,11 @@ Class Omnisight : Inventory } return false; } + override bool ShouldSpawn() + { + if ( deathmatch ) return false; + return Super.ShouldSpawn(); + } Default { //$Title Omnisight @@ -1913,6 +1918,11 @@ Class SWWMLamp : Inventory Amount++; return true; } + override bool ShouldSpawn() + { + if ( deathmatch ) return false; + return Super.ShouldSpawn(); + } override void DoEffect() { Super.DoEffect(); diff --git a/zscript/kbase/swwm_kbase.zsc b/zscript/kbase/swwm_kbase.zsc index 10b754761..768c00421 100644 --- a/zscript/kbase/swwm_kbase.zsc +++ b/zscript/kbase/swwm_kbase.zsc @@ -314,8 +314,11 @@ Class DemolitionistMenu : GenericMenu tabs.Push(TAB_MISSION); tabs.Push(TAB_STATS); tabs.Push(TAB_INVENTORY); - tabs.Push(TAB_KEYS); - tabs.Push(TAB_LIBRARY); + if ( !deathmatch ) + { + tabs.Push(TAB_KEYS); + tabs.Push(TAB_LIBRARY); + } if ( !deathmatch && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4) ) tabs.Push(TAB_STORE); for ( int i=0; i MaxAmount) && (item.Stamina > 0) ) + if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (item.Stamina > 0) ) { // sell excess int sellprice = item.Stamina/2; diff --git a/zscript/weapons/swwm_splode.zsc b/zscript/weapons/swwm_splode.zsc index 66da89bb4..092e41ba3 100644 --- a/zscript/weapons/swwm_splode.zsc +++ b/zscript/weapons/swwm_splode.zsc @@ -48,7 +48,7 @@ Class ExplodiumGun : SWWMWeapon return true; if ( (item.GetClass() == 'ExplodiumGun') && !item.ShouldStay() ) { - if ( (Amount+item.Amount > MaxAmount) && (Stamina > 0) ) + if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (Stamina > 0) ) { // sell excess int sellprice = int(Stamina*.5); diff --git a/zscript/weapons/swwm_tastytreat.zsc b/zscript/weapons/swwm_tastytreat.zsc index 118a7bbd0..44376ceeb 100644 --- a/zscript/weapons/swwm_tastytreat.zsc +++ b/zscript/weapons/swwm_tastytreat.zsc @@ -21,7 +21,7 @@ Class CandyGun : SWWMWeapon [ammoget, spareget] = CandyGun(item).PickupForAmmoAndSpares(self); if ( ammoget || spareget ) item.bPickupGood = true; - if ( !spareget ) + if ( !deathmatch && !spareget ) { // sell excess int sellprice = item.Stamina/2;