Add blood pools to the effect queue system.
This commit is contained in:
parent
13ed4dee44
commit
9757aed5e6
10 changed files with 63 additions and 25 deletions
|
|
@ -23,6 +23,7 @@ server int swwm_maxblood = 200; // max blood effects at any time
|
||||||
server int swwm_maxgibs = 100; // max gibs at any time
|
server int swwm_maxgibs = 100; // max gibs at any time
|
||||||
server int swwm_maxcasings = 100; // max casings and spent mags at any time
|
server int swwm_maxcasings = 100; // max casings and spent mags at any time
|
||||||
server int swwm_maxdebris = 200; // max chunks of debris at any time
|
server int swwm_maxdebris = 200; // max chunks of debris at any time
|
||||||
|
server int swwm_maxpools = 100; // max corpse blood pools at any time
|
||||||
nosave bool swwm_fuzz = true; // allows toggling the fuzz shader on menus/backgrounds, useful if you're streaming/recording since it destroys the encoding quality
|
nosave bool swwm_fuzz = true; // allows toggling the fuzz shader on menus/backgrounds, useful if you're streaming/recording since it destroys the encoding quality
|
||||||
server bool swwm_cbtall = false; // wallbuster breaks any wall, not just movable ones
|
server bool swwm_cbtall = false; // wallbuster breaks any wall, not just movable ones
|
||||||
server bool swwm_doomfall = false; // monsters take fall damage outside of hexen
|
server bool swwm_doomfall = false; // monsters take fall damage outside of hexen
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ SWWM_PARTYTIME = "Super Fun Party Time";
|
||||||
SWWM_BIGTAGS = "Use Large Font for Names";
|
SWWM_BIGTAGS = "Use Large Font for Names";
|
||||||
SWWM_MAXBLOOD = "Blood Limit";
|
SWWM_MAXBLOOD = "Blood Limit";
|
||||||
SWWM_MAXGIBS = "Gib Limit";
|
SWWM_MAXGIBS = "Gib Limit";
|
||||||
|
SWWM_MAXPOOLS = "Pool Limit";
|
||||||
SWWM_MAXCASINGS = "Casing Limit";
|
SWWM_MAXCASINGS = "Casing Limit";
|
||||||
SWWM_MAXDEBRIS = "Debris Limit";
|
SWWM_MAXDEBRIS = "Debris Limit";
|
||||||
SWWM_ENEMYDROPS = "Enemy Ammo/Weapon Drops";
|
SWWM_ENEMYDROPS = "Enemy Ammo/Weapon Drops";
|
||||||
|
|
@ -234,6 +235,7 @@ TOOLTIP_SWWM_PARTYTIME = "When something dies, it shoots out a cloud of confetti
|
||||||
TOOLTIP_SWWM_BIGTAGS = "By default name labels on healthbars are shown with a small, compact font. Enabling this will use a bigger one.";
|
TOOLTIP_SWWM_BIGTAGS = "By default name labels on healthbars are shown with a small, compact font. Enabling this will use a bigger one.";
|
||||||
TOOLTIP_SWWM_MAXBLOOD = "Caps the maximum amount of blood effects. Surpassing this limit will cause the excess to fade out.";
|
TOOLTIP_SWWM_MAXBLOOD = "Caps the maximum amount of blood effects. Surpassing this limit will cause the excess to fade out.";
|
||||||
TOOLTIP_SWWM_MAXGIBS = "Caps the maximum amount of gibs. Surpassing this limit will cause the excess to fade out.";
|
TOOLTIP_SWWM_MAXGIBS = "Caps the maximum amount of gibs. Surpassing this limit will cause the excess to fade out.";
|
||||||
|
TOOLTIP_SWWM_MAXPOOLS = "Caps the maximum amount of blood pools. Surpassing this limit will cause the excess to fade out.";
|
||||||
TOOLTIP_SWWM_MAXCASINGS = "Caps the maximum amount of casings and spent magazines. Surpassing this limit will cause the excess to fade out.";
|
TOOLTIP_SWWM_MAXCASINGS = "Caps the maximum amount of casings and spent magazines. Surpassing this limit will cause the excess to fade out.";
|
||||||
TOOLTIP_SWWM_MAXDEBRIS = "Caps the maximum amount of rubble from explosions and others. Surpassing this limit will cause the excess to fade out.";
|
TOOLTIP_SWWM_MAXDEBRIS = "Caps the maximum amount of rubble from explosions and others. Surpassing this limit will cause the excess to fade out.";
|
||||||
TOOLTIP_SWWM_ENEMYDROPS = "By default, enemies only drop ammo for a better progression. In maps with excessive amounts of enemies, it's recommended to disable this entirely.";
|
TOOLTIP_SWWM_ENEMYDROPS = "By default, enemies only drop ammo for a better progression. In maps with excessive amounts of enemies, it's recommended to disable this entirely.";
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@ SWWM_PARTYTIME = "Modo Fiesta Tope";
|
||||||
SWWM_BIGTAGS = "Usar Fuente Grande para Nombres";
|
SWWM_BIGTAGS = "Usar Fuente Grande para Nombres";
|
||||||
SWWM_MAXBLOOD = "Límite de Sangre";
|
SWWM_MAXBLOOD = "Límite de Sangre";
|
||||||
SWWM_MAXGIBS = "Límite de Vísceras";
|
SWWM_MAXGIBS = "Límite de Vísceras";
|
||||||
|
SWWM_MAXPOOLS = "Límite de Charcos";
|
||||||
SWWM_MAXCASINGS = "Límite de Casquillos";
|
SWWM_MAXCASINGS = "Límite de Casquillos";
|
||||||
SWWM_MAXDEBRIS = "Límite de Escombros";
|
SWWM_MAXDEBRIS = "Límite de Escombros";
|
||||||
SWWM_ENEMYDROPS = "Drops de Armas y Munición de Enemigos";
|
SWWM_ENEMYDROPS = "Drops de Armas y Munición de Enemigos";
|
||||||
|
|
@ -229,6 +230,7 @@ TOOLTIP_SWWM_PARTYTIME = "Cuando algo muere, expulsa una nube de confetti.";
|
||||||
TOOLTIP_SWWM_BIGTAGS = "Por defecto los nombres de las barras de vida usan una fuente pequeña. Activando esta opción, se cambiará por una mayor.";
|
TOOLTIP_SWWM_BIGTAGS = "Por defecto los nombres de las barras de vida usan una fuente pequeña. Activando esta opción, se cambiará por una mayor.";
|
||||||
TOOLTIP_SWWM_MAXBLOOD = "Limita la cantidad máxima de efectos de sangre. Sobrepasar este límite causará que el exceso se desvanezca.";
|
TOOLTIP_SWWM_MAXBLOOD = "Limita la cantidad máxima de efectos de sangre. Sobrepasar este límite causará que el exceso se desvanezca.";
|
||||||
TOOLTIP_SWWM_MAXGIBS = "Limita la cantidad máxima de vísceras. Sobrepasar este límite causará que el exceso se desvanezca.";
|
TOOLTIP_SWWM_MAXGIBS = "Limita la cantidad máxima de vísceras. Sobrepasar este límite causará que el exceso se desvanezca.";
|
||||||
|
TOOLTIP_SWWM_MAXPOOLS = "Limita la cantidad máxima de charcos de sangre. Sobrepasar este límite causará que el exceso se desvanezca.";
|
||||||
TOOLTIP_SWWM_MAXCASINGS = "Limita la cantidad máxima de casquillos y cargadores usados. Sobrepasar este límite causará que el exceso se desvanezca.";
|
TOOLTIP_SWWM_MAXCASINGS = "Limita la cantidad máxima de casquillos y cargadores usados. Sobrepasar este límite causará que el exceso se desvanezca.";
|
||||||
TOOLTIP_SWWM_MAXDEBRIS = "Limita la cantidad máxima de escombros por explosiones y otros. Sobrepasar este límite causará que el exceso se desvanezca.";
|
TOOLTIP_SWWM_MAXDEBRIS = "Limita la cantidad máxima de escombros por explosiones y otros. Sobrepasar este límite causará que el exceso se desvanezca.";
|
||||||
TOOLTIP_SWWM_ENEMYDROPS = "Por defecto, los enemigos solo dropean munición para una mejor progresión. En mapas con enemigos excesivos, se recomienda desactivar los drops por completo.";
|
TOOLTIP_SWWM_ENEMYDROPS = "Por defecto, los enemigos solo dropean munición para una mejor progresión. En mapas con enemigos excesivos, se recomienda desactivar los drops por completo.";
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
[default]
|
[default]
|
||||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1204 \cu(dom 16 mar 2025 20:21:10 CET)\c-";
|
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1205 \cu(dom 16 mar 2025 21:02:13 CET)\c-";
|
||||||
SWWM_SHORTVER="\cw1.3pre r1204 \cu(2025-03-16 20:21:10)\c-";
|
SWWM_SHORTVER="\cw1.3pre r1205 \cu(2025-03-16 21:02:13)\c-";
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,7 @@ OptionMenu "SWWMOptionMenu"
|
||||||
Option "$SWWM_NOMAGDROP", "swwm_nomagdrop", "NoYes"
|
Option "$SWWM_NOMAGDROP", "swwm_nomagdrop", "NoYes"
|
||||||
ScaleSliderFix "$SWWM_MAXBLOOD", "swwm_maxblood", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
ScaleSliderFix "$SWWM_MAXBLOOD", "swwm_maxblood", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||||
ScaleSliderFix "$SWWM_MAXGIBS", "swwm_maxgibs", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
ScaleSliderFix "$SWWM_MAXGIBS", "swwm_maxgibs", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||||
|
ScaleSliderFix "$SWWM_MAXPOOLS", "swwm_maxpools", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||||
ScaleSliderFix "$SWWM_MAXCASINGS", "swwm_maxcasings", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
ScaleSliderFix "$SWWM_MAXCASINGS", "swwm_maxcasings", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||||
ScaleSliderFix "$SWWM_MAXDEBRIS", "swwm_maxdebris", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
ScaleSliderFix "$SWWM_MAXDEBRIS", "swwm_maxdebris", -1, 1000, 100, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||||
SafeCommand "$SWWM_CLEARFX", "netevent swwmcleareffects"
|
SafeCommand "$SWWM_CLEARFX", "netevent swwmcleareffects"
|
||||||
|
|
|
||||||
|
|
@ -53,9 +53,6 @@ Class SWWMHandler : EventHandler
|
||||||
transient ui Vector2 oldplayerpos;
|
transient ui Vector2 oldplayerpos;
|
||||||
transient ui bool do_trace_steps;
|
transient ui bool do_trace_steps;
|
||||||
|
|
||||||
// for bloody footsteps
|
|
||||||
mkBloodPool bloodpools;
|
|
||||||
|
|
||||||
enum EProfileTimer
|
enum EProfileTimer
|
||||||
{
|
{
|
||||||
PT_WORLDTICK,
|
PT_WORLDTICK,
|
||||||
|
|
|
||||||
|
|
@ -445,7 +445,7 @@ extend Class SWWMHandler
|
||||||
Console.Printf("Only the net arbitrator can call this event.");
|
Console.Printf("Only the net arbitrator can call this event.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int n = casings_cnt+chips_cnt+blods_cnt+meats_cnt;
|
int n = casings_cnt+chips_cnt+blods_cnt+meats_cnt+pools_cnt;
|
||||||
CleanQueues();
|
CleanQueues();
|
||||||
Console.Printf("%d effects cleared.",n);
|
Console.Printf("%d effects cleared.",n);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ extend Class SWWMHandler
|
||||||
int blods_cnt, oldmaxblood, blods_realcnt;
|
int blods_cnt, oldmaxblood, blods_realcnt;
|
||||||
mkFlyingGib meats, meats_end;
|
mkFlyingGib meats, meats_end;
|
||||||
int meats_cnt, oldmaxgibs, meats_realcnt;
|
int meats_cnt, oldmaxgibs, meats_realcnt;
|
||||||
|
mkBloodPool pools, pools_end;
|
||||||
|
int pools_cnt, oldmaxpools, pools_realcnt;
|
||||||
|
|
||||||
static void QueueCasing( SWWMCasing c )
|
static void QueueCasing( SWWMCasing c )
|
||||||
{
|
{
|
||||||
|
|
@ -149,6 +151,40 @@ extend Class SWWMHandler
|
||||||
m.prevmeat = null;
|
m.prevmeat = null;
|
||||||
m.nextmeat = null;
|
m.nextmeat = null;
|
||||||
}
|
}
|
||||||
|
static void QueuePool( mkBloodPool p )
|
||||||
|
{
|
||||||
|
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||||
|
if ( !hnd ) return;
|
||||||
|
hnd.pools_cnt++;
|
||||||
|
if ( !hnd.pools )
|
||||||
|
{
|
||||||
|
// this is the initial one
|
||||||
|
hnd.pools = p;
|
||||||
|
hnd.pools_end = p;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hnd.pools_end.nextpool = p;
|
||||||
|
p.prevpool = hnd.pools_end;
|
||||||
|
hnd.pools_end = p;
|
||||||
|
}
|
||||||
|
while ( hnd.pools && (swwm_maxpools >= 0) && (hnd.pools_cnt > swwm_maxpools) )
|
||||||
|
DeQueuePool(hnd.pools);
|
||||||
|
}
|
||||||
|
static void DeQueuePool( mkBloodPool p )
|
||||||
|
{
|
||||||
|
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||||
|
if ( !hnd || !hnd.pools ) return;
|
||||||
|
if ( (hnd.pools != p) && !p.prevpool && !p.nextpool ) return;
|
||||||
|
hnd.pools_cnt--;
|
||||||
|
if ( !p.prevpool ) hnd.pools = p.nextpool;
|
||||||
|
else p.prevpool.nextpool = p.nextpool;
|
||||||
|
if ( p == hnd.pools_end ) hnd.pools_end = p.prevpool;
|
||||||
|
if ( p.nextpool ) p.nextpool.prevpool = p.prevpool;
|
||||||
|
p.killme = true;
|
||||||
|
p.prevpool = null;
|
||||||
|
p.nextpool = null;
|
||||||
|
}
|
||||||
|
|
||||||
private void CleanQueues()
|
private void CleanQueues()
|
||||||
{
|
{
|
||||||
|
|
@ -156,6 +192,7 @@ extend Class SWWMHandler
|
||||||
while ( chips ) DeQueueChip(chips);
|
while ( chips ) DeQueueChip(chips);
|
||||||
while ( blods ) DeQueueBlod(blods);
|
while ( blods ) DeQueueBlod(blods);
|
||||||
while ( meats ) DeQueueMeat(meats);
|
while ( meats ) DeQueueMeat(meats);
|
||||||
|
while ( pools ) DeQueuePool(pools);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RecheckQueues()
|
private void RecheckQueues()
|
||||||
|
|
@ -168,6 +205,8 @@ extend Class SWWMHandler
|
||||||
DeQueueBlod(blods);
|
DeQueueBlod(blods);
|
||||||
while ( meats && (meats_cnt > swwm_maxgibs) )
|
while ( meats && (meats_cnt > swwm_maxgibs) )
|
||||||
DeQueueMeat(meats);
|
DeQueueMeat(meats);
|
||||||
|
while ( pools && (pools_cnt > swwm_maxpools) )
|
||||||
|
DeQueuePool(pools);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void QueueMaintenance()
|
private void QueueMaintenance()
|
||||||
|
|
@ -192,9 +231,15 @@ extend Class SWWMHandler
|
||||||
while ( meats && (swwm_maxgibs >= 0) && (meats_cnt > swwm_maxgibs) )
|
while ( meats && (swwm_maxgibs >= 0) && (meats_cnt > swwm_maxgibs) )
|
||||||
DeQueueMeat(meats);
|
DeQueueMeat(meats);
|
||||||
}
|
}
|
||||||
|
if ( swwm_maxpools != oldmaxpools )
|
||||||
|
{
|
||||||
|
while ( pools && (swwm_maxpools >= 0) && (pools_cnt > swwm_maxpools) )
|
||||||
|
DeQueuePool(pools);
|
||||||
|
}
|
||||||
oldmaxcasings = swwm_maxcasings;
|
oldmaxcasings = swwm_maxcasings;
|
||||||
oldmaxdebris = swwm_maxdebris;
|
oldmaxdebris = swwm_maxdebris;
|
||||||
oldmaxblood = swwm_maxblood;
|
oldmaxblood = swwm_maxblood;
|
||||||
oldmaxgibs = swwm_maxgibs;
|
oldmaxgibs = swwm_maxgibs;
|
||||||
|
oldmaxpools = swwm_maxpools;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ extend Class Demolitionist
|
||||||
}
|
}
|
||||||
// part 2: check for stepping on a blood pool, make feet bloody
|
// part 2: check for stepping on a blood pool, make feet bloody
|
||||||
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
if ( !hnd ) hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
||||||
for ( mkBloodPool p=hnd.bloodpools; p; p=p.nextpool )
|
for ( mkBloodPool p=hnd.pools; p; p=p.nextpool )
|
||||||
{
|
{
|
||||||
// vertical distance fast check
|
// vertical distance fast check
|
||||||
if ( abs(checkpos.z-p.pos.z) > 8. )
|
if ( abs(checkpos.z-p.pos.z) > 8. )
|
||||||
|
|
|
||||||
|
|
@ -893,21 +893,14 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
||||||
double basesz, sz, accel;
|
double basesz, sz, accel;
|
||||||
Color stepcol;
|
Color stepcol;
|
||||||
mkBloodPool prevpool, nextpool;
|
mkBloodPool prevpool, nextpool;
|
||||||
bool bRaised; // dead body was revived, fade out faster
|
bool killme, bRaised;
|
||||||
|
|
||||||
Property BaseAccel : accel;
|
Property BaseAccel : accel;
|
||||||
|
|
||||||
override void OnDestroy()
|
override void OnDestroy()
|
||||||
{
|
{
|
||||||
|
SWWMHandler.DeQueuePool(self);
|
||||||
Super.OnDestroy();
|
Super.OnDestroy();
|
||||||
if ( prevpool )
|
|
||||||
{
|
|
||||||
prevpool.nextpool = nextpool;
|
|
||||||
if ( nextpool ) nextpool.prevpool = prevpool;
|
|
||||||
}
|
|
||||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
|
||||||
if ( !hnd || (hnd.bloodpools != self) ) return;
|
|
||||||
hnd.bloodpools = nextpool;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void PostBeginPlay()
|
override void PostBeginPlay()
|
||||||
|
|
@ -918,13 +911,8 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
||||||
basesz = scale.x;
|
basesz = scale.x;
|
||||||
sz = .01;
|
sz = .01;
|
||||||
A_SetScale(sz);
|
A_SetScale(sz);
|
||||||
A_QueueCorpse();
|
|
||||||
SWWMUtility.SetToSlope(self,FRandom[Blood](0,360));
|
SWWMUtility.SetToSlope(self,FRandom[Blood](0,360));
|
||||||
let hnd = SWWMHandler(EventHandler.Find('SWWMHandler'));
|
SWWMHandler.QueuePool(self);
|
||||||
if ( !hnd ) return;
|
|
||||||
nextpool = hnd.bloodpools;
|
|
||||||
hnd.bloodpools = self;
|
|
||||||
if ( nextpool ) nextpool.prevpool = self;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override void Tick()
|
override void Tick()
|
||||||
|
|
@ -939,12 +927,14 @@ Class mkBloodPool : SWWMNonInteractiveActor
|
||||||
if ( fz != pos.z ) SetOrigin((pos.x,pos.y,fz),true);
|
if ( fz != pos.z ) SetOrigin((pos.x,pos.y,fz),true);
|
||||||
if ( (waterlevel > 0) || GetFloorTerrain().isliquid )
|
if ( (waterlevel > 0) || GetFloorTerrain().isliquid )
|
||||||
A_FadeOut();
|
A_FadeOut();
|
||||||
if ( !master ) A_FadeOut(.01);
|
if ( killme ) A_FadeOut(.01);
|
||||||
else if ( (master.Health > 0) || bRaised )
|
if ( master && (master.Health > 0) )
|
||||||
{
|
{
|
||||||
bRaised = true;
|
bRaised = true;
|
||||||
A_FadeOut();
|
master = null;
|
||||||
}
|
}
|
||||||
|
if ( bRaised || !master )
|
||||||
|
A_FadeOut();
|
||||||
if ( accel <= 0. ) return;
|
if ( accel <= 0. ) return;
|
||||||
sz += accel;
|
sz += accel;
|
||||||
double fact = min(special1++/1200.,1.);
|
double fact = min(special1++/1200.,1.);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue