Add option for blob shadows to only affect mod objects (default).
Minor optimizations of stuff.
This commit is contained in:
parent
b4fe4769d1
commit
905389c495
9 changed files with 66 additions and 43 deletions
|
|
@ -81,5 +81,5 @@ user bool swwm_intermusic = false; // use original intermission music
|
|||
server int swwm_enemydrops = 0; // allow enemies to drop ammo and weapons (-1 - no ammo or weapons, 0 - ammo only, 1 - both)
|
||||
server bool swwm_shotgib = true; // buckshot can gib (some people don't like this for some reason, so it's an option now)
|
||||
user bool swwm_collectanim = true; // player special gestures for collectables (first person only)
|
||||
server bool swwm_shadows = true; // enables blob shadows under certain things
|
||||
server int swwm_shadows = 1; // enables blob shadows under certain things (0 - no shadows, 1 - mod objects, 2 - everything)
|
||||
user bool swwm_precisecrosshair = true; // use mod's own, more precise crosshair
|
||||
|
|
|
|||
|
|
@ -140,6 +140,9 @@ SWWM_DROPS_WEAPONS = "Ammo And Weapons";
|
|||
SWWM_SHOTGIB = "Buckshot can Gib";
|
||||
SWWM_COLLECTANIM = "Collectible Animations";
|
||||
SWWM_SHADOWS = "Simple Shadows";
|
||||
SWWM_SHADOWS_OFF = "None";
|
||||
SWWM_SHADOWS_ON = "Mod Objects";
|
||||
SWWM_SHADOWS_ALL = "Everything";
|
||||
SWWM_PRECISECROSSHAIR = "Precise Crosshair";
|
||||
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.";
|
||||
|
|
|
|||
|
|
@ -140,6 +140,9 @@ SWWM_DROPS_WEAPONS = "Munición y Armas";
|
|||
SWWM_SHOTGIB = "Los Perdigones pueden Desviscerar";
|
||||
SWWM_COLLECTANIM = "Animaciones de Coleccionables";
|
||||
SWWM_SHADOWS = "Sombras Simples";
|
||||
SWWM_SHADOWS_OFF = "Nada";
|
||||
SWWM_SHADOWS_ON = "Objetos de Mod";
|
||||
SWWM_SHADOWS_ALL = "Todo";
|
||||
SWWM_PRECISECROSSHAIR = "Mira Precisa";
|
||||
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.";
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r569 \cu(Fri 23 Oct 20:00:22 CEST 2020)";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r570 \cu(Fri 23 Oct 21:05:00 CEST 2020)";
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ OptionValue "SWWMEnemyDropType"
|
|||
0, "$SWWM_DROPS_AMMO"
|
||||
1, "$SWWM_DROPS_WEAPONS"
|
||||
}
|
||||
OptionValue "SWWMShadows"
|
||||
{
|
||||
0, "$SWWM_SHADOWS_OFF"
|
||||
1, "$SWWM_SHADOWS_ON"
|
||||
2, "$SWWM_SHADOWS_ALL"
|
||||
}
|
||||
OptionMenu "SWWMOptionMenu"
|
||||
{
|
||||
Class "SWWMOptionMenu"
|
||||
|
|
@ -33,7 +39,7 @@ OptionMenu "SWWMOptionMenu"
|
|||
StaticText " "
|
||||
StaticText "$SWWM_OTITLE", "Blue"
|
||||
Option "$SWWM_PRECISECROSSHAIR", "swwm_precisecrosshair", "YesNo"
|
||||
Option "$SWWM_SHADOWS", "swwm_shadows", "YesNo"
|
||||
Option "$SWWM_SHADOWS", "swwm_shadows", "SWWMShadows"
|
||||
Option "$SWWM_BLOOD", "swwm_blood", "YesNo"
|
||||
ScaleSlider "$SWWM_MAXBLOOD", "swwm_maxblood", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||
ScaleSlider "$SWWM_MAXGIBS", "swwm_maxgibs", -1, 1000, 1, "$SWWM_NONE", "$SWWM_UNLIMITED"
|
||||
|
|
|
|||
|
|
@ -1247,13 +1247,6 @@ Class SWWMShadow : Actor
|
|||
}
|
||||
private void Update( bool nointerpolate = false )
|
||||
{
|
||||
double curz = target.CurSector.NextLowestFloorAt(target.pos.x,target.pos.y,target.pos.z);
|
||||
SetOrigin((target.pos.x,target.pos.y,curz),true);
|
||||
if ( nointerpolate )
|
||||
prev = pos;
|
||||
else if ( oldfloor != target.CurSector )
|
||||
prev.z = pos.z; // prevent interpolation of steep height changes
|
||||
oldfloor = target.CurSector;
|
||||
// update scale / alpha
|
||||
if ( (target is 'Inventory') && (Inventory(target).Owner || !target.bSPECIAL) || target.bKILLED || target.bINVISIBLE || (target.sprite == target.GetSpriteIndex('TNT1')) )
|
||||
alpha = 0.;
|
||||
|
|
@ -1264,8 +1257,18 @@ Class SWWMShadow : Actor
|
|||
double bscale = (target.radius/16.)*(1.-min(1.,.003*abs(target.pos.z-pos.z)));
|
||||
A_SetScale(bscale);
|
||||
}
|
||||
// update position
|
||||
double curz = target.CurSector.NextLowestFloorAt(target.pos.x,target.pos.y,target.pos.z);
|
||||
if ( (target.pos.xy == pos.xy) && (pos.z == curz) ) return;
|
||||
SetOrigin((target.pos.x,target.pos.y,curz),true);
|
||||
if ( nointerpolate )
|
||||
prev = pos;
|
||||
else if ( oldfloor != target.CurSector )
|
||||
prev.z = pos.z; // prevent interpolation of steep height changes
|
||||
// update slope alignment
|
||||
SWWMUtility.SetToSlope(self,0);
|
||||
if ( !oldfloor || (oldfloor != target.CurSector) )
|
||||
SWWMUtility.SetToSlope(self,0);
|
||||
oldfloor = target.CurSector;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ Class YnykronDelayedImpact : Actor
|
|||
special1++;
|
||||
if ( special1 < 4 )
|
||||
{
|
||||
if ( tracer ) SetOrigin(level.Vec3Offset(tracer.pos,ofs),true);
|
||||
if ( tracer ) SetOrigin(level.Vec3Offset(tracer.pos,ofs),false);
|
||||
return;
|
||||
}
|
||||
let b = Spawn("YnykronImpact",pos);
|
||||
|
|
|
|||
|
|
@ -1165,11 +1165,11 @@ Class SWWMHandler : EventHandler
|
|||
let hp = Actor.Spawn("HeadpatTracker",e.Thing.pos);
|
||||
hp.target = e.Thing;
|
||||
}
|
||||
if ( !swwm_notrack && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER) && !(e.Thing is 'LampMoth') && !(e.Thing is 'CompanionLamp') ) SWWMCombatTracker.Spawn(e.Thing);
|
||||
if ( swwm_shadows && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER || e.Thing.bCORPSE || (e.Thing is 'Inventory')) )
|
||||
if ( !swwm_notrack && (e.Thing.bSHOOTABLE || e.Thing.bISMONSTER) && !(e.Thing is 'LampMoth') && !(e.Thing is 'CompanionLamp') )
|
||||
SWWMCombatTracker.Spawn(e.Thing);
|
||||
if ( e.Thing.bSHOOTABLE || e.Thing.bISMONSTER || e.Thing.bCORPSE || (e.Thing is 'Inventory') )
|
||||
{
|
||||
// Uncomment once sprite shadows are added in-engine
|
||||
//if ( ((e.Thing is 'Demolitionist') || (e.Thing.SpawnState.sprite == e.Thing.GetSpriteIndex('XZW1'))) )
|
||||
if ( (swwm_shadows == 2) || ((swwm_shadows == 1) && ((e.Thing is 'Demolitionist') || (e.Thing.SpawnState.sprite == e.Thing.GetSpriteIndex('XZW1')))) )
|
||||
SWWMShadow.Track(e.Thing);
|
||||
}
|
||||
}
|
||||
|
|
@ -1200,31 +1200,34 @@ Class SWWMHandler : EventHandler
|
|||
{
|
||||
if ( e.Type == InputEvent.TYPE_KeyDown )
|
||||
{
|
||||
static const int lods[] = {38,24,32,31,24,33,18,50,24,49,18};
|
||||
// what's that spell?
|
||||
// loadsamoney! ... probably
|
||||
if ( e.KeyScan == lods[kcode] )
|
||||
if ( sv_cheats )
|
||||
{
|
||||
kcode++;
|
||||
if ( kcode >= 11 )
|
||||
static const int lods[] = {38,24,32,31,24,33,18,50,24,49,18};
|
||||
// what's that spell?
|
||||
// loadsamoney! ... probably
|
||||
if ( e.KeyScan == lods[kcode] )
|
||||
{
|
||||
SendNetworkEvent("swwmmoneycheat",consoleplayer);
|
||||
kcode = 0;
|
||||
kcode++;
|
||||
if ( kcode >= 11 )
|
||||
{
|
||||
SendNetworkEvent("swwmmoneycheat",consoleplayer);
|
||||
kcode = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else kcode = 0;
|
||||
static const int deep[] = {32,18,18,25,38,24,19,18};
|
||||
// the deepest lore
|
||||
if ( e.KeyScan == deep[lcode] )
|
||||
{
|
||||
lcode++;
|
||||
if ( lcode >= 8 )
|
||||
else kcode = 0;
|
||||
static const int deep[] = {32,18,18,25,38,24,19,18};
|
||||
// the deepest lore
|
||||
if ( e.KeyScan == deep[lcode] )
|
||||
{
|
||||
SendNetworkEvent("swwmlorecheat",consoleplayer);
|
||||
lcode = 0;
|
||||
lcode++;
|
||||
if ( lcode >= 8 )
|
||||
{
|
||||
SendNetworkEvent("swwmlorecheat",consoleplayer);
|
||||
lcode = 0;
|
||||
}
|
||||
}
|
||||
else lcode = 0;
|
||||
}
|
||||
else lcode = 0;
|
||||
if ( e.KeyScan == 33 ) // assuming that's the F key on all keyboards (hopefully)
|
||||
{
|
||||
let demo = Demolitionist(players[consoleplayer].mo);
|
||||
|
|
|
|||
|
|
@ -2598,6 +2598,9 @@ Class ReviveCooldown : Powerup
|
|||
// not an actual light, just handles the attach/detach
|
||||
Class DemolitionistSelfLight : Actor
|
||||
{
|
||||
bool oldactive;
|
||||
bool oldglow;
|
||||
|
||||
Default
|
||||
{
|
||||
+NOGRAVITY;
|
||||
|
|
@ -2623,14 +2626,16 @@ Class DemolitionistSelfLight : Actor
|
|||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( !activelight() )
|
||||
target.A_RemoveLight('DemoSelfLight');
|
||||
else if ( activelight() )
|
||||
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,(12,0,target.player?(target.player.viewz-target.pos.z):(target.height*.93)),0,30,90,target.pitch);
|
||||
if ( target.bINVISIBLE || (target.alpha <= double.epsilon) )
|
||||
target.A_RemoveLight('DemoSelfLight2');
|
||||
else
|
||||
target.A_AttachLight('DemoSelfLight2',DynamicLight.PointLight,Color(32,48,24),80,0,DynamicLight.LF_DONTLIGHTSELF|DynamicLight.LF_ATTENUATE,(0,0,target.height/2));
|
||||
else if ( !curactive && oldactive )
|
||||
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));
|
||||
else if ( !curglow && oldglow ) target.A_RemoveLight('DemoSelfLight2');
|
||||
oldglow = curglow;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3003,7 +3008,7 @@ Class HeadpatTracker : Actor
|
|||
return;
|
||||
}
|
||||
A_SetSize(target.radius+8,target.height+8);
|
||||
SetOrigin(target.pos,false);
|
||||
if ( pos != target.pos ) SetOrigin(target.pos,false);
|
||||
}
|
||||
override bool Used( Actor user )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue