More deathmatch stuff.
This commit is contained in:
parent
8e3a26487c
commit
3dd2b45f2a
14 changed files with 64 additions and 12 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r543 \cu(Wed 16 Jun 17:47:21 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r543 \cu(2021-06-16 17:47:21)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r544 \cu(Wed 16 Jun 20:31:35 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw0.9.11b-pre r544 \cu(2021-06-16 20:31:35)\c-";
|
||||
|
|
|
|||
|
|
@ -936,6 +936,7 @@ misc/orbexplode sounds/ORBEXPLODE.ogg
|
|||
misc/omgfart sounds/omgfart.ogg
|
||||
misc/voice sounds/dlgvoice.ogg
|
||||
misc/sewercount sounds/sewercount.ogg
|
||||
misc/frag sounds/GFRAG.ogg
|
||||
misc/gibber1 sounds/general/Gib1.ogg
|
||||
misc/gibber2 sounds/general/Gib2.ogg
|
||||
misc/gibber3 sounds/general/Gib3.ogg
|
||||
|
|
|
|||
BIN
sounds/GFRAG.ogg
Normal file
BIN
sounds/GFRAG.ogg
Normal file
Binary file not shown.
|
|
@ -209,7 +209,13 @@ extend Class SWWMHandler
|
|||
// scoring
|
||||
int score = min(1000,int(ceil(e.Thing.GetSpawnHealth()*.05)*10));
|
||||
// player score is always the same
|
||||
if ( e.Thing.player ) score = 1000;
|
||||
if ( e.Thing.player )
|
||||
{
|
||||
score = 1000;
|
||||
// deathmatch frag sound
|
||||
if ( src.player == players[consoleplayer] )
|
||||
S_StartSound("misc/frag",CHAN_WEAPON,CHANF_UI|CHANF_NOPAUSE|CHANF_OVERLAP,1.,ATTN_NONE);
|
||||
}
|
||||
SWWMScoreObj scr = null;
|
||||
if ( src.player == players[consoleplayer] )
|
||||
scr = SWWMScoreObj.Spawn(score,e.Thing.Vec3Offset(0,0,e.Thing.Height/2));
|
||||
|
|
|
|||
|
|
@ -214,6 +214,9 @@ extend Class SWWMHandler
|
|||
for ( int i=0; i<level.lines.Size(); i++ )
|
||||
{
|
||||
Line l = level.lines[i];
|
||||
// all lines are immediately visible in DM
|
||||
if ( deathmatch && !(l.flags&Line.ML_DONTDRAW) )
|
||||
l.flags |= Line.ML_MAPPED;
|
||||
// while we're at it, add teleporter sparks
|
||||
if ( SWWMUtility.IsTeleportLine(l) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -556,7 +556,13 @@ Class HammerspaceEmbiggener : Inventory
|
|||
|
||||
// used when cheating or trading, this version does not give ammo and is meant
|
||||
// only for GiveInventory, so it shouldn't be spawned in the world
|
||||
Class TradedHammerspaceEmbiggener : HammerspaceEmbiggener {}
|
||||
Class TradedHammerspaceEmbiggener : HammerspaceEmbiggener
|
||||
{
|
||||
Default
|
||||
{
|
||||
-COUNTITEM;
|
||||
}
|
||||
}
|
||||
|
||||
// used to denote "merged" embiggeners, changes color based on amount
|
||||
// green (2+)
|
||||
|
|
|
|||
|
|
@ -5,9 +5,15 @@ Mixin Class SWWMAutoUseFix
|
|||
{
|
||||
if ( GetClass() == item.GetClass() )
|
||||
{
|
||||
if ( Use(true) ) Amount--;
|
||||
if ( deathmatch && !bALWAYSPICKUP )
|
||||
{
|
||||
// don't allow picking up any more than just one copy in DM unless it can be auto-used
|
||||
if ( Use(true) ) Amount--;
|
||||
else return true;
|
||||
}
|
||||
else if ( Use(true) ) Amount--;
|
||||
// sell excess if there's a price
|
||||
if ( bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) )
|
||||
if ( !deathmatch && bALWAYSPICKUP && (Amount+item.Amount > MaxAmount) && (Stamina != 0) )
|
||||
{
|
||||
int sellprice = int(abs(Stamina)*.5);
|
||||
SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2));
|
||||
|
|
@ -18,6 +24,16 @@ Mixin Class SWWMAutoUseFix
|
|||
}
|
||||
return Super.HandlePickup(item);
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !deathmatch ) return Super.TryPickup(toucher);
|
||||
// pretend to have a max amount of 0 so we can only be picked up if we can be used
|
||||
int oldmax = MaxAmount;
|
||||
MaxAmount = 0;
|
||||
bool ret = Super.TryPickup(toucher);
|
||||
MaxAmount = oldmax;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Class CrossLineFinder : LineTracer
|
||||
|
|
|
|||
|
|
@ -1280,6 +1280,11 @@ Class Omnisight : Inventory
|
|||
}
|
||||
return false;
|
||||
}
|
||||
override bool ShouldSpawn()
|
||||
{
|
||||
if ( deathmatch ) return false;
|
||||
return Super.ShouldSpawn();
|
||||
}
|
||||
Default
|
||||
{
|
||||
//$Title Omnisight
|
||||
|
|
@ -1913,6 +1918,11 @@ Class SWWMLamp : Inventory
|
|||
Amount++;
|
||||
return true;
|
||||
}
|
||||
override bool ShouldSpawn()
|
||||
{
|
||||
if ( deathmatch ) return false;
|
||||
return Super.ShouldSpawn();
|
||||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
|
|
|
|||
|
|
@ -314,8 +314,11 @@ Class DemolitionistMenu : GenericMenu
|
|||
tabs.Push(TAB_MISSION);
|
||||
tabs.Push(TAB_STATS);
|
||||
tabs.Push(TAB_INVENTORY);
|
||||
tabs.Push(TAB_KEYS);
|
||||
tabs.Push(TAB_LIBRARY);
|
||||
if ( !deathmatch )
|
||||
{
|
||||
tabs.Push(TAB_KEYS);
|
||||
tabs.Push(TAB_LIBRARY);
|
||||
}
|
||||
if ( !deathmatch && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4) ) tabs.Push(TAB_STORE);
|
||||
for ( int i=0; i<MAXPLAYERS; i++ )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -428,6 +428,13 @@ Class Demolitionist : PlayerPawn
|
|||
let cs = Inventory(Spawn('SWWMChaosSphere'));
|
||||
cs.AttachToOwner(self);
|
||||
}
|
||||
// in deathmatch, we start with 8 embiggeners
|
||||
if ( deathmatch )
|
||||
{
|
||||
let em = Inventory(Spawn('TradedHammerspaceEmbiggener'));
|
||||
em.Amount = em.MaxAmount;
|
||||
if ( !em.CallTryPickup(self) ) em.Destroy();
|
||||
}
|
||||
bInDefaultInventory = false;
|
||||
}
|
||||
override void ClearInventory()
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ Class SWWMLoreLibrary : Thinker
|
|||
|
||||
static void Add( PlayerInfo p, String ref )
|
||||
{
|
||||
if ( PreVerify(ref) ) return;
|
||||
if ( deathmatch || PreVerify(ref) ) return;
|
||||
SWWMLoreLibrary ll = Find(p);
|
||||
if ( !ll )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ Class SWWMWeapon : Weapon abstract
|
|||
{
|
||||
if ( SWWMWeapon(item).PickupForAmmoSWWM(self) )
|
||||
item.bPickupGood = true;
|
||||
if ( (Amount+item.Amount > MaxAmount) && (item.Stamina > 0) )
|
||||
if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (item.Stamina > 0) )
|
||||
{
|
||||
// sell excess
|
||||
int sellprice = item.Stamina/2;
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Class ExplodiumGun : SWWMWeapon
|
|||
return true;
|
||||
if ( (item.GetClass() == 'ExplodiumGun') && !item.ShouldStay() )
|
||||
{
|
||||
if ( (Amount+item.Amount > MaxAmount) && (Stamina > 0) )
|
||||
if ( !deathmatch && (Amount+item.Amount > MaxAmount) && (Stamina > 0) )
|
||||
{
|
||||
// sell excess
|
||||
int sellprice = int(Stamina*.5);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Class CandyGun : SWWMWeapon
|
|||
[ammoget, spareget] = CandyGun(item).PickupForAmmoAndSpares(self);
|
||||
if ( ammoget || spareget )
|
||||
item.bPickupGood = true;
|
||||
if ( !spareget )
|
||||
if ( !deathmatch && !spareget )
|
||||
{
|
||||
// sell excess
|
||||
int sellprice = item.Stamina/2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue