Remaining Ynykron weapon sounds added (actual schutt effects, and their sounds, to come later).
Adjusted price of crystal boxes, reasonable considering their rarity. Subtract prices of obtained ammo from sold weapons. Give pickup sounds CHANF_OVERLAP (unless happening on the same tic, e.g.: items occupying the same space). Ragekit now heals like Berserk Pack on activation. Jump height accounts for Ragekit being active.
This commit is contained in:
parent
f69a3b1ab8
commit
d1413da608
22 changed files with 178 additions and 28 deletions
|
|
@ -190,6 +190,7 @@ Class RedShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -250,6 +251,7 @@ Class GreenShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -303,6 +305,7 @@ Class WhiteShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -349,6 +352,7 @@ Class BlueShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -395,6 +399,7 @@ Class BlackShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -434,6 +439,7 @@ Class PurpleShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -506,6 +512,7 @@ Class GoldShell : Ammo
|
|||
{
|
||||
Mixin SWWMShellAmmo;
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
action void A_GoldShellTrail()
|
||||
{
|
||||
|
|
@ -540,6 +547,7 @@ Class GoldShell : Ammo
|
|||
Class EvisceratorShell : Ammo
|
||||
{
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -578,6 +586,7 @@ Class EvisceratorSixPack : EvisceratorShell
|
|||
Class HellblazerMissiles : Ammo
|
||||
{
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -611,6 +620,7 @@ Class HellblazerMissileMag : HellblazerMissiles
|
|||
Class HellblazerCrackshots : Ammo
|
||||
{
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -644,6 +654,7 @@ Class HellblazerCrackshotMag : HellblazerCrackshots
|
|||
Class HellblazerRavagers : Ammo
|
||||
{
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -677,6 +688,7 @@ Class HellblazerRavagerMag : HellblazerRavagers
|
|||
Class HellblazerWarheads : Ammo
|
||||
{
|
||||
Mixin SWWMAmmo;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -713,6 +725,8 @@ Class HellblazerWarheadMag : HellblazerWarheads
|
|||
|
||||
Class SparkUnit : Ammo
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_SPARKUNIT";
|
||||
|
|
@ -740,6 +754,8 @@ Class SparkUnit : Ammo
|
|||
|
||||
Class SilverBulletAmmo : Ammo
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_XSBMAG";
|
||||
|
|
@ -767,6 +783,8 @@ Class SilverBulletAmmo : Ammo
|
|||
|
||||
Class CandyGunAmmo : Ammo
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_CANDYMAG";
|
||||
|
|
@ -807,11 +825,13 @@ Class CandyGunSpares : Ammo
|
|||
|
||||
Class YnykronAmmo : Ammo
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_YNYKRONAMMO";
|
||||
Inventory.PickupMessage "$T_YNYKRONAMMO";
|
||||
Stamina 1000000;
|
||||
Stamina 3000000;
|
||||
Inventory.Icon "graphics/HUD/Icons/A_Ynykron.png";
|
||||
Inventory.Amount 1;
|
||||
Inventory.MaxAmount 1;
|
||||
|
|
@ -834,6 +854,8 @@ Class YnykronAmmo : Ammo
|
|||
|
||||
Class AmmoFabricator : Inventory abstract
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
int budget, pertype, maxunitprice;
|
||||
|
||||
Property Budget : budget;
|
||||
|
|
@ -1045,6 +1067,7 @@ Class FabricatorTier4 : AmmoFabricator
|
|||
|
||||
Class HammerspaceEmbiggener : Inventory
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
bool cheatedin;
|
||||
|
||||
override void SetGiveAmount( Actor receiver, int amount, bool givecheat )
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ enum ESWWMGZChannels
|
|||
CHAN_JETPACK = 63206, // jetpack sound
|
||||
CHAN_ITEMEXTRA = 63207, // additional item sounds
|
||||
CHAN_WEAPONEXTRA2 = 63208, // additional weapon sound slot
|
||||
CHAN_DAMAGE = 63209, // used for impact/hit sounds
|
||||
CHAN_AMBEXTRA = 63210 // player ambience when submerged
|
||||
CHAN_WEAPONEXTRA3 = 63209, // additional weapon sound slot (again)
|
||||
CHAN_DAMAGE = 63210, // used for impact/hit sounds
|
||||
CHAN_AMBEXTRA = 63211 // player ambience when submerged
|
||||
};
|
||||
|
||||
// Misc. Utility code
|
||||
|
|
@ -1897,6 +1898,7 @@ Class SWWMHandler : EventHandler
|
|||
transient int highesttic;
|
||||
transient Array<QueuedFlash> flashes;
|
||||
transient Array<LastLine> lastlines;
|
||||
transient int lastpickuptic[MAXPLAYERS];
|
||||
SWWMCombatTracker trackers;
|
||||
SWWMScoreObj scorenums, damnums;
|
||||
SWWMInterest intpoints;
|
||||
|
|
|
|||
|
|
@ -73,8 +73,22 @@ Class Ynykron : SWWMWeapon
|
|||
|
||||
action void A_YnykronFire()
|
||||
{
|
||||
A_StopSound(CHAN_WEAPONEXTRA2);
|
||||
A_SWWMFlash();
|
||||
A_StopSound(CHAN_WEAPONEXTRA2);
|
||||
A_StartSound(invoker.inverted?"ynykron/altfire":"ynykron/fire",CHAN_WEAPON,CHANF_OVERLAP,1.,.0);
|
||||
// alert everyone in the entire map
|
||||
int ns = level.Sectors.Size();
|
||||
for ( int i=0; i<ns; i++ )
|
||||
{
|
||||
Sector s = level.Sectors[i];
|
||||
for ( Actor a=s.thinglist; a; a=a.snext )
|
||||
a.LastHeard = self;
|
||||
}
|
||||
A_QuakeEx(9,9,9,25,0,1,"",QF_RELATIVE|QF_SCALEDOWN,rollIntensity:2.5);
|
||||
A_ZoomFactor(.7,ZOOM_INSTANT);
|
||||
A_ZoomFactor(1.);
|
||||
A_PlayerFire();
|
||||
SWWMHandler.DoFlash(self,Color(120,255,255,255),30);
|
||||
A_Overlay(PSP_WEAPON+1,"FireSmoke");
|
||||
A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true);
|
||||
A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add);
|
||||
|
|
@ -95,7 +109,6 @@ Class Ynykron : SWWMWeapon
|
|||
if ( (Owner.player.ReadyWeapon != self) && (Owner.player == players[consoleplayer]) )
|
||||
Console.Printf(StringTable.Localize("$SWWM_YNYKRONREADY"));
|
||||
chargestate = CS_READY;
|
||||
ventcooldown = 0;
|
||||
}
|
||||
if ( Owner.player.ReadyWeapon == self )
|
||||
Owner.A_SoundVolume(CHAN_WEAPONEXTRA2,(.025*chargelevel)**3.);
|
||||
|
|
@ -169,31 +182,41 @@ Class Ynykron : SWWMWeapon
|
|||
if ( invoker.chargestate == CS_CHARGING )
|
||||
flg |= WRF_NOPRIMARY;
|
||||
A_WeaponReady(flg);
|
||||
if ( invoker.chargelevel >= 40. )
|
||||
if ( invoker.chargelevel >= 20. )
|
||||
{
|
||||
invoker.ventcooldown--;
|
||||
if ( invoker.ventcooldown <= 0 )
|
||||
return ResolveState("ReadyVent");
|
||||
}
|
||||
if ( player.cmd.buttons&BT_ATTACK )
|
||||
invoker.CheckAmmo(EitherFire,true);
|
||||
return ResolveState(null);
|
||||
}
|
||||
Wait;
|
||||
ReadyVent:
|
||||
XZW2 A 1
|
||||
{
|
||||
invoker.ventcooldown = Random[Ynykron](6,15)*5;
|
||||
invoker.ventcooldown = Random[Ynykron](10,15)*5+2*(40-int(invoker.chargelevel));
|
||||
A_Overlay(PSP_WEAPON+1,"ReadyVentSmoke");
|
||||
A_OverlayFlags(PSP_WEAPON+1,PSPF_RENDERSTYLE|PSPF_ALPHA|PSPF_FORCESTYLE|PSPF_FORCEALPHA,true);
|
||||
A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add);
|
||||
A_OverlayAlpha(PSP_WEAPON+1,0.);
|
||||
A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
A_StartSound("ynykron/ventopen",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZWA ABCDEFGHI 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
XZWA ABCDEF 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
XZWA G 2
|
||||
{
|
||||
A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
A_StartSound("ynykron/ventclose",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZWA HI 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
Goto Ready;
|
||||
ReadyVentSmoke:
|
||||
XZWB D 1
|
||||
{
|
||||
invoker.ventfade = .3;
|
||||
A_StartSound("ynykron/puff",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZWB EF 2;
|
||||
XZWB G 2
|
||||
|
|
@ -210,15 +233,19 @@ Class Ynykron : SWWMWeapon
|
|||
if ( invoker.chargestate == CS_IDLE )
|
||||
return ResolveState("Charge");
|
||||
A_YnykronFire();
|
||||
A_StartSound("ynykron/ventopen",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
return ResolveState(null);
|
||||
}
|
||||
XZW3 JK 2;
|
||||
XZW3 LMNOPQR 3;
|
||||
XZW3 LMNOP 3;
|
||||
XZW3 Q 3 A_StartSound("ynykron/ventclose",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW3 R 3;
|
||||
Goto Ready;
|
||||
FireSmoke:
|
||||
XZWA J 1
|
||||
{
|
||||
invoker.ventfade = .3;
|
||||
A_StartSound("ynykron/puff",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZWA KLMNO 2;
|
||||
XZWA P 3
|
||||
|
|
@ -234,7 +261,13 @@ Class Ynykron : SWWMWeapon
|
|||
return A_JumpIf(invoker.inverted,"TakeInverted");
|
||||
}
|
||||
TakeNormal:
|
||||
XZW3 STUVWXYZ 2;
|
||||
XZW3 STU 2;
|
||||
XZW3 V 2
|
||||
{
|
||||
A_StartSound("ynykron/magout",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_PlayerReload();
|
||||
}
|
||||
XZW3 WXYZ 2;
|
||||
XZW4 ABCDEFGHIJKLMNO 2;
|
||||
XZW4 P 0
|
||||
{
|
||||
|
|
@ -242,7 +275,13 @@ Class Ynykron : SWWMWeapon
|
|||
}
|
||||
Goto PutInverted;
|
||||
TakeInverted:
|
||||
XZW5 PQRSTUVWXYZ 2;
|
||||
XZW5 PQRS 2;
|
||||
XZW5 T 2
|
||||
{
|
||||
A_StartSound("ynykron/magout",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_PlayerReload();
|
||||
}
|
||||
XZW5 UVWXYZ 2;
|
||||
XZW6 ABCDEFGHIJKLM 2;
|
||||
XZW6 N 0
|
||||
{
|
||||
|
|
@ -250,13 +289,17 @@ Class Ynykron : SWWMWeapon
|
|||
}
|
||||
Goto PutNormal;
|
||||
PutNormal:
|
||||
XZW4 PQRSTUVWXYZ 2;
|
||||
XZW4 PQRS 2;
|
||||
XZW4 T 2 A_StartSound("ynykron/magin",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW4 UVWXYZ 2;
|
||||
XZW5 A 2 A_StartSound("ynykron/meleeend",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW5 BCDEFGHIJK 2;
|
||||
XZW5 L 4;
|
||||
Goto Ready;
|
||||
PutInverted:
|
||||
XZW6 NOPQRSTUVWXY 2;
|
||||
XZW6 NOPQ 2;
|
||||
XZW6 R 2 A_StartSound("ynykron/magin",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW6 STUVWXY 2;
|
||||
XZW6 Z 2 A_StartSound("ynykron/meleeend",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW7 ABCDEFGHIJ 2;
|
||||
XZW7 K 4;
|
||||
|
|
@ -264,7 +307,8 @@ Class Ynykron : SWWMWeapon
|
|||
Goto Ready;
|
||||
Discharge:
|
||||
XZW2 A 2;
|
||||
XZW7 NOP 2;
|
||||
XZW7 NO 2;
|
||||
XZW7 P 2 A_StartSound("ynykron/latch",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW7 Q 2
|
||||
{
|
||||
invoker.chargestate = CS_DISCHARGING;
|
||||
|
|
@ -273,6 +317,7 @@ Class Ynykron : SWWMWeapon
|
|||
A_OverlayRenderStyle(PSP_WEAPON+1,STYLE_Add);
|
||||
A_OverlayAlpha(PSP_WEAPON+1,0.);
|
||||
A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
A_StartSound("ynykron/ventopen",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZW7 RSTUV 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
XZW7 W 2
|
||||
|
|
@ -282,12 +327,18 @@ Class Ynykron : SWWMWeapon
|
|||
}
|
||||
Wait;
|
||||
XZW7 W 3 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
XZW7 XYZ 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
XZW7 X 2
|
||||
{
|
||||
A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
A_StartSound("ynykron/ventclose",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZW7 YZ 2 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH);
|
||||
Goto Ready;
|
||||
DischargeSmoke:
|
||||
XZWA T 2
|
||||
{
|
||||
invoker.ventfade = .3;
|
||||
A_StartSound("ynykron/puffing",CHAN_WEAPONEXTRA3,CHANF_LOOPING);
|
||||
}
|
||||
XZWA UVWXY 2;
|
||||
XZWA Z 2 A_JumpIf(invoker.chargestate==CS_IDLE,1);
|
||||
|
|
@ -295,15 +346,23 @@ Class Ynykron : SWWMWeapon
|
|||
XZWA Z 3
|
||||
{
|
||||
invoker.ventfade = -.1;
|
||||
A_SoundVolume(CHAN_WEAPONEXTRA3,.8);
|
||||
A_StartSound("ynykron/puffend",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
}
|
||||
XZWB ABCD 2;
|
||||
XZWB A 2 A_SoundVolume(CHAN_WEAPONEXTRA3,.6);
|
||||
XZWB B 2 A_SoundVolume(CHAN_WEAPONEXTRA3,.4);
|
||||
XZWB C 2 A_SoundVolume(CHAN_WEAPONEXTRA3,.2);
|
||||
XZWB D 2 A_StopSound(CHAN_WEAPONEXTRA3);
|
||||
Stop;
|
||||
Charge:
|
||||
XZW2 A 2;
|
||||
XZW3 BCDEFGHI 2;
|
||||
XZW3 BC 2;
|
||||
XZW3 D 2 A_StartSound("ynykron/latch",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW3 EFGHI 2;
|
||||
XZW2 A 0
|
||||
{
|
||||
invoker.chargestate = CS_CHARGING;
|
||||
invoker.ventcooldown = Random[Ynykron](6,15);
|
||||
A_StartSound("ynykron/ready",CHAN_WEAPONEXTRA2,CHANF_LOOPING,.01,2.);
|
||||
}
|
||||
Goto Ready;
|
||||
|
|
@ -316,7 +375,9 @@ Class Ynykron : SWWMWeapon
|
|||
return ResolveState(null);
|
||||
}
|
||||
UnloadNormal:
|
||||
XZW3 STUVWXYZ 2;
|
||||
XZW3 STU 2;
|
||||
XZW3 V 2 A_StartSound("ynykron/magout",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW3 WXYZ 2;
|
||||
XZW4 ABCDEFGHIJKLMNO 2;
|
||||
XZW4 P 0
|
||||
{
|
||||
|
|
@ -324,10 +385,13 @@ Class Ynykron : SWWMWeapon
|
|||
invoker.Ammo1.Amount = max(invoker.Ammo1.Amount-1,0);
|
||||
invoker.clipcount = 1;
|
||||
invoker.inverted = false;
|
||||
// no mag is dropped, depleted crystals are hazardous and should be disposed of properly
|
||||
}
|
||||
Goto PutNormal;
|
||||
UnloadInverted:
|
||||
XZW5 PQRSTUVWXYZ 2;
|
||||
XZW5 PQRS 2;
|
||||
XZW5 T 2 A_StartSound("ynykron/magout",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
XZW5 UVWXYZ 2;
|
||||
XZW6 ABCDEFGHIJKLM 2;
|
||||
XZW6 N 0
|
||||
{
|
||||
|
|
@ -335,6 +399,7 @@ Class Ynykron : SWWMWeapon
|
|||
invoker.Ammo1.Amount = max(invoker.Ammo1.Amount-1,0);
|
||||
invoker.clipcount = 1;
|
||||
invoker.inverted = false;
|
||||
// no mag is dropped, depleted crystals are hazardous and should be disposed of properly
|
||||
}
|
||||
Goto PutNormal;
|
||||
Zoom:
|
||||
|
|
@ -342,6 +407,7 @@ Class Ynykron : SWWMWeapon
|
|||
{
|
||||
invoker.ventcooldown = Random[Ynykron](6,15);
|
||||
A_StartSound("ynykron/checkout",CHAN_WEAPON,CHANF_OVERLAP);
|
||||
A_PlayerCheckGun();
|
||||
}
|
||||
XZW8 ABCDEFGHIJKLMNOPQRSTUVW 2;
|
||||
XZW8 X 4; // smoothen more
|
||||
|
|
|
|||
|
|
@ -20,6 +20,28 @@ Mixin Class SWWMAutoUseFix
|
|||
}
|
||||
}
|
||||
|
||||
Mixin Class SWWMOverlapPickupSound
|
||||
{
|
||||
// overlap sounds
|
||||
override void PlayPickupSound( Actor toucher )
|
||||
{
|
||||
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
|
||||
if ( hnd )
|
||||
{
|
||||
if ( hnd.lastpickuptic[toucher.PlayerNumber()] == gametic )
|
||||
return; // don't play if picked up on the same exact tic (overlapping items)
|
||||
hnd.lastpickuptic[toucher.PlayerNumber()] = gametic;
|
||||
}
|
||||
double atten;
|
||||
int flags = CHANF_OVERLAP|CHANF_MAYBE_LOCAL;
|
||||
if ( bNoAttenPickupSound ) atten = ATTN_NONE;
|
||||
else atten = ATTN_NORM;
|
||||
if ( toucher && toucher.CheckLocalView() )
|
||||
flags |= CHANF_NOPAUSE;
|
||||
toucher.A_StartSound(PickupSound,CHAN_ITEM,flags,1.,atten);
|
||||
}
|
||||
}
|
||||
|
||||
// Base class for all SWWM Armors
|
||||
Class SWWMArmor : Armor abstract
|
||||
{
|
||||
|
|
@ -148,6 +170,7 @@ Class SWWMArmor : Armor abstract
|
|||
Class SWWMSpareArmor : Inventory abstract
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Class<SWWMArmor> giveme;
|
||||
|
||||
|
|
@ -186,6 +209,7 @@ Class SWWMSpareArmor : Inventory abstract
|
|||
Class SWWMHealth : Inventory abstract
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
// can't use the Health class for whatever reason
|
||||
// nice parser you got there I guess?
|
||||
|
|
@ -907,6 +931,8 @@ Class UseLineTracer : LineTracer
|
|||
// Base class for all SWWM Weapons
|
||||
Class SWWMWeapon : Weapon abstract
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
private int SWeaponFlags;
|
||||
Actor pfield; // instance of parry field for current melee attack
|
||||
|
||||
|
|
@ -916,12 +942,28 @@ Class SWWMWeapon : Weapon abstract
|
|||
{
|
||||
if ( (GetClass() == item.GetClass()) )
|
||||
{
|
||||
int oldammo1 = Ammo1?Ammo1.Amount:0;
|
||||
int oldammo2 = Ammo2?Ammo2.Amount:0;
|
||||
if ( Weapon(item).PickupForAmmo(self) )
|
||||
item.bPickupGood = true;
|
||||
if ( (Amount+item.Amount > MaxAmount) && (Stamina > 0) )
|
||||
{
|
||||
// sell excess
|
||||
int sellprice = SWWMUtility.Round100(Stamina*.7);
|
||||
int sellprice = Stamina;
|
||||
// subtract prices of ammo given
|
||||
if ( Ammo1 )
|
||||
{
|
||||
int ammogiven1 = Ammo1.Amount-oldammo1;
|
||||
if ( ammogiven1 > 0 )
|
||||
sellprice -= int(Ammo1.Stamina*(1.+.5*(ammogiven1-1)));
|
||||
}
|
||||
if ( Ammo2 )
|
||||
{
|
||||
int ammogiven2 = Ammo2.Amount-oldammo2;
|
||||
if ( ammogiven2 > 0 )
|
||||
sellprice -= int(Ammo2.Stamina*(1.+.5*(ammogiven2-1)));
|
||||
}
|
||||
sellprice = SWWMUtility.Round100(sellprice*.7);
|
||||
SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD);
|
||||
SWWMCredits.Give(Owner.player,sellprice);
|
||||
if ( Owner.player )
|
||||
|
|
@ -952,6 +994,7 @@ Class SWWMWeapon : Weapon abstract
|
|||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA2);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA3);
|
||||
Super.DetachFromOwner();
|
||||
}
|
||||
override void OwnerDied()
|
||||
|
|
@ -961,6 +1004,7 @@ Class SWWMWeapon : Weapon abstract
|
|||
Owner.A_StopSound(CHAN_WEAPON);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA2);
|
||||
Owner.A_StopSound(CHAN_WEAPONEXTRA3);
|
||||
}
|
||||
A_ClearRefire();
|
||||
Super.OwnerDied();
|
||||
|
|
|
|||
|
|
@ -1559,14 +1559,15 @@ Class SWWMKnowledgeBaseMenu : GenericMenu
|
|||
int price = int(inv.Stamina*(1.+.5*(amt-1)));
|
||||
if ( type is 'Ammo' )
|
||||
{
|
||||
// get the largest affordable child pickup amount
|
||||
int maxneed = cur.MaxAmount-cur.Amount;
|
||||
// get the largest affordable child pickup amount (that we need)
|
||||
for ( int j=0; j<AllActorClasses.Size(); j++ )
|
||||
{
|
||||
let type2 = (Class<Ammo>)(AllActorClasses[j]);
|
||||
if ( !type2 || (type2.GetParentClass() != type) ) continue;
|
||||
let inv2 = GetDefaultByType(type2);
|
||||
int cprice = int(inv.Stamina*(1.+.5*(inv2.Amount-1)));
|
||||
if ( (inv2.Amount > amt) && (cprice <= SWWMCredits.Get(players[consoleplayer])) )
|
||||
if ( (inv2.Amount > amt) && (inv2.Amount <= maxneed) && (cprice <= SWWMCredits.Get(players[consoleplayer])) )
|
||||
{
|
||||
price = cprice;
|
||||
amt = inv2.Amount;
|
||||
|
|
|
|||
|
|
@ -924,6 +924,7 @@ Class Demolitionist : PlayerPawn
|
|||
}
|
||||
}
|
||||
if ( jumpfac > 0 ) jumpvelz *= jumpfac;
|
||||
if ( FindInventory("RagekitPower") ) jumpvelz *= 2.;
|
||||
double pvelz = vel.z;
|
||||
if ( !player.onground && !(player.cheats&CF_PREDICTING) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ Class GrilledCheeseSafeguard : Powerup
|
|||
Class GrilledCheeseSandwich : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override Inventory CreateCopy( Actor other )
|
||||
{
|
||||
|
|
@ -254,6 +255,7 @@ Class GhostArtifactX : Actor
|
|||
Class GhostArtifact : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
Default
|
||||
{
|
||||
|
|
@ -398,6 +400,7 @@ Class GravityX : GhostArtifactX
|
|||
Class GravitySuppressor : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
|
|
@ -611,6 +614,7 @@ Class InvinciballX : GhostArtifactX
|
|||
Class FuckingInvinciball : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override Inventory CreateCopy( Actor other )
|
||||
{
|
||||
|
|
@ -855,11 +859,13 @@ Class RagekitX : GhostArtifactX
|
|||
Class Ragekit : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( pickup && !deathmatch ) return false;
|
||||
if ( pickup && ((Owner.player == players[consoleplayer]) || bBigPowerup) ) Owner.A_StartSound(UseSound,CHAN_ITEMEXTRA);
|
||||
Owner.GiveBody(-100); // full base health
|
||||
let r = RagekitPower(Owner.FindInventory("RagekitPower"));
|
||||
if ( r )
|
||||
{
|
||||
|
|
@ -908,6 +914,8 @@ Class Ragekit : Inventory
|
|||
|
||||
Class Omnisight : Inventory
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( !level.allmap )
|
||||
|
|
@ -1455,6 +1463,8 @@ Class CompanionLamp : Actor
|
|||
|
||||
Class SWWMLamp : Inventory
|
||||
{
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
bool bActive;
|
||||
TextureID OnIcon;
|
||||
Actor thelamp;
|
||||
|
|
@ -1685,6 +1695,7 @@ Class BarrierPower : PowerIronFeet
|
|||
Class EBarrier : Inventory
|
||||
{
|
||||
Mixin SWWMAutoUseFix;
|
||||
Mixin SWWMOverlapPickupSound;
|
||||
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -853,7 +853,10 @@ Class CandyGun : SWWMWeapon
|
|||
if ( !spareget )
|
||||
{
|
||||
// sell excess
|
||||
int sellprice = SWWMUtility.Round100(Stamina*.7);
|
||||
int sellprice = Stamina;
|
||||
// subtract price of ammo given
|
||||
if ( ammoget ) sellprice -= Ammo1.Stamina;
|
||||
sellprice = SWWMUtility.Round100(sellprice*.7);
|
||||
SWWMScoreObj.Spawn(sellprice,Owner.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+Owner.Height/2),Font.CR_GOLD);
|
||||
SWWMCredits.Give(Owner.player,sellprice);
|
||||
if ( Owner.player )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue