I think with this all vanilla usable items are done.
However the SCUBA Gear won't spawn yet because a certain PR is needed.
This commit is contained in:
parent
b12c4a4112
commit
ad20f46db7
9 changed files with 163 additions and 7 deletions
|
|
@ -39,6 +39,8 @@ Doom Tournament (currently the devel branch is required).
|
|||
- Flare (replaces armor bonus)
|
||||
- Flashlight (replaces light amplifier)
|
||||
- Searchlight (must be placed manually for balance reasons)
|
||||
- Jump Boots (replaces radsuit)
|
||||
- SCUBA Gear (replaces radsuit if map has swimmable water)
|
||||
|
||||
## In progress
|
||||
|
||||
|
|
@ -48,9 +50,6 @@ Doom Tournament (currently the devel branch is required).
|
|||
- Minigun (slot 0) (replaces chaingun)
|
||||
- SMP 7243 (slot 0) (replaces bfg9000)
|
||||
|
||||
- Jump Boots (replaces radsuit)
|
||||
- SCUBA Gear (replaces radsuit if map has swimmable water)
|
||||
|
||||
## Planned
|
||||
|
||||
- Unreal Bible & prototype build behaviour restoration
|
||||
|
|
|
|||
|
|
@ -74,3 +74,5 @@ server bool sting_olsmp = false; // adds the stupid oldskool SMP 7243 to
|
|||
// this weapon is dumb, but just for
|
||||
// the sake of completion it's there as
|
||||
// an option
|
||||
server bool sting_autoscuba = false; // SCUBA gear toggles automatically
|
||||
// when needed
|
||||
|
|
@ -207,6 +207,8 @@ STING_UOPTS = "Compatibility options";
|
|||
STING_DPISTOL = "Dispersion Pistol altfire isn't upgraded";
|
||||
STING_PSHIELD = "Power Shield does not drain over time";
|
||||
STING_NOPSTART = "Players don't start up with an Automag";
|
||||
STING_QOPTS = "Convenience features";
|
||||
STING_AUTOSCUBA = "Automatic SCUBA Gear toggling";
|
||||
STING_OLSMP = "Enable SMP 7243 from Oldskool Amp'd";
|
||||
STING_MCREDS = "Unreal Credits";
|
||||
STING_CDR = "Doomreal";
|
||||
|
|
@ -407,6 +409,8 @@ STING_DPISTOL = "El fuego alternativo de la Pistola de Dispersión no es mejorad
|
|||
STING_PSHIELD = "El Escudo de Fuerza no pierde carga con el tiempo";
|
||||
STING_NOPSTART = "Los jugadores no empiezan la partida con un Automag";
|
||||
STING_OLSMP = "Habilitar SMP 7243 de Oldskool Amp'd";
|
||||
STING_QOPTS = "Características de comodidad";
|
||||
STING_AUTOSCUBA = "Uso automático de Kit de Buceo";
|
||||
STING_MCREDS = "Créditos de Unreal";
|
||||
STING_CDR = "Doomreal";
|
||||
STING_CLEAD = "Desarrolladora Jefe:";
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ OptionMenu "UnrealOptionMenu"
|
|||
Option "$STING_PSHIELD", "sting_pshield", "YesNo"
|
||||
Option "$STING_NOPSTART", "sting_nopstart", "YesNo"
|
||||
Option "$STING_OLSMP", "sting_olsmp", "YesNo"
|
||||
StaticText " "
|
||||
StaticText "$STING_QOPTS", "Gold"
|
||||
Option "$STING_AUTOSCUBA", "sting_autoscuba", "YesNo"
|
||||
}
|
||||
|
||||
AddOptionMenu "OptionsMenu"
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Model "FlameGun"
|
|||
|
||||
FrameIndex FGNP B 1 0
|
||||
|
||||
ZOffset 9
|
||||
ZOffset 12
|
||||
ROTATING
|
||||
FrameIndex FGNP A 1 0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,6 +206,10 @@ univis/toggle invisibl
|
|||
|
||||
lite/off fshlite2
|
||||
|
||||
scuba/stop scubada1
|
||||
scuba/water scubal1
|
||||
scuba/air scubal2
|
||||
|
||||
automag/select cocking
|
||||
automag/fire shot
|
||||
automag/click click
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ Class HitListEntry
|
|||
{
|
||||
Actor hitactor;
|
||||
Vector3 hitlocation, x;
|
||||
int hitdamage;
|
||||
}
|
||||
|
||||
Class BigTracer : LineTracer
|
||||
|
|
@ -65,6 +66,14 @@ Class BigTracer : LineTracer
|
|||
double penetration; // please don't laugh
|
||||
}
|
||||
|
||||
Class BigCasing : UTCasing
|
||||
{
|
||||
Default
|
||||
{
|
||||
BounceSound "flak/bounce"; // much heavier sound
|
||||
}
|
||||
}
|
||||
|
||||
Class BigGun : UnrealWeapon
|
||||
{
|
||||
Default
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ Class UnrealHUD : BaseStatusBar
|
|||
if ( (HUDMode == 5) || !SelectedItem ) return;
|
||||
Count++;
|
||||
if ( Count > 20 ) Count = 0;
|
||||
if ( !Next && !bDrawOne ) x += 32; // this was missing from the original, causing a gap when there's only two items in the inventory
|
||||
if ( Prev && !Next && !bDrawOne ) x += 32; // this was missing from the original, causing a gap when there's only two items in the inventory
|
||||
if ( Prev )
|
||||
{
|
||||
bRed = ((Prev is 'UnrealInventory') && UnrealInventory(Prev).bActive) || (Prev is 'Powerup') || ((Prev is 'UTranslator') && bFlashTranslator);
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ Class AmpSound : Actor
|
|||
Class UJumpBoots : UnrealInventory
|
||||
{
|
||||
int draincnt;
|
||||
|
||||
Default
|
||||
{
|
||||
Tag "$T_JUMPBOOTS";
|
||||
|
|
@ -242,12 +243,63 @@ Class UJumpBoots : UnrealInventory
|
|||
for ( int i=0; i<level.Sectors.Size(); i++ )
|
||||
{
|
||||
Sector s = level.Sectors[i];
|
||||
if ( s.MoreFlags&Sector.SECMF_UNDERWATER ) foundswim = true;
|
||||
if ( s.MoreFlags&(Sector.SECMF_UNDERWATER|Sector.SECMF_FORCEDUNDERWATER) ) foundswim = true;
|
||||
if ( !s.DamageInterval || !s.DamageAmount ) continue;
|
||||
if ( s.DamageType == 'Slime' ) foundslime = true;
|
||||
else if ( s.DamageType == 'Fire' ) foundlava = true;
|
||||
// 3d floors don't set the underwater flags or anything so we're completely screwed until Graf merges my goddamn PR
|
||||
//for ( int i=0; i<s.Get3DFloorCount(); i++ )
|
||||
// if ( s.Get3DFloor(i).flags&F3DFloor.FF_SWIMMABLE ) foundswim = true;
|
||||
}
|
||||
// random chance to ignore if a replacement already was made
|
||||
let ti = ThinkerIterator.Create("Inventory");
|
||||
Inventory a;
|
||||
while ( a = Inventory(ti.Next()) )
|
||||
{
|
||||
// exclude owned items
|
||||
if ( a.Owner ) continue;
|
||||
if ( (a is "ToxinSuit") && Random[LBootRep](0,2) )
|
||||
foundslime = false;
|
||||
if ( (a is "AsbestosSuit") && Random[LBootRep](0,2) )
|
||||
foundlava = false;
|
||||
if ( (a is "SCUBAGear") && Random[LBootRep](0,2) )
|
||||
foundswim = false;
|
||||
}
|
||||
// replace self with asbestos/toxin suits or scuba
|
||||
// this is extremely naive and doesn't check proximity to the
|
||||
// hurtfloor/swimmable, but it's better than nothing
|
||||
Array<String> replacements;
|
||||
replacements.Clear();
|
||||
if ( foundslime ) replacements.Push("ToxinSuit");
|
||||
if ( foundlava ) replacements.Push("AsbestosSuit");
|
||||
if ( foundswim ) replacements.Push("SCUBAGear");
|
||||
if ( replacements.Size() > 0 )
|
||||
{
|
||||
int rslot = Random[LBootRep](0,replacements.Size()-1);
|
||||
let r = Spawn(replacements[rslot],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();
|
||||
}
|
||||
// TODO replace self with asbestos/toxin suits or scuba
|
||||
}
|
||||
override void AttachToOwner( Actor Other )
|
||||
{
|
||||
|
|
@ -301,6 +353,40 @@ Class SCUBAGear : UnrealInventory
|
|||
Inventory.RespawnTics 700;
|
||||
UnrealInventory.Charge 4200;
|
||||
}
|
||||
override bool Use( bool pickup )
|
||||
{
|
||||
if ( pickup ) return false;
|
||||
bActive = !bActive;
|
||||
if ( !bActive ) Owner.A_PlaySound("scuba/stop",CHAN_ITEM);
|
||||
return false;
|
||||
}
|
||||
override void AbsorbDamage( int damage, Name damageType, out int newdamage )
|
||||
{
|
||||
if ( bActive && (damageType == 'Drowning') )
|
||||
newdamage = 0;
|
||||
}
|
||||
override void DoEffect()
|
||||
{
|
||||
Super.DoEffect();
|
||||
if ( sting_autoscuba && ((bActive && (Owner.waterlevel < 2)) || (!bActive && (Owner.waterlevel > 2))) )
|
||||
Use(false);
|
||||
if ( bActive && !tracer )
|
||||
{
|
||||
tracer = Spawn("SCUBASound",Owner.pos);
|
||||
tracer.target = Owner;
|
||||
tracer.master = self;
|
||||
}
|
||||
else if ( !bActive && tracer ) tracer.Destroy();
|
||||
if ( !bActive ) return;
|
||||
if ( PlayerPawn(Owner) ) PlayerPawn(Owner).ResetAirSupply();
|
||||
if ( (Charge <= 0) || DrainCharge(1) )
|
||||
{
|
||||
Owner.A_PlaySound("scuba/stop",CHAN_ITEM);
|
||||
if ( Owner.CheckLocalView() ) Console.Printf(StringTable.Localize("$D_SCUBA"));
|
||||
if ( tracer ) tracer.Destroy();
|
||||
DepleteOrDestroy();
|
||||
}
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
|
|
@ -308,3 +394,52 @@ Class SCUBAGear : UnrealInventory
|
|||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
Class SCUBASound : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
+NOBLOCKMAP;
|
||||
+NOGRAVITY;
|
||||
}
|
||||
override void Tick()
|
||||
{
|
||||
Super.Tick();
|
||||
if ( !target || !master )
|
||||
{
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
SetOrigin(target.pos,true);
|
||||
if ( target.CheckLocalView() )
|
||||
{
|
||||
A_SoundVolume(CHAN_VOICE,0.0);
|
||||
A_SoundVolume(CHAN_5,0.0);
|
||||
A_SoundVolume(CHAN_6,(target.waterlevel<3)?1.0:0.0);
|
||||
A_SoundVolume(CHAN_7,(target.waterlevel>=3)?1.0:0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
A_SoundVolume(CHAN_VOICE,(target.waterlevel<3)?0.25:0.0);
|
||||
A_SoundVolume(CHAN_5,(target.waterlevel>=3)?0.25:0.0);
|
||||
A_SoundVolume(CHAN_6,0.0);
|
||||
A_SoundVolume(CHAN_7,0.0);
|
||||
}
|
||||
}
|
||||
override void PostBeginPlay()
|
||||
{
|
||||
Super.PostBeginPlay();
|
||||
A_PlaySound("scuba/air",CHAN_VOICE,0.25,true,1.5);
|
||||
A_PlaySound("scuba/water",CHAN_5,0.25,true,1.5);
|
||||
A_PlaySound("scuba/air",CHAN_6,1.0,true,ATTN_NONE);
|
||||
A_PlaySound("scuba/water",CHAN_7,1.0,true,ATTN_NONE);
|
||||
}
|
||||
override void OnDestroy()
|
||||
{
|
||||
Super.OnDestroy();
|
||||
A_StopSound(CHAN_VOICE);
|
||||
A_StopSound(CHAN_5);
|
||||
A_StopSound(CHAN_6);
|
||||
A_StopSound(CHAN_7);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue