Fix nearby item sparkles.

This commit is contained in:
Mari the Deer 2022-08-06 15:39:36 +02:00
commit 64d7429b0e
2 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r266 \cu(Sat 6 Aug 15:35:02 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r266 \cu(2022-08-06 15:35:02)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r267 \cu(Sat 6 Aug 15:39:36 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r267 \cu(2022-08-06 15:39:36)\c-";

View file

@ -1079,15 +1079,16 @@ Class Demolitionist : PlayerPawn
let t = bt.Thing;
if ( !t || !(t is 'Inventory') || !t.bSPECIAL || t.bINVISIBLE || Inventory(t).Owner || !SWWMUtility.SphereIntersect(t,pos,500) )
continue;
Vector3 bpos = (0,0,16);
if ( t.bFLOATBOB ) bpos.z += t.GetBobOffset();
double alph = clamp((500.-Distance3DSquared(t))/250000.,0.,1.);
Color pcol = "Gold";
if ( Inventory(t).PickupFlash is 'SWWMPickupFlash' )
{
let def = GetDefaultByType(Inventory(t).PickupFlash);
pcol = Color(def.Args[1]*85,def.Args[2]*85,def.Args[3]*85);
}
else continue;
Vector3 bpos = (0,0,16);
if ( t.bFLOATBOB ) bpos.z += t.GetBobOffset();
double alph = clamp((250000.-Distance3DSquared(t))/250000.,0.,1.);
int numpt = clamp(int(max(t.radius,t.height-16)/4),1,8);
for ( int i=0; i<numpt; i++ )
{