Typo fix.
Readme tweaks. Add support for recoloring player tags through add-ons.
This commit is contained in:
parent
18c47e67eb
commit
1b7f64ee81
8 changed files with 33 additions and 15 deletions
|
|
@ -1457,7 +1457,7 @@ Class SWWMShadow : Actor
|
|||
private void Update( bool nointerpolate = false )
|
||||
{
|
||||
// update scale / alpha
|
||||
if ( ((target is 'Inventory') && Inventory(target).Owner) || target.bKILLED || target.bINVISIBLE || (target.sprite == target.GetSpriteIndex('TNT1')) || (target.sprite == target.GetSpriteIndex('ACLO') )
|
||||
if ( ((target is 'Inventory') && Inventory(target).Owner) || target.bKILLED || target.bINVISIBLE || (target.sprite == target.GetSpriteIndex('TNT1')) || (target.sprite == target.GetSpriteIndex('ACLO')) )
|
||||
alpha = 0.;
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1352,7 +1352,9 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
Screen.DrawText(fnt,Font.CR_RED,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
|
||||
}
|
||||
alph = clamp((deadtimer-60)/60.,0.,1.);
|
||||
str = String.Format(StringTable.Localize("$SWWM_URDED"),CPlayer.GetUserName());
|
||||
String nam = CPlayer.GetUserName();
|
||||
if ( nam == "Player" ) str = StringTable.Localize("$SWWM_URDED_GEN");
|
||||
else str = String.Format(StringTable.Localize("$SWWM_URDED"),nam);
|
||||
fnt = LangFont(mTewiFont);
|
||||
len = fnt.StringWidth(str);
|
||||
xx = int((ss.x-len)/2.);
|
||||
|
|
|
|||
|
|
@ -2865,6 +2865,7 @@ Class DemolitionistSelfLight : Actor
|
|||
{
|
||||
bool oldactive;
|
||||
bool oldglow;
|
||||
transient Color tagcolor;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -2894,6 +2895,18 @@ Class DemolitionistSelfLight : Actor
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( tagcolor.a == 0 )
|
||||
{
|
||||
let lmp = Wads.FindLump("tagcolor.txt");
|
||||
if ( lmp )
|
||||
{
|
||||
String str = Wads.ReadLump(lmp);
|
||||
Array<String> rgb;
|
||||
str.Split(rgb,",",0);
|
||||
tagcolor = Color(255,rgb[0].ToInt(),rgb[1].ToInt(),rgb[2].ToInt());
|
||||
}
|
||||
else tagcolor = Color(255,32,48,24);
|
||||
}
|
||||
bool curactive = activelight();
|
||||
if ( curactive && !oldactive )
|
||||
target.A_AttachLight('DemoSelfLight',DynamicLight.PointLight,Color(56,72,88),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,30,90,target.pitch);
|
||||
|
|
@ -2901,7 +2914,7 @@ Class DemolitionistSelfLight : Actor
|
|||
target.A_RemoveLight('DemoSelfLight');
|
||||
oldactive = curactive;
|
||||
bool curglow = !(target.bINVISIBLE||(target.alpha <= double.epsilon));
|
||||
if ( curglow && !oldglow ) target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,Color(32,48,24),80,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE,(0,0,target.height/2));
|
||||
if ( curglow && !oldglow ) target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,tagcolor,80,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE,(0,0,target.height/2));
|
||||
else if ( !curglow && oldglow ) target.A_RemoveLight('DemoSelfLight2');
|
||||
oldglow = curglow;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue