Add distant item glows.

This commit is contained in:
Mari the Deer 2021-07-09 13:21:28 +02:00
commit 8f4630ae8b
24 changed files with 164 additions and 87 deletions

View file

@ -7,6 +7,7 @@ Class AmmoFabricator : Inventory abstract
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
int budget, pertype, maxunitprice;

View file

@ -153,6 +153,7 @@ Class SWWMSpareArmor : Inventory abstract
Mixin SWWMUseToPickup;
Mixin SWWMOverlapPickupSound;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
Class<SWWMArmor> giveme;

View file

@ -5,6 +5,7 @@ Class SWWMHealth : Inventory abstract
Mixin SWWMUseToPickup;
Mixin SWWMOverlapPickupSound;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
// can't use the Health class for whatever reason
// nice parser you got there I guess?

View file

@ -165,6 +165,22 @@ Class SWWMRespawnTimer : Actor
}
}
Mixin Class SWWMPickupGlow
{
override Inventory CreateTossable( int amt )
{
let ret = Super.CreateTossable(amt);
// reattach our glow if we became a pickup
if ( (ret == self) && (PickupFlash is 'SWWMPickupFlash') && swwm_itemglows )
{
let p = Spawn(PickupFlash,Vec3Offset(0,0,16));
p.target = self;
p.SetStateLabel("Pickup");
}
return ret;
}
}
Mixin Class SWWMRespawn
{
override void Hide()

View file

@ -19,6 +19,7 @@ Class GrilledCheeseSandwich : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
// for falling off cliffs and others
// last 5 seconds of safe positions
@ -452,6 +453,7 @@ Class GhostArtifact : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
Default
{
@ -629,6 +631,7 @@ Class GravitySuppressor : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override bool Use( bool pickup )
{
@ -867,6 +870,7 @@ Class FuckingInvinciball : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override Inventory CreateCopy( Actor other )
{
@ -1154,6 +1158,7 @@ Class Ragekit : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override bool Use( bool pickup )
{
@ -1864,6 +1869,7 @@ Class SWWMLamp : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
bool bActive, bActivated;
TextureID OnIcon;
@ -2143,6 +2149,7 @@ Class EBarrier : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
override bool Use( bool pickup )
{
@ -2686,6 +2693,7 @@ Class Mykradvo : Inventory
Mixin SWWMOverlapPickupSound;
Mixin SWWMUseToPickup;
Mixin SWWMRespawn;
Mixin SWWMPickupGlow;
Actor ringa[2];