Colored trails fun option.

This commit is contained in:
Mari the Deer 2021-01-21 17:22:26 +01:00
commit 80a7408d5c
25 changed files with 113 additions and 7 deletions

View file

@ -92,6 +92,7 @@ server int swwm_silencemap = 0; // silences the map when all kills/items/secre
user int swwm_shadowdist = 2000; // max distance beyond which blob shadows are no longer rendered, helps performance
server bool swwm_swapweapons = true; // [DLC1] allows carrying only one weapon in each slot (excluding starter melee and pistol)
user int swwm_forcestats = 0; // always shows level stats on the HUD, not just when the automap is open (2 - also show map name, otherwise only stats)
user int swwm_funtrails = 0; // recolors trails of eviscerator chunks and sheen bullets
// TODO selection order array of weapons, for user tweaking
// if empty, use default selection order defined in zscript

View file

@ -179,6 +179,17 @@ SWWM_FORCESTATS = "Always Show Map Stats";
SWWM_STATS_DISABLED = "Disabled";
SWWM_STATS_ALWAYS = "Stats Only";
SWWM_STATS_MAPNAME = "Stats + Map Name";
SWWM_FUNTRAILS = "Trail Colors";
SWWM_TRAILS_DEFAULT = "Default";
SWWM_TRAILS_WHITE = "White";
SWWM_TRAILS_RED = "Red";
SWWM_TRAILS_YELLOW = "Yellow";
SWWM_TRAILS_GREEN = "Green";
SWWM_TRAILS_CYAN = "Cyan";
SWWM_TRAILS_BLUE = "Blue";
SWWM_TRAILS_MAGENTA = "Magenta";
SWWM_TRAILS_RAINBOW = "Rainbow";
SWWM_TRAILS_TRANS = "TRANS RIGHTS";
TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player.";
TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist.";
TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you.";
@ -261,6 +272,7 @@ TOOLTIP_SWWM_SILENCEMAP = "Chooses whether you want music to stop when you 100%
TOOLTIP_SWWM_SHADOWDIST = "Maximum distance at which to show blob shadows. May help performance.";
TOOLTIP_SWWM_SWAPWEAPONS = "Allow only one weapon per slot (excluding Deep Impact and Explodium Gun). Disable if you'd rather ignore this puny attempt at balance.";
TOOLTIP_SWWM_FORCESTATS = "Shows map statistics in the HUD even when the automap isn't open.";
TOOLTIP_SWWM_FUNTRAILS = "Recolors the trails left by slot 5 weapon projectiles.";
// knowledge base
SWWM_COMINGSOON = "(coming soon)";
SWWM_MISSTAB = "Mission";

View file

@ -177,6 +177,16 @@ SWWM_FORCESTATS = "Mostrar Siempre Estadísticas de Mapa";
SWWM_STATS_DISABLED = "Desactivado";
SWWM_STATS_ALWAYS = "Solo Estadísticas";
SWWM_STATS_MAPNAME = "Estadísticas + Nombre de Mapa";
SWWM_FUNTRAILS = "Colores de Rastro";
SWWM_TRAILS_DEFAULT = "Predeterminado";
SWWM_TRAILS_WHITE = "Blanco";
SWWM_TRAILS_RED = "Rojo";
SWWM_TRAILS_YELLOW = "Amarillo";
SWWM_TRAILS_GREEN = "Verde";
SWWM_TRAILS_CYAN = "Cian";
SWWM_TRAILS_BLUE = "Azul";
SWWM_TRAILS_MAGENTA = "Magenta";
SWWM_TRAILS_RAINBOW = "Arcoiris";
TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador.";
TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso.";
TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de efectos te causan malestar.";
@ -259,6 +269,7 @@ TOOLTIP_SWWM_SILENCEMAP = "Elige si quieres que la música se detenga cuando com
TOOLTIP_SWWM_SHADOWDIST = "Distancia máxima a la que mostrar sombras. Puede ayudar al rendimiento.";
TOOLTIP_SWWM_SWAPWEAPONS = "Permite solo un arma por puesto (excluyendo Deep Impact y Pistola de Explodium). Desactiva si prefieres ignorar este intento inútil de balance.";
TOOLTIP_SWWM_FORCESTATS = "Muestra estadísticas de mapa en el HUD incluso cuando el automapa no está abierto.";
TOOLTIP_SWWM_FUNTRAILS = "Recolorea los rastros dejados por proyectiles de armas de ranura 5.";
// knowledge base
SWWM_COMINGSOON = "(próximamente)";
SWWM_MISSTAB = "Misión";

View file

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r776 \cu(Thu 21 Jan 16:09:18 CET 2021)";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r777 \cu(Thu 21 Jan 17:22:26 CET 2021)";

View file

@ -48,6 +48,19 @@ OptionValue "SWWMForceStats"
1, "$SWWM_STATS_ALWAYS"
2, "$SWWM_STATS_MAPNAME"
}
OptionValue "SWWMFunTrails"
{
0, "$SWWM_TRAILS_DEFAULT"
1, "$SWWM_TRAILS_WHITE"
2, "$SWWM_TRAILS_RED"
3, "$SWWM_TRAILS_YELLOW"
4, "$SWWM_TRAILS_GREEN"
5, "$SWWM_TRAILS_CYAN"
6, "$SWWM_TRAILS_BLUE"
7, "$SWWM_TRAILS_MAGENTA"
8, "$SWWM_TRAILS_RAINBOW"
9, "$SWWM_TRAILS_TRANS"
}
OptionMenu "SWWMOptionMenu"
{
Class "SWWMOptionMenu"
@ -114,6 +127,7 @@ OptionMenu "SWWMOptionMenu"
Option "$SWWM_OMNIBUST", "swwm_omnibust", "YesNo"
Option "$SWWM_SUPERFUEL", "swwm_superfuel", "YesNo"
Option "$SWWM_PARTYTIME", "swwm_partytime", "YesNo"
Option "$SWWM_FUNTRAILS", "swwm_funtrails", "SWWMFunTrails"
StaticText " "
StaticText "$SWWM_BTITLE", "Blue"
Option "$SWWM_ENEMYDROPS", "swwm_enemydrops", "SWWMEnemyDropType"

View file

@ -28,6 +28,25 @@ Model "EvisceratorChunkTrail"
DONTCULLBACKFACES
FrameIndex XZW1 A 0 0
// recolors wow
Skin 0 "ChunkTrail_White.png"
FrameIndex XZW1 B 0 0
Skin 0 "ChunkTrail_Red.png"
FrameIndex XZW1 C 0 0
Skin 0 "ChunkTrail_Yellow.png"
FrameIndex XZW1 D 0 0
Skin 0 "ChunkTrail_Green.png"
FrameIndex XZW1 E 0 0
Skin 0 "ChunkTrail_Cyan.png"
FrameIndex XZW1 F 0 0
Skin 0 "ChunkTrail_Blue.png"
FrameIndex XZW1 G 0 0
Skin 0 "ChunkTrail_Magenta.png"
FrameIndex XZW1 H 0 0
Skin 0 "ChunkTrail_TransBlue.png"
FrameIndex XZW1 I 0 0
Skin 0 "ChunkTrail_TransPink.png"
FrameIndex XZW1 J 0 0
}
Model "EvisceratorChunk"

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -123,13 +123,13 @@ Class EvisceratorChunkTrail : Actor
override void Tick()
{
if ( isFrozen() ) return;
A_SetScale(scale.x*.6,scale.y);
A_FadeOut(.1);
A_SetScale(scale.x*(.6+specialf1),scale.y);
A_FadeOut(.1+specialf2);
}
States
{
Spawn:
XZW1 A -1 Bright;
XZW1 ABCDEFGHIJ -1 Bright;
Stop;
}
}
@ -141,6 +141,7 @@ Class EvisceratorChunk : Actor
double lifetime, lifespeed;
Vector3 oldvel;
bool justdied;
int trailcolor;
Default
{
@ -224,6 +225,13 @@ Class EvisceratorChunk : Actor
t.scale.y = dist;
t.angle = atan2(dir.y,dir.x);
t.pitch = asin(-dir.z)+90;
t.SetState(t.SpawnState+trailcolor);
if ( trailcolor > 0 )
{
// custom trails last longer
t.specialf1 = .3;
t.specialf2 = -.05;
}
}
}
@ -476,7 +484,7 @@ Class EvisceratorProj : Actor
Vector3 x, y, z;
double a, s;
[x, y, z] = swwm_CoordUtil.GetAxes(pitch,angle,roll);
Actor p;
EvisceratorChunk p;
Vector3 spawnofs;
if ( BlockingMobj ) spawnofs = level.Vec3Diff(pos,BlockingMobj.Vec3Offset(0,0,BlockingMobj.height/2)).unit()*4;
else if ( BlockingFloor ) spawnofs = BlockingFloor.floorplane.Normal*4;
@ -487,9 +495,11 @@ Class EvisceratorProj : Actor
if ( !SWWMUtility.PointOnLineSide(pos.xy,BlockingLine) )
spawnofs *= -1;
}
int trail = 0;
if ( target && target.player ) trail = CVar.GetCVar('swwm_funtrails',target.player).GetInt();
for ( int i=0; i<30; i++ )
{
p = Spawn("EvisceratorChunk",level.Vec3Offset(pos,spawnofs));
p = EvisceratorChunk(Spawn("EvisceratorChunk",level.Vec3Offset(pos,spawnofs)));
p.bHITOWNER = true;
a = FRandom[Eviscerator](0,360);
s = FRandom[Eviscerator](0,.4);
@ -498,6 +508,25 @@ Class EvisceratorProj : Actor
p.pitch = -asin(dir.z);
p.vel = (cos(p.angle)*cos(p.pitch),sin(p.angle)*cos(p.pitch),-sin(p.pitch))*(p.speed+FRandom[Eviscerator](-5,20));
p.target = target;
if ( trail < 8 ) p.trailcolor = max(0,trail);
else if ( trail == 8 ) p.trailcolor = (i%6)+2;
else if ( trail == 9 )
{
switch ( i%5 )
{
case 0:
case 3:
p.trailcolor = 8;
break;
case 1:
case 4:
p.trailcolor = 9;
break;
case 2:
p.trailcolor = 1;
break;
}
}
}
int numpt = Random[Eviscerator](10,15);
for ( int i=0; i<numpt; i++ )
@ -767,17 +796,37 @@ Class Eviscerator : SWWMWeapon
SWWMUtility.DoKnockback(self,-x,25000.);
[x2, y2, z2] = swwm_CoordUtil.GetAxes(BulletSlope(),angle,roll);
origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x+4*y-5*z);
int trail = CVar.GetCVar('swwm_funtrails',player).GetInt();
for ( int i=0; i<30; i++ )
{
a = FRandom[Eviscerator](0,360);
s = FRandom[Eviscerator](0,invoker.extended?.06:.3);
dir = (x2+y2*cos(a)*s+z2*sin(a)*s).unit();
let p = Spawn("EvisceratorChunk",origin);
let p = EvisceratorChunk(Spawn("EvisceratorChunk",origin));
p.target = self;
p.angle = atan2(dir.y,dir.x);
p.pitch = asin(-dir.z);
p.vel = dir*p.speed*FRandom[Eviscerator](.9,1.1);
if ( invoker.extended ) p.vel *= 1.4;
if ( trail < 8 ) p.trailcolor = max(0,trail);
else if ( trail == 8 ) p.trailcolor = (i%6)+2;
else if ( trail == 9 )
{
switch ( i%5 )
{
case 0:
case 3:
p.trailcolor = 8;
break;
case 1:
case 4:
p.trailcolor = 9;
break;
case 2:
p.trailcolor = 1;
break;
}
}
}
for ( int i=0; i<8; i++ )
{