Several changes from devel once more:

- Fuck it, Quadravol will be lever action.
 - Tiny cleanup.
 - Rewrite the weapon replacement system (less of a mess now maybe?).
 - Some menu fixes.
 - Minimap zoom increments like in the Common Library.
 - Add missing sound definition for Safety Tether.
   (This mostly went unnoticed because it's VERY rare to have it play)
 - Shift Sparkster x3 (DLC2) to slot 7.
   This way you can have both it and the Quadravol simultaneously.
   It would be unfair to not let you hold both "iconic" UnSX weapons at once.
 - Small lore tweak on Quadravol stance swap.
 - Fix off-by-one bug in looping palette lights.
 - Re-do logo shader. Use separate layer textures.
 - Fix Elemental Coating breaking "End Level" damage sectors.
(This will be the last batch of changes before I continue working on menus)
This commit is contained in:
Mari the Deer 2021-12-08 18:14:18 +01:00
commit 4d7019ae86
41 changed files with 287 additions and 186 deletions

View file

@ -207,17 +207,6 @@ Class SWWMAmmo : Ammo
return Super.HandlePickup(item);
}
override void DoEffect()
{
Super.DoEffect();
// drop excess ammo
if ( !sv_infiniteammo && !Owner.FindInventory('PowerInfiniteAmmo') )
{
int excess = Amount-MaxAmount;
if ( excess > 0 ) CreateTossable(excess);
}
}
override bool CanPickup( Actor toucher )
{
// don't allow picking up ammo for weapons we can't pick up
@ -486,12 +475,6 @@ Class MagAmmo : Inventory abstract
override void DoEffect()
{
Super.DoEffect();
// drop excess ammo
if ( !sv_infiniteammo && !Owner.FindInventory('PowerInfiniteAmmo') )
{
int excess = Amount-MaxAmount;
if ( excess > 0 ) CreateTossable(excess);
}
if ( !pamo )
{
pamo = Ammo(Owner.FindInventory(ParentAmmo));

View file

@ -2174,6 +2174,33 @@ Class BarrierPower : PowerIronFeet
if ( !snd ) snd = Spawn("BarrierSnd",Owner.pos);
snd.target = Owner;
snd.master = self;
// break ourselves if we're in an endlevel sector
bool endlv = false;
for ( int i=0; i<Owner.CurSector.Get3DFloorCount(); i++ )
{
F3DFloor ff = Owner.CurSector.Get3DFloor(i);
if ( !(ff.flags&(F3DFloor.FF_EXISTS|F3DFloor.FF_SWIMMABLE)) ) continue;
if ( (ff.model.DamageAmount <= 0) || (ff.model.damageinterval <= 0) ) continue;
if ( ff.top.ZAtPoint(Owner.pos.xy) <= Owner.pos.z ) continue;
if ( ff.bottom.ZAtPoint(Owner.pos.xy) >= (Owner.pos.z+Owner.Height) ) continue;
if ( !(ff.model.flags&Sector.SECF_ENDLEVEL) ) continue;
endlv = true;
break;
}
if ( !endlv && (Owner.pos.z <= Owner.floorz) )
{
bool damageterrain = false;
if ( (Owner.floorsector.damageamount > 0) && (Owner.floorsector.damageinterval > 0) ) damageterrain = true;
else
{
let t = Owner.GetFloorTerrain();
if ( t && (t.DamageAmount > 0) && (t.DamageTimeMask > 0) )
damageterrain = true;
}
if ( damageterrain && (Owner.floorsector.flags&Sector.SECF_ENDLEVEL) ) endlv = true;
}
if ( !endlv ) return;
EffectTics = min(0,EffectTics);
}
}
@ -2226,6 +2253,7 @@ Class EBarrier : Inventory
override void DoEffect()
{
Super.DoEffect();
if ( !Owner || (Owner.Health <= 0) ) return;
// check terrain for auto-use
let b = Powerup(Owner.FindInventory("BarrierPower"));
if ( b && (b.EffectTics > 5) )
@ -2234,6 +2262,7 @@ Class EBarrier : Inventory
return;
}
bool damageterrain = false;
bool endlevelterrain = false;
// check any 3d floors first
for ( int i=0; i<Owner.CurSector.Get3DFloorCount(); i++ )
{
@ -2242,6 +2271,7 @@ Class EBarrier : Inventory
if ( (ff.model.DamageAmount <= 0) || (ff.model.damageinterval <= 0) ) continue;
if ( ff.top.ZAtPoint(Owner.pos.xy) <= Owner.pos.z ) continue;
if ( ff.bottom.ZAtPoint(Owner.pos.xy) >= (Owner.pos.z+Owner.Height) ) continue;
if ( ff.model.flags&Sector.SECF_ENDLEVEL ) endlevelterrain = true;
damageterrain = true;
break;
}
@ -2254,7 +2284,10 @@ Class EBarrier : Inventory
if ( t && (t.DamageAmount > 0) && (t.DamageTimeMask > 0) )
damageterrain = true;
}
if ( damageterrain && (Owner.floorsector.flags&Sector.SECF_ENDLEVEL) ) endlevelterrain = true;
}
// do not auto-use for these
if ( endlevelterrain ) return;
if ( !damageterrain )
{
terrainwait = max(0,terrainwait-1);