Player self-light tweaks.
This commit is contained in:
parent
cca2f20f12
commit
2e12edfc3e
2 changed files with 9 additions and 27 deletions
|
|
@ -1,2 +1,2 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r782 \cu(Fri 22 Jan 19:59:30 CET 2021)";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r783 \cu(Fri 22 Jan 20:18:02 CET 2021)";
|
||||
|
|
|
|||
|
|
@ -2943,14 +2943,15 @@ Class DemolitionistSelfLight : Actor
|
|||
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);
|
||||
// have to re-attach it repeatedly to update the pitch (wow great thanks)
|
||||
if ( curactive )
|
||||
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,target.pitch);
|
||||
else if ( !curactive && oldactive )
|
||||
target.A_RemoveLight('DemoSelfLight');
|
||||
target.A_AttachLight('DemoSelfLight',DynamicLight.PointLight,0,0,0);
|
||||
oldactive = curactive;
|
||||
bool curglow = !(target.bINVISIBLE||(target.alpha <= double.epsilon));
|
||||
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');
|
||||
else if ( !curglow && oldglow ) target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,0,0,0);
|
||||
oldglow = curglow;
|
||||
}
|
||||
}
|
||||
|
|
@ -3064,24 +3065,6 @@ Class LoveHeartBurstLight : PaletteLight
|
|||
}
|
||||
}
|
||||
|
||||
Class LoveHeartLight : PointLightAttenuated
|
||||
{
|
||||
Default
|
||||
{
|
||||
Args 255,176,208,80;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( target || target.InStateSequence(target.CurState,target.FindState("Death")) )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
SetOrigin(target.pos,true);
|
||||
}
|
||||
}
|
||||
|
||||
Class LoveHeart : Actor
|
||||
{
|
||||
Default
|
||||
|
|
@ -3210,10 +3193,7 @@ Class LoveHeart : Actor
|
|||
{
|
||||
Super.PostBeginPlay();
|
||||
A_StartSound("misc/heart",CHAN_WEAPON);
|
||||
//A_AttachLight('LOVELIGHT',DynamicLight.PointLight,Color(255,176,208),80,80,DYNAMICLIGHT.LF_ATTENUATE);
|
||||
// can't use Attach/RemoveLight for now due to heavy performance issues
|
||||
let l = Spawn("LoveHeartLight",pos);
|
||||
l.target = self;
|
||||
A_AttachLight('LOVELIGHT',DynamicLight.PointLight,Color(255,176,208),80,80,DYNAMICLIGHT.LF_ATTENUATE);
|
||||
special2 = 25;
|
||||
}
|
||||
action void A_HeartBurst()
|
||||
|
|
@ -3235,6 +3215,8 @@ Class LoveHeart : Actor
|
|||
raging.DoHitFX();
|
||||
}
|
||||
A_SetRenderStyle(1.,STYLE_Add);
|
||||
// RemoveLight causes heavy performance issues, just overwrite with a "blank light"
|
||||
A_AttachLight('LOVELIGHT',DynamicLight.PointLight,0,0,0);
|
||||
//A_RemoveLight('LOVELIGHT');
|
||||
CheckSplash(40);
|
||||
A_QuakeEx(2,2,2,8,0,300,"",QF_RELATIVE|QF_SCALEDOWN);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue