HUD face now also affected by tag color.

Added two more tag colors to round up to 16.
Fixed tag light color not updating when changed.
Recalculated tag light colors.
This commit is contained in:
Mari the Deer 2022-10-13 13:43:32 +02:00
commit 4a46817881
11 changed files with 45 additions and 20 deletions

View file

@ -118,3 +118,11 @@ Brightmap Texture "models/DemoTagsYellow.png"
{
Map "models/DemoTags_bright.png"
}
Brightmap Texture "models/DemoTagsBlack.png"
{
Map "models/DemoTags_bright.png"
}
Brightmap Texture "models/DemoTagsRust.png"
{
Map "models/DemoTags_bright.png"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 936 B

Before After
Before After

View file

@ -177,6 +177,8 @@ SWWM_COL_10 = "Red";
SWWM_COL_11 = "Violet";
SWWM_COL_12 = "White";
SWWM_COL_13 = "Yellow";
SWWM_COL_14 = "Black";
SWWM_COL_15 = "Rust";
SWWM_UTITLE = "Interface Options";
SWWM_BONKHAMMER = "Bonk Hammer";
SWWM_FRIENDLYFIRE = "Friendly Fire";

View file

@ -174,6 +174,8 @@ SWWM_COL_10 = "Rojo";
SWWM_COL_11 = "Violeta";
SWWM_COL_12 = "Blanco";
SWWM_COL_13 = "Amarillo";
SWWM_COL_14 = "Negro";
SWWM_COL_15 = "Óxido";
SWWM_UTITLE = "Opciones de Interfaz";
SWWM_BONKHAMMER = "Martillo Loco";
SWWM_FRIENDLYFIRE = "Fuego Amigo";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r570 \cu(Thu 13 Oct 13:02:56 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r570 \cu(2022-10-13 13:02:56)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r571 \cu(Thu 13 Oct 13:43:32 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r571 \cu(2022-10-13 13:43:32)\c-";

View file

@ -98,6 +98,8 @@ OptionValue "SWWMTagColor"
11, "$SWWM_COL_11"
12, "$SWWM_COL_12"
13, "$SWWM_COL_13"
14, "$SWWM_COL_14"
15, "$SWWM_COL_15"
}
OptionValue "SWWMFriendlyFire"
{

BIN
models/DemoTagsBlack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
models/DemoTagsRust.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

@ -190,6 +190,8 @@ Class SWWMStatusBar : BaseStatusBar
transient ui int rss;
transient CVar tagcolor; // for mugshot
override void FlushNotify()
{
// flush interpolators (useful since this virtual gets called
@ -2882,7 +2884,10 @@ Class SWWMStatusBar : BaseStatusBar
Vector2 shake = (RandomShiver(),RandomShiver())*noiz;
if ( !CPlayer.mo.FindInventory("GhostPower") )
{
Screen.DrawTexture(FaceTex[0],false,margin+shake.x,ss.y-(margin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
if ( !tagcolor ) tagcolor = CVar.GetCVar('swwm_tagcolor',CPlayer);
int facecol = tagcolor.GetInt();
if ( (facecol < 0) || (facecol > 15) ) facecol = 0;
Screen.DrawTexture(FaceTex[0],false,margin+shake.x,ss.y-(margin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_SrcWidth,32,DTA_SrcHeight,32,DTA_DestWidth,32,DTA_DestHeight,32,DTA_SrcX,32*(facecol%4),DTA_SrcY,32*(facecol/4));
bool raging = CPlayer.mo.FindInventory("RagekitPower");
bool angy = CPlayer.mo.FindInventory("AngeryPower");
if ( raging && angy ) Screen.DrawTexture(FaceTex[16],false,margin+shake.x,ss.y-(margin+32)+shake.y,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);

View file

@ -181,7 +181,9 @@ Class Demolitionist : PlayerPawn
"Red",
"Violet",
"White",
"Yellow"
"Yellow",
"Black",
"Rust"
};
int idx = tagcolor.GetInt();
if ( (idx < 0) || (idx >= colname.Size()) ) idx = 0;

View file

@ -596,6 +596,7 @@ Class DemolitionistSelfLight : Thinker
bool oldglow;
Actor target;
transient CVar tagcolor;
int oldcolor;
override void Tick()
{
@ -607,20 +608,22 @@ Class DemolitionistSelfLight : Thinker
if ( !tagcolor ) tagcolor = CVar.GetCVar('swwm_tagcolor',target.player);
static const Color litecolor[] =
{
Color(255,32,48,24), // Green
Color(255,24,24,48), // Blue
Color(255,24,48,48), // Cyan
Color(255,24,48,32), // Dragonfly
Color(255,48,40,24), // Gold
Color(255,48,24,48), // Magenta
Color(255,48,32,24), // Orange
Color(255,48,40,32), // Peach
Color(255,48,32,40), // Pink
Color(255,32,24,48), // Purple
Color(255,48,24,24), // Red
Color(255,32,24,48), // Violet
Color(255,48,48,48), // White
Color(255,48,48,24) // Yellow
Color(255, 24, 48, 8), // Green
Color(255, 16, 24, 56), // Blue
Color(255, 16, 48, 56), // Cyan
Color(255, 24, 48, 24), // Dragonfly
Color(255, 56, 32, 16), // Gold
Color(255, 48, 16, 56), // Magenta
Color(255, 56, 24, 16), // Orange
Color(255, 56, 32, 32), // Peach
Color(255, 56, 16, 40), // Pink
Color(255, 48, 24, 56), // Purple
Color(255, 48, 16, 8), // Red
Color(255, 32, 16, 56), // Violet
Color(255, 48, 48, 48), // White
Color(255, 56, 56, 16), // Yellow
Color(255, 16, 16, 16), // Black
Color(255, 32, 16, 16) // Rust
};
int idx = tagcolor.GetInt();
if ( (idx < 0) || (idx >= litecolor.Size()) ) idx = 0;
@ -628,9 +631,9 @@ Class DemolitionistSelfLight : Thinker
// setting the pitch to a value outside [-90,90] makes it auto-update to the actor's own pitch
// this is undocumented and it's very great and nice and fine that such a thing had to be found out purely by chance
// how very wonderful /s
if ( curactive && !oldactive )
if ( curactive && (!oldactive || (idx != oldcolor)) )
{
target.A_AttachLight('DemoSelfLight',DynamicLight.PointLight,Color(112,144,176),200,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE|DynamicLight.LF_SPOT,(5,0,target.player?(target.player.viewz-target.pos.z):(target.height*.93)),0,15,60,180);
target.A_AttachLight('DemoSelfLight',DynamicLight.PointLight,Color(255,112,144,176),200,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE|DynamicLight.LF_SPOT,(5,0,target.player?(target.player.viewz-target.pos.z):(target.height*.93)),0,15,60,180);
target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,litecolor[idx],80,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE,(0,0,target.height/2));
}
else if ( !curactive && oldactive )
@ -639,5 +642,6 @@ Class DemolitionistSelfLight : Thinker
target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,0,0,0);
}
oldactive = curactive;
oldcolor = idx;
}
}