[This update requires a very recent Q/GZDoom build]

Added per-frame update option to Redeemer Readout.
Began work on blood and gore features (mostly functional at the moment).
This commit is contained in:
Marisa the Magician 2018-11-24 16:46:10 +01:00
commit 830bcff4a7
7 changed files with 401 additions and 70 deletions

View file

@ -440,23 +440,6 @@ Class UTPlayer : DoomPlayer
}
}
// Random Spawner that passes through dropped status to items
Class RandomSpawner2 : RandomSpawner
{
override void PostSpawn( Actor spawned )
{
if ( !bDROPPED ) return;
if ( spawned is 'Inventory' ) Inventory(spawned).bTOSSED = bDROPPED;
if ( spawned is 'UTWeapon' )
{
spawned.SetState(spawned.ResolveState("Spawn")+1);
Inventory(spawned).bALWAYSPICKUP = true;
if ( UTWeapon(spawned).DropAmmo > 0 )
Weapon(spawned).AmmoGive1 = min(UTWeapon(spawned).DropAmmo,Weapon(spawned).AmmoGive1);
}
}
}
Class UTWeapon : Weapon
{
int DropAmmo;
@ -1378,6 +1361,7 @@ Class UTMainHandler : StaticEventHandler
else if ( e.Replacee == 'YellowSkull' ) e.Replacement = 'UTGoldSkull';
else if ( e.Replacee == 'TeleportFog' ) e.Replacement = 'UTTeleportFog';
else if ( e.Replacee == 'ItemFog' ) e.Replacement = 'UTItemFog';
else if ( flak_blood && (e.Replacee == 'Blood') ) e.Replacement = 'UTBlood';
}
private Actor AddLight( Vector3 pos, Color col, int radius )
@ -1592,6 +1576,28 @@ Class UTMainHandler : StaticEventHandler
override void WorldThingDied( WorldEvent e )
{
if ( e.Thing.bDONTGIB ) return;
// gibbers
if ( flak_gibs && !e.Thing.bNOBLOOD && ((e.Inflictor && e.Inflictor.bEXTREMEDEATH) || (e.Thing.Health < e.Thing.GetGibHealth())) && (!e.Inflictor || !e.Inflictor.bNOEXTREMEDEATH) )
{
// players have special gibbing
if ( e.Thing.player )
{
return;
}
// generic gibbing
let a = Actor.Spawn("UTGibber",e.Thing.pos);
a.vel = e.Thing.vel;
a.Scale = e.Thing.Scale;
a.Translation = e.Thing.BloodTranslation;
if ( e.Thing.BloodColor ) a.SetShade(e.Thing.BloodColor);
else a.SetShade(gameinfo.defaultbloodcolor);
a.A_SetSize(e.Thing.radius,e.Thing.height);
e.Thing.A_XScream();
e.Thing.A_NoBlocking();
e.Thing.A_BossDeath();
e.Thing.Destroy();
return;
}
// attach damage accumulator for corpses
if ( !flak_corpsedamage ) return;
let a = Actor.Spawn("ShredCorpseHitbox",e.Thing.pos);