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.
This commit is contained in:
Mari the Deer 2020-05-23 10:38:03 +02:00
commit 98fad4184b
3 changed files with 6 additions and 6 deletions

View file

@ -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)";

View file

@ -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",

View file

@ -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);