Revert "Pistol start tweaks."

This reverts commit 564c99782a.

This actually doesn't work that well, so return to the original method.
This commit is contained in:
Mari the Deer 2022-10-08 17:47:35 +02:00
commit 92f59e4449
16 changed files with 41 additions and 86 deletions

View file

@ -249,9 +249,9 @@ TOOLTIP_SWWM_SWAPWEAPONS = "Allow only one weapon per slot (excluding Deep Impac
TOOLTIP_SWWM_FORCESTATS = "Shows map statistics in the HUD even when the automap isn't open.";
TOOLTIP_SWWM_FUNTRAILS = "Recolors the trails left by slot 5 weapon projectiles.";
TOOLTIP_SWWM_PS_FULLRESET = "Clears your entire inventory, excluding collectibles. May include score reset if enabled separately.";
TOOLTIP_SWWM_PS_RESETAMMO = "Resets all your carried ammo, including what is loaded into your weapons.";
TOOLTIP_SWWM_PS_RESETITEMS = "Removes all usable items from your inventory.";
TOOLTIP_SWWM_PS_RESETHEALTH = "Resets your health back to 100%, and removes all equipped armor.";
TOOLTIP_SWWM_PS_RESETAMMO = "Clears all your carried ammo, excluding what is already loaded into your weapons.";
TOOLTIP_SWWM_PS_RESETITEMS = "Clears all your carried items that aren't weapons or ammo. Excludes equipped armor.";
TOOLTIP_SWWM_PS_RESETHEALTH = "Sets your health back to 100%, and removes all equipped armor.";
TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Sets the skill level for enemy spawns.";
TOOLTIP_SWWM_ITEMSPARKLES = "Nearby items will have particles around them, as a visual aid.";
TOOLTIP_SWWM_SINGLEFIRST = "For weapons that have dual-wield variants, enabling this will always select the single weapon first.";

View file

@ -247,8 +247,8 @@ TOOLTIP_SWWM_SWAPWEAPONS = "Permite solo un arma por puesto (excluyendo Deep Imp
TOOLTIP_SWWM_FORCESTATS = "Muestra estadísticas de mapa en el HUD incluso cuando el automapa no está abierto.";
TOOLTIP_SWWM_FUNTRAILS = "Recolorea los rastros dejados por proyectiles de armas de ranura 5.";
TOOLTIP_SWWM_PS_FULLRESET = "Vacía todo tu inventario, excluyendo coleccionables. Puede incluir el reseteo de puntos si está activado.";
TOOLTIP_SWWM_PS_RESETAMMO = "Resetea toda la munición que llevas, incluyendo la que esté cargada en tus armas.";
TOOLTIP_SWWM_PS_RESETITEMS = "Quita todos los ítems usables del inventario.";
TOOLTIP_SWWM_PS_RESETAMMO = "Vacía toda la munición que llevas, excluyendo la que ya esté cargada en tus armas.";
TOOLTIP_SWWM_PS_RESETITEMS = "Vacía todos los ítems que llevas que no sean armas o munición. Excluye la armadura equipada.";
TOOLTIP_SWWM_PS_RESETHEALTH = "Resetea tu salud de vuelta al 100%, y quita toda la armadura equipada.";
TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Elige el nivel de dificultad para spawns de enemigos.";
TOOLTIP_SWWM_ITEMSPARKLES = "Los ítems cercanos tendrán partículas alrededor, para mejor visibilidad.";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r558 \cu(Sat 8 Oct 15:55:42 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r558 \cu(2022-10-08 15:55:42)\c-";
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r559 \cu(Sat 8 Oct 17:47:35 CEST 2022)\c-";
SWWM_SHORTVER="\cw1.3pre r559 \cu(2022-10-08 17:47:35)\c-";

View file

@ -216,8 +216,6 @@ Class MisterRifle : SWWMWeapon
override void InitializeWeapon()
{
clipcount = default.clipcount;
firemode = 0;
// no round in the chamber
chambered = false;
fired = false;

View file

@ -368,8 +368,6 @@ Class Quadravol : SWWMWeapon
{
charged = false;
chambered = false;
chargelevel = 0;
onehand = false;
clipcount = default.AmmoGive1; // match the ammo that the pickup should give
}

View file

@ -480,7 +480,6 @@ Class CandyGunSpares : SWWMAmmo
let spare = Inventory(Spawn('CandyGun',Owner.Pos,NO_REPLACE));
if ( !spare ) return null;
// spare with empty mag
CandyGun(spare).bInitialized = true;
CandyGun(spare).AmmoGive1 = 0;
CandyGun(spare).clipcount = 0;
CandyGun(spare).chambered = false;

View file

@ -2005,29 +2005,30 @@ Class SWWMUtility
p.health = p.mo.Health = p.mo.SpawnHealth();
}
// resets all carried ammo to its backpack give amount
// sets all carried ammo back to zero
// resets hammerspace capacity
// re-initializes any carried weapons
static play void ResetAmmo( Actor mo )
{
PlayerInfo p = mo.player;
if ( !p || !p.mo ) return;
for ( Inventory i=p.mo.inv; i; i=i.inv )
{
if ( i is 'Ammo' )
if ( (i is 'Ammo') || (i is 'MagAmmo') )
{
i.Amount = Ammo(i).BackpackAmount;
i.MaxAmount = i.default.MaxAmount;
}
else if ( i is 'MagAmmo' )
{
i.Amount = MagAmmo(i).BackpackAmount;
i.MaxAmount = i.default.MaxAmount;
}
else if ( i is 'HammerspaceEmbiggener' )
i.Amount = 0;
else if ( i is 'SWWMWeapon' )
SWWMWeapon(i).InitializeWeapon();
i.MaxAmount = i.default.MaxAmount;
}
if ( i is 'HammerspaceEmbiggener' )
i.Amount = 0;
}
// also gives back any ammo from carried weapons (provided they don't have NOFIRSTGIVE)
for ( Inventory i=p.mo.inv; i; i=i.inv )
{
if ( !(i is 'Weapon') ) continue;
let w = Weapon(i);
if ( (w is 'SWWMWeapon') && SWWMWeapon(w).bNOFIRSTGIVE ) continue;
if ( w.Ammo1 ) w.Ammo1.Amount = min(w.Ammo1.MaxAmount,w.Ammo1.Amount+w.AmmoGive1);
if ( w.Ammo2 && (w.Ammo2 != w.Ammo1) ) w.Ammo2.Amount = min(w.Ammo2.MaxAmount,w.Ammo2.Amount+w.AmmoGive2);
}
}

View file

@ -9,6 +9,24 @@ Class Wallbuster : SWWMWeapon
int whichspin;
transient bool cancelreload;
override void DoEffect()
{
Super.DoEffect();
// push back selection order if weapon is unloaded
if ( !bInitialized )
{
SelectionOrder = default.SelectionOrder;
return;
}
for ( int i=0; i<25; i++ )
{
if ( !loaded[i] || fired[i] ) continue;
SelectionOrder = default.SelectionOrder;
return;
}
SelectionOrder = 1400;
}
override bool ReportHUDAmmo()
{
for ( int i=0; i<25; i++ ) if ( loaded[i] && !fired[i] ) return true;
@ -30,8 +48,6 @@ Class Wallbuster : SWWMWeapon
loaded[i] = (i<5);
for ( int i=0; i<25; i++ )
fired[i] = false;
for ( int i=0; i<6; i++ )
rotation[i] = 0;
}
action void A_CBTFlash( StateLabel flashlabel = null, int index = 0 )
{

View file

@ -225,14 +225,6 @@ Class Eviscerator : SWWMWeapon
s.speed *= .1;
}
override void InitializeWeapon()
{
extended = false;
chambered = false;
pendingload = false;
loadtics = 0;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();

View file

@ -175,14 +175,6 @@ Class Ynykron : SWWMWeapon
return Super.PickupForAmmoSWWM(ownedWeapon);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
chargestate = CS_IDLE;
chargelevel = 0;
inverted = false;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();

View file

@ -304,11 +304,6 @@ Class DeepImpact : SWWMWeapon
A_QuakeEx(1,1,1,2,0,1,"",QF_RELATIVE|QF_SCALEUP,rollIntensity:.05);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();

View file

@ -76,13 +76,9 @@ Class Spreadgun : SWWMWeapon
override void DoEffect()
{
Super.DoEffect();
// push back selection order if a golden shell is loaded (or golden shells are the only available ammo)
if ( bInitialized && ((chambered && !fired && goldload) || ((Ammo1.Amount <= 0) && (Ammo2.Amount > 0))) )
{
SelectionOrder = 1500;
return;
}
SelectionOrder = default.SelectionOrder;
// push back selection order if weapon is unloaded (or has a golden shell loaded)
if ( !bInitialized ) SelectionOrder = default.SelectionOrder;
else SelectionOrder = (chambered&&!fired&&!goldload)?default.SelectionOrder:1500;
}
override bool ReportHUDAmmo()

View file

@ -149,12 +149,6 @@ Class Sparkster : SWWMWeapon
A_StartSound("biospark/fail",CHAN_WEAPON,CHANF_OVERLAP);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
doublestacc = false;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();

View file

@ -316,12 +316,6 @@ Class ExplodiumGun : SWWMWeapon
A_ChangeModel("",1,"","",0,"models","DemoTags"..colname..".png",CMDL_USESURFACESKIN,-1);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
chambered = false;
}
Default
{
Tag "$T_EXPLODIUM";
@ -769,12 +763,6 @@ Class DualExplodiumGun : SWWMWeapon
A_ChangeModel("",3,"","",0,"models","DemoTags"..colname..".png",CMDL_USESURFACESKIN,-1);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
chambered = false;
}
Default
{
Tag "$T_EXPLODIUM2";

View file

@ -344,7 +344,6 @@ Class CandyGun : SWWMWeapon
let spare = Inventory(Spawn('CandyGun',Owner.Pos,NO_REPLACE));
if ( !spare ) return null;
// spare with empty mag
CandyGun(spare).bInitialized = true;
CandyGun(spare).AmmoGive1 = 0;
CandyGun(spare).clipcount = 0;
CandyGun(spare).chambered = false;
@ -358,12 +357,6 @@ Class CandyGun : SWWMWeapon
return Super.CreateTossable(amt);
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
chambered = false;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();

View file

@ -711,13 +711,6 @@ Class SilverBullet : SWWMWeapon
return good;
}
override void InitializeWeapon()
{
clipcount = default.clipcount;
chambered = false;
fired = false;
}
override void MarkPrecacheSounds()
{
Super.MarkPrecacheSounds();