Release Candidate 2:
- Added option to toggle all beta content. - Added option to toggle armor bonuses (for purists). - Added cheap alternate allmap replacer, so there's something else to replace the computer map when the detector isn't allowed. - Small fixes and corrections.
This commit is contained in:
parent
b9478d3fef
commit
7051cb25be
35 changed files with 719 additions and 93 deletions
|
|
@ -11,6 +11,66 @@ Class Betamag : UnrealWeapon
|
|||
int SlaveRefire;
|
||||
double AltAccuracy;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_protomags && (MaxAmount <= 1) ) MaxAmount = 2;
|
||||
else if ( !sting_protomags && (MaxAmount > 1) ) MaxAmount = 1;
|
||||
if ( Owner && !sting_protomags && (Amount > 1) )
|
||||
{
|
||||
// no dual wielding
|
||||
if ( Owner.player.ReadyWeapon == self )
|
||||
{
|
||||
// delete the slave overlay
|
||||
PSprite psp;
|
||||
for ( psp = Owner.player.psprites; psp; psp = psp.next )
|
||||
{
|
||||
if ( (psp.Caller == self) && ((psp.id == 2) || (psp.id == -9998)) ) psp.Destroy();
|
||||
slaveactive = false;
|
||||
slavedown = false;
|
||||
}
|
||||
}
|
||||
Amount = 1;
|
||||
SetTag(StringTable.Localize("$T_AUTOMAG"));
|
||||
}
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("Pistol",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
override bool HandlePickup( Inventory item )
|
||||
{
|
||||
if ( sting_protomags && (item.GetClass() == GetClass()) )
|
||||
|
|
@ -271,27 +331,6 @@ Class Betamag : UnrealWeapon
|
|||
else if ( Amount > 1 ) SelectionOrder = 2200;
|
||||
else SelectionOrder = default.SelectionOrder;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_protomags && (MaxAmount <= 1) ) MaxAmount = 2;
|
||||
else if ( !sting_protomags && (MaxAmount > 1) ) MaxAmount = 1;
|
||||
if ( !Owner || sting_protomags || (Amount <= 1) ) return;
|
||||
// no dual wielding
|
||||
if ( Owner.player.ReadyWeapon == self )
|
||||
{
|
||||
// delete the slave overlay
|
||||
PSprite psp;
|
||||
for ( psp = Owner.player.psprites; psp; psp = psp.next )
|
||||
{
|
||||
if ( (psp.Caller == self) && ((psp.id == 2) || (psp.id == -9998)) ) psp.Destroy();
|
||||
slaveactive = false;
|
||||
slavedown = false;
|
||||
}
|
||||
}
|
||||
Amount = 1;
|
||||
SetTag(StringTable.Localize("$T_AUTOMAG"));
|
||||
}
|
||||
Default
|
||||
{
|
||||
Tag "$T_PROTOMAG";
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@ Class BigAmmo : Ammo
|
|||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_dubious ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_dubious ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_dubious ) return;
|
||||
if ( sting_proto && sting_dubious ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn((GetClass()=="BigAmmo")?"CellPack":"Cell",pos,ALLOW_REPLACE);
|
||||
|
|
@ -237,13 +237,13 @@ Class BigGun : UnrealWeapon
|
|||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_dubious ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_dubious ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_dubious ) return;
|
||||
if ( sting_proto && sting_dubious ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("BFG9000",pos,ALLOW_REPLACE);
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ Class Bonesaw : UnrealWeapon
|
|||
{
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_dubious ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_dubious ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_dubious ) return;
|
||||
if ( sting_proto && sting_dubious ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("Chainsaw",pos,ALLOW_REPLACE);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ Class DefaultAmmo : Ammo
|
|||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.Tick();
|
||||
Super.DoEffect();
|
||||
if ( rechargespeed <= 0. ) rechargespeed = 1.1;
|
||||
rechargephase += 1./rechargespeed;
|
||||
if ( rechargephase < 35 ) return;
|
||||
|
|
|
|||
|
|
@ -316,6 +316,47 @@ Class FlameGun : UnrealWeapon
|
|||
Weapon.AmmoGive 100;
|
||||
UTWeapon.DropAmmo 50;
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("RocketLauncher",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
action void A_FlameGunFire( bool bAlt = false )
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ Class SMiniAmmo : Ammo
|
|||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_dubious ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_dubious ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_dubious ) return;
|
||||
if ( sting_proto && sting_dubious ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
|
|
@ -123,13 +123,13 @@ Class SMiniGun : UnrealWeapon
|
|||
{
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_dubious ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_dubious ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_dubious ) return;
|
||||
if ( sting_proto && sting_dubious ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("BFG9000",pos,ALLOW_REPLACE);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,47 @@ Class ImpalerAmmo : Ammo
|
|||
Ammo.DropAmount 3;
|
||||
+INVENTORY.IGNORESKILL;
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn((GetClass()=="ImpalerAmmo")?"CellPack":"Cell",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -693,6 +734,47 @@ Class Impaler : UnrealWeapon
|
|||
|
||||
property ClipCount : ClipCount;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("PlasmaRifle",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
{
|
||||
return HasGem?ClipCount:-1, -1, (ClipCount<10), false;
|
||||
|
|
|
|||
|
|
@ -90,24 +90,24 @@ Class UnrealBackpack : BackpackItem replaces Backpack
|
|||
Super.DoPickupSpecial(toucher);
|
||||
if ( gameinfo.gametype&GAME_DOOMCHEX )
|
||||
{
|
||||
static const Class<Inventory> xitems[] = {"Flare", "Seeds", "SentryGunItem", "VoiceBox", "ForceField", "Dampener", "Peacemaker"};
|
||||
static const Class<Inventory> xitems[] = {"Flare", "Seeds", "VoiceBox", "ForceField", "Dampener", "Peacemaker", "SentryGunItem"};
|
||||
int xitemn[7];
|
||||
xitemn[0] = max(0,Random[BackpackExtra](-1,3));
|
||||
xitemn[1] = max(0,Random[BackpackExtra](-1,3));
|
||||
xitemn[2] = max(0,Random[BackpackExtra](-2,1));
|
||||
xitemn[3] = max(0,Random[BackpackExtra](-2,1));
|
||||
xitemn[4] = max(0,Random[BackpackExtra](-2,1));
|
||||
xitemn[5] = max(0,Random[BackpackExtra](-1,1));
|
||||
xitemn[4] = max(0,Random[BackpackExtra](-1,1));
|
||||
xitemn[5] = max(0,Random[BackpackExtra](-2,1));
|
||||
xitemn[6] = max(0,Random[BackpackExtra](-2,1));
|
||||
// random doubling
|
||||
if ( !Random[BackpackExtra](0,4) ) xitemn[0] *= 2;
|
||||
if ( !Random[BackpackExtra](0,4) ) xitemn[1] *= 2;
|
||||
if ( !Random[BackpackExtra](0,9) ) xitemn[2] *= 2;
|
||||
if ( !Random[BackpackExtra](0,7) ) xitemn[3] *= 2;
|
||||
if ( !Random[BackpackExtra](0,6) ) xitemn[4] *= 2;
|
||||
if ( !Random[BackpackExtra](0,5) ) xitemn[5] *= 2;
|
||||
if ( !Random[BackpackExtra](0,7) ) xitemn[2] *= 2;
|
||||
if ( !Random[BackpackExtra](0,6) ) xitemn[3] *= 2;
|
||||
if ( !Random[BackpackExtra](0,5) ) xitemn[4] *= 2;
|
||||
if ( !Random[BackpackExtra](0,9) ) xitemn[5] *= 2;
|
||||
if ( !Random[BackpackExtra](0,9) ) xitemn[6] *= 2;
|
||||
for ( int i=0; i<7; i++ )
|
||||
for ( int i=0; i<(sting_proto?7:5); i++ )
|
||||
{
|
||||
if ( xitemn[i] <= 0 ) continue;
|
||||
toucher.GiveInventory(xitems[i],xitemn[i]);
|
||||
|
|
@ -749,13 +749,13 @@ Class BetaFlare : UnrealInventory
|
|||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_flares ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_flares ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_flares ) return;
|
||||
if ( sting_proto && sting_flares ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
|
|
@ -2251,6 +2251,18 @@ Class SentryGunItem : UnrealInventory
|
|||
Inventory.PickupMessage "$I_OSENTRY";
|
||||
Inventory.RespawnTics 1050;
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( pickup ) return false;
|
||||
|
|
@ -2399,6 +2411,11 @@ Class SentryGun : Actor
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( !sting_proto )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
if ( !master && (rememberedplayer != -1) && playeringame[rememberedplayer] )
|
||||
master = players[rememberedplayer].mo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,47 @@ Class FlameAmmo : Ammo
|
|||
Ammo.BackpackMaxAmount 900;
|
||||
Ammo.DropAmount 30;
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("RocketAmmo",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -761,6 +802,47 @@ Class UFlamethrower : UnrealWeapon
|
|||
bool bCharging;
|
||||
double ChargeSize, Count;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("PlasmaRifle",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
{
|
||||
return bCharging?min(5,int(chargesize+0.1)):-1, -1, false, false;
|
||||
|
|
|
|||
|
|
@ -114,6 +114,10 @@ Class OLSMP : UnrealWeapon
|
|||
Destroy();
|
||||
}
|
||||
}
|
||||
override void PlayUpSound( Actor origin )
|
||||
{
|
||||
origin.A_PlaySound(upsound,CHAN_WEAPON,Dampener.Active(origin)?.1:1.,pitch:0.8);
|
||||
}
|
||||
action void A_OLSMPRefire( statelabel flash = null, bool slave = false )
|
||||
{
|
||||
Weapon weap = Weapon(invoker);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,18 @@ Class PeaceAmmo : Ammo
|
|||
Ammo.BackpackAmount 0;
|
||||
Ammo.BackpackMaxAmount 2;
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Class PeaceLight : RocketLight
|
||||
|
|
@ -398,6 +410,18 @@ Class PeaceBarrel : Actor
|
|||
|
||||
Class Peacemaker : UnrealWeapon
|
||||
{
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
action void A_PeacemakerThrow( bool bAlt = false )
|
||||
{
|
||||
let weap = Weapon(invoker);
|
||||
|
|
|
|||
|
|
@ -16,6 +16,47 @@ Class UShells : Ammo
|
|||
if ( PickupMsg.Length() > 0 ) return Super.PickupMessage();
|
||||
return String.Format("%s%d%s",StringTable.Localize("$I_SHELLSL"),Amount,StringTable.Localize("$I_SHELLSR"));
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn((GetClass()=="UShells")?"ShellBox":"Shells",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -96,6 +137,48 @@ Class QuadShot : UnrealWeapon
|
|||
|
||||
property ClipCount : ClipCount;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("Shotgun",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
{
|
||||
return ClipOut?-1:ClipCount, -1, (ClipCount<2), false;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Class StunnerAmmo : Ammo
|
|||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.Tick();
|
||||
Super.DoEffect();
|
||||
if ( rechargespeed <= 0. ) rechargespeed = 2.;
|
||||
rechargephase += 1./rechargespeed;
|
||||
if ( rechargephase < 7 ) return;
|
||||
|
|
@ -20,6 +20,18 @@ Class StunnerAmmo : Ammo
|
|||
rechargephase = 0;
|
||||
Amount = min(Amount+1,MaxAmount);
|
||||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Class StunTrail : Actor
|
||||
|
|
@ -272,6 +284,48 @@ Class Stunner : UnrealWeapon
|
|||
double chargesize, count;
|
||||
bool bCharging;
|
||||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("Chainsaw",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
override int, int, bool, bool GetClipAmount()
|
||||
{
|
||||
return bCharging?min(5,int(chargesize)):-1, -1, false, false;
|
||||
|
|
|
|||
|
|
@ -250,6 +250,49 @@ Class PowerShield : UnrealArmor
|
|||
|
||||
Class UArmorBonus : UArmor
|
||||
{
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_abonus ) return false; // not allowed
|
||||
bool valid = Super.TryPickup(toucher);
|
||||
if ( valid ) level.allmap = true;
|
||||
return valid;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_abonus ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("ArmorBonus",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
||||
{
|
||||
absorb = Clamp(Amount-50,25,100);
|
||||
|
|
|
|||
|
|
@ -183,15 +183,21 @@ Class UPlayer : UTPlayer
|
|||
{
|
||||
// force akimbo
|
||||
let t = FindInventory(type);
|
||||
if ( t ) t.Amount = 2;
|
||||
t.SetTag(StringTable.Localize("$T_AUTOMAG2"));
|
||||
if ( t )
|
||||
{
|
||||
t.Amount = 2;
|
||||
t.SetTag(StringTable.Localize("$T_AUTOMAG2"));
|
||||
}
|
||||
}
|
||||
else if ( (type is 'Betamag') && sting_protomags )
|
||||
{
|
||||
// force akimbo
|
||||
let t = FindInventory(type);
|
||||
if ( t ) t.Amount = 2;
|
||||
t.SetTag(StringTable.Localize("$T_PROTOMAG2"));
|
||||
if ( t )
|
||||
{
|
||||
t.Amount = 2;
|
||||
t.SetTag(StringTable.Localize("$T_PROTOMAG2"));
|
||||
}
|
||||
}
|
||||
else if ( type is 'DispersionPistol' )
|
||||
{
|
||||
|
|
@ -952,29 +958,29 @@ Class UnrealMainHandler : EventHandler
|
|||
{
|
||||
if ( (e.Replacee == 'Chainsaw') || (e.Replacee == 'Gauntlets') )
|
||||
{
|
||||
if ( (sting_dubious || sting_olsmp) && !Random[Replacements](0,3) ) e.Replacement = 'WeaponPowerUp';
|
||||
else if ( Random[Replacements](0,2) )
|
||||
if ( ((sting_proto && sting_dubious) || sting_olsmp) && !Random[Replacements](0,sting_proto?3:1) ) e.Replacement = 'WeaponPowerUp';
|
||||
else if ( sting_proto && Random[Replacements](0,2) )
|
||||
{
|
||||
if ( sting_dubious && Random[Replacements](0,1) ) e.Replacement = 'Bonesaw';
|
||||
else e.Replacement = 'Stunner';
|
||||
}
|
||||
else if ( !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
else if ( sting_proto && !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
else e.Replacement = 'Automag';
|
||||
}
|
||||
else if ( (e.Replacee == 'Fist') || (e.Replacee == 'Staff') ) e.Replacement = 'DispersionPistol';
|
||||
else if ( (e.Replacee == 'Pistol') || (e.Replacee == 'GoldWand') )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
if ( sting_proto && !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
else e.Replacement = 'Automag';
|
||||
}
|
||||
else if ( (e.Replacee == 'Shotgun') || (e.Replacee == 'SuperShotgun') || (e.Replacee == 'Crossbow') )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) && (e.Replacee != 'SuperShotgun') )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
if ( sting_proto && !Random[Replacements](0,2) ) e.Replacement = 'Betamag';
|
||||
else e.Replacement = 'Automag';
|
||||
}
|
||||
else switch( Random[Replacements](0,2) )
|
||||
else switch( Random[Replacements](0,sting_proto?2:1) )
|
||||
{
|
||||
case 0:
|
||||
e.Replacement = 'Stinger';
|
||||
|
|
@ -994,7 +1000,7 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'RocketLauncher') || (e.Replacee == 'PhoenixRod') )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) )
|
||||
if ( sting_proto && !Random[Replacements](0,3) )
|
||||
{
|
||||
if ( Random[Replacements](0,1) ) e.Replacement = 'UFlamethrower';
|
||||
else e.Replacement = 'FlameGun';
|
||||
|
|
@ -1004,14 +1010,14 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'PlasmaRifle') || (e.Replacee == 'SkullRod') )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'Impaler';
|
||||
if ( sting_proto && !Random[Replacements](0,2) ) e.Replacement = 'Impaler';
|
||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'URifle';
|
||||
else e.Replacement = 'UBioRifle';
|
||||
}
|
||||
else if ( (e.Replacee == 'BFG9000') || (e.Replacee == 'Mace') )
|
||||
{
|
||||
if ( sting_olsmp && (!sting_dubious || Random[Replacements](0,1)) ) e.Replacement = 'OLSMP';
|
||||
else if ( sting_dubious )
|
||||
if ( sting_olsmp && (!sting_proto || !sting_dubious || Random[Replacements](0,1)) ) e.Replacement = 'OLSMP';
|
||||
else if ( sting_proto && sting_dubious )
|
||||
{
|
||||
if ( Random[Replacements](0,1) ) e.Replacement = 'SMiniGun';
|
||||
else e.Replacement = 'BigGun';
|
||||
|
|
@ -1033,7 +1039,7 @@ Class UnrealMainHandler : EventHandler
|
|||
else if ( (e.Replacee == 'Shell') || (e.Replacee == 'CrossbowAmmo') )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'UClip';
|
||||
else switch( Random[Replacements](0,2) )
|
||||
else switch( Random[Replacements](0,sting_proto?2:1) )
|
||||
{
|
||||
case 0:
|
||||
e.Replacement = 'StingerAmmo';
|
||||
|
|
@ -1048,7 +1054,7 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'ShellBox') || (e.Replacee == 'CrossbowHefty') )
|
||||
{
|
||||
switch( Random[Replacements](0,2) )
|
||||
switch( Random[Replacements](0,sting_proto?2:1) )
|
||||
{
|
||||
case 0:
|
||||
e.Replacement = 'StingerAmmo2';
|
||||
|
|
@ -1063,7 +1069,7 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'RocketAmmo') || (e.Replacee == 'PhoenixRodAmmo') || (e.Replacee == 'MaceAmmo') )
|
||||
{
|
||||
if ( !Random[Replacements](0,4) ) e.Replacement = 'FlameAmmo';
|
||||
if ( sting_proto && !Random[Replacements](0,4) ) e.Replacement = 'FlameAmmo';
|
||||
else if ( Random[Replacements](0,1) )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) ) e.Replacement = 'UFlakBox';
|
||||
|
|
@ -1077,18 +1083,18 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'RocketBox') || (e.Replacee == 'PhoenixRodHefty') || (e.Replacee == 'MaceHefty') )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) ) e.Replacement = 'FlameAmmo';
|
||||
if ( sting_proto && !Random[Replacements](0,3) ) e.Replacement = 'FlameAmmo';
|
||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'UFlakBox';
|
||||
else e.Replacement = 'URocketAmmo';
|
||||
}
|
||||
else if ( (e.Replacee == 'Cell') || (e.Replacee == 'SkullRodAmmo') )
|
||||
{
|
||||
if ( sting_dubious && !Random[Replacements](0,4) )
|
||||
if ( sting_proto && sting_dubious && !Random[Replacements](0,4) )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'BigAmmo2';
|
||||
else e.Replacement = 'BigAmmo3';
|
||||
}
|
||||
else if ( !Random[Replacements](0,3) )
|
||||
else if ( sting_proto && !Random[Replacements](0,3) )
|
||||
{
|
||||
if ( !Random[Replacements](0,3) ) e.Replacement = 'ImpalerAmmo';
|
||||
else e.Replacement = 'ImpalerAmmo2';
|
||||
|
|
@ -1106,12 +1112,12 @@ Class UnrealMainHandler : EventHandler
|
|||
}
|
||||
else if ( (e.Replacee == 'CellPack') || (e.Replacee == 'SkullRodHefty') )
|
||||
{
|
||||
if ( sting_dubious && !Random[Replacements](0,4) )
|
||||
if ( sting_proto && sting_dubious && !Random[Replacements](0,4) )
|
||||
{
|
||||
if ( !Random[Replacements](0,2) ) e.Replacement = 'BigAmmo';
|
||||
else e.Replacement = 'BigAmmo2';
|
||||
}
|
||||
else if ( !Random[Replacements](0,3) ) e.Replacement = 'ImpalerAmmo';
|
||||
else if ( sting_proto && !Random[Replacements](0,3) ) e.Replacement = 'ImpalerAmmo';
|
||||
else if ( sting_olsmp && !Random[Replacements](0,2) ) e.Replacement = 'OLSMPAmmo';
|
||||
else if ( Random[Replacements](0,1) ) e.Replacement = 'UBioAmmo';
|
||||
else e.Replacement = 'URifleAmmo';
|
||||
|
|
@ -1120,13 +1126,17 @@ Class UnrealMainHandler : EventHandler
|
|||
else if ( (e.Replacee == 'Berserk') || (e.Replacee == 'ArtiTomeOfPower') )
|
||||
{
|
||||
if ( sting_msentry && !Random[Replacements](0,9) ) e.Replacement = 'SentryItem';
|
||||
else if ( (sting_dubious || sting_olsmp) && !Random[Replacements](0,2) ) e.Replacement = 'WeaponPowerUp';
|
||||
else if ( ((sting_proto && sting_dubious) || sting_olsmp) && !Random[Replacements](0,2) ) e.Replacement = 'WeaponPowerUp';
|
||||
else e.Replacement = 'Amplifier';
|
||||
}
|
||||
else if ( e.Replacee == 'ArtiEgg' ) e.Replacement = 'VoiceBox';
|
||||
else if ( (e.Replacee == 'Soulsphere') || (e.Replacee == 'ArtiSuperHealth') ) e.Replacement = 'SuperHealth';
|
||||
else if ( e.Replacee == 'Megasphere' ) e.Replacement = 'ShieldBelt';
|
||||
else if ( (e.Replacee == 'Allmap') || (e.Replacee == 'SuperMap') ) e.Replacement = 'MotionDetector';
|
||||
else if ( (e.Replacee == 'Allmap') || (e.Replacee == 'SuperMap') )
|
||||
{
|
||||
if ( sting_proto && Random[Replacements](0,2) ) e.Replacement = 'MotionDetector';
|
||||
else e.Replacement = 'UAllMap';
|
||||
}
|
||||
else if ( (e.Replacee == 'BlurSphere') || (e.Replacee == 'ArtiInvisibility') ) e.Replacement = 'UInvisibility';
|
||||
else if ( (e.Replacee == 'Infrared') || (e.Replacee == 'ArtiTorch') ) e.Replacement = 'UFlashlight';
|
||||
else if ( e.Replacee == 'RadSuit' ) e.Replacement = 'UJumpBoots';
|
||||
|
|
@ -1134,7 +1144,7 @@ Class UnrealMainHandler : EventHandler
|
|||
else if ( (e.Replacee == 'Backpack') || (e.Replacee == 'BagOfHolding') ) e.Replacement = 'UnrealBackpack';
|
||||
else if ( (e.Replacee == 'ArmorBonus') || (e.Replacee == 'ArtiTimeBomb') )
|
||||
{
|
||||
if ( Random[Replacements](0,3) ) e.Replacement = 'UArmorBonus';
|
||||
if ( sting_abonus && Random[Replacements](0,3) ) e.Replacement = 'UArmorBonus';
|
||||
else e.Replacement = 'Flare';
|
||||
}
|
||||
else if ( (e.Replacee == 'HealthBonus') || (e.Replacee == 'CrystalVial') ) e.Replacement = 'Bandages';
|
||||
|
|
@ -1150,7 +1160,7 @@ Class UnrealMainHandler : EventHandler
|
|||
else if ( e.Replacee == 'ArtiTeleport' )
|
||||
{
|
||||
// I have no idea what to replace this with, so just have some random stuff
|
||||
switch( Random[Replacements](0,7) )
|
||||
switch( Random[Replacements](0,sting_proto?7:5) )
|
||||
{
|
||||
case 0:
|
||||
e.Replacement = 'UnrealBackpack';
|
||||
|
|
@ -1208,6 +1218,19 @@ Class UnrealMainHandler : EventHandler
|
|||
else if ( e.Replacee is 'EnhancedShockAmmo' ) e.Replacement = 'UNothing';
|
||||
else if ( e.Replacee is 'UTBackpack' ) e.Replacement = 'UnrealBackpack';
|
||||
else if ( e.Replacee is 'UDamage' ) e.Replacement = 'Amplifier';
|
||||
else if ( e.Replacee is 'UTInvisibility' ) e.Replacement = 'UInvisibility';
|
||||
else if ( e.Replacee is 'UTShieldBelt' ) e.Replacement = 'ShieldBelt';
|
||||
else if ( e.Replacee is 'UTBodyArmor' ) e.Replacement = 'UArmor';
|
||||
else if ( e.Replacee is 'UTThighPads' ) e.Replacement = 'KevlarSuit';
|
||||
else if ( e.Replacee is 'UTArmorBonus' )
|
||||
{
|
||||
if ( sting_abonus ) e.Replacement = 'UArmorBonus';
|
||||
else e.Replacement = 'Flare';
|
||||
}
|
||||
else if ( (e.Replacee is 'UTMedBox') || (e.Replacee is 'UTHealthBox') ) e.Replacement = 'UHealth';
|
||||
else if ( e.Replacee is 'UTHealthPack' ) e.Replacement = 'SuperHealth';
|
||||
else if ( e.Replacee is 'UTHealthBonus' ) e.Replacement = 'Bandages';
|
||||
else if ( e.Replacee is 'UTJumpBoots' ) e.Replacement = 'UJumpBoots';
|
||||
// we don't need these
|
||||
else if ( e.Replacee is 'UTActivatable' ) e.Replacement = 'UNothing';
|
||||
else if ( e.Replacee is 'UTActivatableHealth' ) e.Replacement = 'UNothing';
|
||||
|
|
@ -1218,9 +1241,9 @@ Class UnrealMainHandler : EventHandler
|
|||
{
|
||||
if ( flak_translocator )
|
||||
players[e.playernumber].mo.TakeInventory("Translocator",1);
|
||||
if ( sting_telegun )
|
||||
if ( sting_proto && sting_telegun )
|
||||
players[e.playernumber].mo.GiveInventory("UTranslocator",1);
|
||||
if ( sting_flares )
|
||||
if ( sting_proto && sting_flares )
|
||||
{
|
||||
players[e.playernumber].mo.GiveInventory("LightFlare",1);
|
||||
players[e.playernumber].mo.GiveInventory("DarkFlare",1);
|
||||
|
|
@ -1241,14 +1264,14 @@ Class UnrealMainHandler : EventHandler
|
|||
players[i].mo.TakeInventory("Translocator",1);
|
||||
}
|
||||
}
|
||||
if ( sting_telegun )
|
||||
if ( sting_proto && sting_telegun )
|
||||
{
|
||||
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] )
|
||||
{
|
||||
players[i].mo.GiveInventory("UTranslocator",1);
|
||||
}
|
||||
}
|
||||
if ( sting_flares )
|
||||
if ( sting_proto && sting_flares )
|
||||
{
|
||||
for ( int i=0; i<MAXPLAYERS; i++ ) if ( playeringame[i] )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -319,6 +319,28 @@ Class UJumpBoots : UnrealInventory
|
|||
}
|
||||
}
|
||||
|
||||
// cheap replacement when proto content disabled
|
||||
Class UAllMap : MapRevealer
|
||||
{
|
||||
Default
|
||||
{
|
||||
Tag "$T_ALLMAP";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.MaxAmount 0;
|
||||
Inventory.Icon "I_Detect";
|
||||
Inventory.PickupSound "misc/p_pkup";
|
||||
Inventory.PickupMessage "$I_ALLMAP";
|
||||
Inventory.RespawnTics 1050;
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
PMAP ABCDCB 6;
|
||||
Loop;
|
||||
}
|
||||
}
|
||||
|
||||
Class MotionDetector : UnrealInventory
|
||||
{
|
||||
ui TextureID DetHud, DetSpot[2];
|
||||
|
|
@ -328,7 +350,6 @@ Class MotionDetector : UnrealInventory
|
|||
{
|
||||
Tag "$T_DETECTOR";
|
||||
+COUNTITEM;
|
||||
+INVENTORY.BIGPOWERUP;
|
||||
+INVENTORY.ALWAYSPICKUP;
|
||||
Inventory.MaxAmount 1;
|
||||
Inventory.Icon "I_Detect";
|
||||
|
|
@ -338,10 +359,47 @@ Class MotionDetector : UnrealInventory
|
|||
}
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_proto ) return false; // not allowed
|
||||
bool valid = Super.TryPickup(toucher);
|
||||
if ( valid ) level.allmap = true;
|
||||
return valid;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_proto ) return;
|
||||
if ( !Owner )
|
||||
{
|
||||
let r = Spawn("AllMap",pos,ALLOW_REPLACE);
|
||||
r.spawnangle = spawnangle;
|
||||
r.spawnpoint = spawnpoint;
|
||||
r.angle = angle;
|
||||
r.pitch = pitch;
|
||||
r.roll = roll;
|
||||
r.special = special;
|
||||
r.args[0] = args[0];
|
||||
r.args[1] = args[1];
|
||||
r.args[2] = args[2];
|
||||
r.args[3] = args[3];
|
||||
r.args[4] = args[4];
|
||||
r.ChangeTid(tid);
|
||||
r.SpawnFlags = SpawnFlags&~MTF_SECRET;
|
||||
r.HandleSpawnFlags();
|
||||
r.SpawnFlags = SpawnFlags;
|
||||
r.bCountSecret = SpawnFlags&MTF_SECRET;
|
||||
r.vel = vel;
|
||||
r.master = master;
|
||||
r.target = target;
|
||||
r.tracer = tracer;
|
||||
r.bDropped = bDropped;
|
||||
Destroy();
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
}
|
||||
override void PostRender( double lbottom )
|
||||
{
|
||||
if ( !bActive ) return;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Class UTranslocatorAmmo : Ammo
|
|||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_telegun ) return;
|
||||
if ( sting_proto && sting_telegun ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
|
|
@ -132,13 +132,13 @@ Class UTranslocator : UnrealWeapon
|
|||
|
||||
override bool TryPickup( in out Actor toucher )
|
||||
{
|
||||
if ( !sting_telegun ) return false; // not allowed
|
||||
if ( !sting_proto || !sting_telegun ) return false; // not allowed
|
||||
return Super.TryPickup(toucher);
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( sting_telegun ) return;
|
||||
if ( sting_proto && sting_telegun ) return;
|
||||
if ( Owner ) Owner.RemoveInventory(self);
|
||||
Destroy();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue