From 98fad4184b034afecc6b0a012dc109331dc3f08a Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sat, 23 May 2020 10:38:03 +0200 Subject: [PATCH] Add NoMergePickupMsg (requires coelckers/gzdoom#1089 to have any effect) Switch the spreading of overlapping items to simply copying the float bob phase, looks better that way. --- language.version | 2 +- zmapinfo.txt | 1 + zscript/swwm_common.zsc | 9 ++++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/language.version b/language.version index d18170686..a6986b796 100644 --- a/language.version +++ b/language.version @@ -1,2 +1,2 @@ [default] -SWWM_MODVER="\cxSWWM GZ\c- r261 (Fri 22 May 21:53:04 CEST 2020)"; +SWWM_MODVER="\cxSWWM GZ\c- r264 (Sat 23 May 10:38:03 CEST 2020)"; diff --git a/zmapinfo.txt b/zmapinfo.txt index 7db367d06..505e48ca5 100644 --- a/zmapinfo.txt +++ b/zmapinfo.txt @@ -16,6 +16,7 @@ GameInfo ChatSound = "misc/chat" IntermissionMusic = "music/DRAGONY.XM" DefaultConversationMenuClass = "SWWMConversationMenu" + NoMergePickupMsg = true // will cause a warning on 4.3.3, but it'll still run // precaching of frame-heavy objects PrecacheClasses = "Demolitionist", "DeepImpact", diff --git a/zscript/swwm_common.zsc b/zscript/swwm_common.zsc index ed137de8d..72c329238 100644 --- a/zscript/swwm_common.zsc +++ b/zscript/swwm_common.zsc @@ -2515,16 +2515,15 @@ Class SWWMHandler : EventHandler if ( hnd ) hnd.DoKeyTagFix(a); } - // spreads apart overlapping inventory items, since they'll look bad otherwise - private void CheckSpreadOut( Actor a ) + // copies the floatbob of overlapping identical items, so it doesn't look weird + private void CopyFloatBob( Actor a ) { let bt = BlockThingsIterator.Create(a,16); while ( bt.Next() ) { let t = bt.Thing; if ( !t || (t == a) || !(t is 'Inventory') || !(t.spawnpoint ~== a.spawnpoint) ) continue; - double ang = FRandom[Spreading](0,360); - a.vel += (cos(ang)*4,sin(ang)*4,3); + a.floatbobphase = t.floatbobphase; break; } } @@ -2532,7 +2531,7 @@ Class SWWMHandler : EventHandler override void WorldThingSpawned( WorldEvent e ) { if ( e.Thing is 'Inventory' ) - CheckSpreadOut(e.Thing); + CopyFloatBob(e.Thing); if ( e.Thing is 'Key' ) { DoKeyTagFix(e.Thing);