Tweaked fire rates of Enforcer, Shock Rifle, Ripper, Flak Cannon to be even closer to the originals.

Reduced gravity on Biosludge to make it feel more like the original.
Buffed chainsaw altfire, making it hit fast on a wider arc.
Correctly fixed armor + shield belt behaviors.
Made it so jump boots drain after landing, thus preventing fall damage on the last jump in case it's enabled.
Made jump boots drain slowly over time, for balance reasons (especially when jumping is disabled).
This commit is contained in:
Marisa the Magician 2018-08-12 15:39:21 +02:00
commit b5a0c723fe
8 changed files with 64 additions and 39 deletions

View file

@ -8,7 +8,8 @@ Class UTArmor : Armor
{ {
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.UNTOSSABLE; +INVENTORY.UNTOSSABLE;
+INVENTORY.KEEPDEPLETED; -INVENTORY.KEEPDEPLETED;
+INVENTORY.ALWAYSPICKUP;
} }
override void AbsorbDamage( int damage, Name damageType, out int newdamage ) override void AbsorbDamage( int damage, Name damageType, out int newdamage )
{ {
@ -37,7 +38,6 @@ Class UTArmorBonus : UTArmor replaces ArmorBonus
{ {
Tag "Armor Bonus"; Tag "Armor Bonus";
+COUNTITEM; +COUNTITEM;
+INVENTORY.ALWAYSPICKUP;
Inventory.Amount 1; Inventory.Amount 1;
Inventory.MaxAmount 50; Inventory.MaxAmount 50;
Inventory.InterHubAmount 50; Inventory.InterHubAmount 50;
@ -62,9 +62,12 @@ Class UTThighPads : UTArmor replaces GreenArmor
let s = Owner.FindInventory("UTShieldBelt"); let s = Owner.FindInventory("UTShieldBelt");
if ( s ) if ( s )
{ {
// sum up current amounts
let a = Owner.FindInventory("UTBodyArmor");
int samount = s.amount;
if ( a ) samount += a.amount;
if ( amount < item.amount ) amount = item.amount; if ( amount < item.amount ) amount = item.amount;
amount = min(s.maxamount-s.amount,amount); amount = min(s.maxamount-samount,amount);
Console.Printf("%d",amount);
item.bPickupGood = true; item.bPickupGood = true;
return true; return true;
} }
@ -98,9 +101,12 @@ Class UTBodyArmor : UTArmor replaces BlueArmor
let s = Owner.FindInventory("UTShieldBelt"); let s = Owner.FindInventory("UTShieldBelt");
if ( s ) if ( s )
{ {
// sum up current amounts
let p = Owner.FindInventory("UTThighPads");
int samount = s.amount;
if ( p ) samount += p.amount;
if ( amount < item.amount ) amount = item.amount; if ( amount < item.amount ) amount = item.amount;
amount = min(s.maxamount-s.amount,amount); amount = min(s.maxamount-samount,amount);
Console.Printf("%d",amount);
item.bPickupGood = true; item.bPickupGood = true;
return true; return true;
} }
@ -142,9 +148,20 @@ Class UTShieldBelt : UTArmor replaces Megasphere
{ {
if ( (item is 'UTBodyArmor') || (item is 'UTThighPads') ) if ( (item is 'UTBodyArmor') || (item is 'UTThighPads') )
{ {
item.amount = 1; // sum up current amounts
amount -= 1; let a = Owner.FindInventory("UTBodyArmor");
let p = Owner.FindInventory("UTThighPads");
int samount = amount;
if ( a ) samount += a.amount;
if ( p ) samount += p.amount;
item.amount = min(item.amount,maxamount-samount);
if ( item.amount <= 0 )
{
item.amount = 1;
amount -= 1;
}
} }
if ( item is 'UTShieldBelt' ) Use(true);
return Super.HandlePickup(item); return Super.HandlePickup(item);
} }
override bool Use( bool pickup ) override bool Use( bool pickup )

View file

@ -85,7 +85,7 @@ Class BioSpark : Actor
BounceFactor 0.5; BounceFactor 0.5;
WallBounceFactor 0.5; WallBounceFactor 0.5;
Gravity 0.2; Gravity 0.2;
Scale 0.04; Scale 0.06;
} }
override void PostBeginPlay() override void PostBeginPlay()
{ {
@ -218,7 +218,7 @@ Class BioGel : Actor
override void PostBeginPlay() override void PostBeginPlay()
{ {
Super.PostBeginPlay(); Super.PostBeginPlay();
vel.z += 6; vel.z += 3;
deadtimer = -1; deadtimer = -1;
l = Spawn("BioLight",pos); l = Spawn("BioLight",pos);
l.target = self; l.target = self;
@ -281,7 +281,9 @@ Class BioGel : Actor
for ( int i=0; i<numpt; i++ ) for ( int i=0; i<numpt; i++ )
{ {
Vector3 pvel = (FRandom[GES](-1,1),FRandom[GES](-1,1),FRandom[GES](-1,1)).unit()*FRandom[GES](1,3); Vector3 pvel = (FRandom[GES](-1,1),FRandom[GES](-1,1),FRandom[GES](-1,1)).unit()*FRandom[GES](1,3);
let s = Spawn("BioSpark",pos); Vector3 spos = pos;
if ( atplane == 1 ) spos += Normal*2;
let s = Spawn("BioSpark",spos);
s.vel = pvel; s.vel = pvel;
} }
} }
@ -442,6 +444,7 @@ Class BioGel : Actor
Scale 2; Scale 2;
Speed 18; Speed 18;
ProjectileKickback 120; ProjectileKickback 120;
Gravity 0.5;
PROJECTILE; PROJECTILE;
-NOGRAVITY; -NOGRAVITY;
+SKYEXPLODE; +SKYEXPLODE;

View file

@ -92,16 +92,16 @@ Class UTChainsaw : UTWeapon
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4); if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
} }
} }
action void A_SawSwipe() action void A_SawSwipe( bool initial = false )
{ {
A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15); A_QuakeEx(2,2,2,3,0,1,"",QF_RELATIVE,rollIntensity:0.15);
invoker.FireEffect(); if ( initial ) invoker.FireEffect();
A_AlertMonsters(); A_AlertMonsters();
Vector3 x, y, z; Vector3 x, y, z;
[x, y, z] = Matrix4.GetAxes(pitch,angle,roll); [x, y, z] = Matrix4.GetAxes(pitch,angle,roll);
Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-2.0*z; Vector3 origin = (pos.x,pos.y,player.viewz)+10.0*x-2.0*z;
FLineTraceData d; FLineTraceData d;
double ang = (angle-45)+90*invoker.sawcnt; double ang = (angle-60)+120*invoker.sawcnt;
LineTrace(ang,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d); LineTrace(ang,90,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
if ( d.HitType == TRACE_HitActor ) if ( d.HitType == TRACE_HitActor )
{ {
@ -131,7 +131,7 @@ Class UTChainsaw : UTWeapon
p.pitch = asin(-d.HitDir.z); p.pitch = asin(-d.HitDir.z);
if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4); if ( d.HitType == TRACE_HitWall ) d.HitLine.RemoteActivate(self,d.LineSide,SPAC_Impact,d.HitLocation-d.HitDir*4);
} }
invoker.sawcnt += 0.2; invoker.sawcnt += 0.1;
} }
override void DetachFromOwner() override void DetachFromOwner()
{ {
@ -243,10 +243,15 @@ Class UTChainsaw : UTWeapon
AltFire: AltFire:
CSWA A 0 A_PlaySound("chainsaw/fire",CHAN_6); CSWA A 0 A_PlaySound("chainsaw/fire",CHAN_6);
CSWA ABCDE 2 A_Vibrate(true); CSWA ABCDE 2 A_Vibrate(true);
CSWA FGHIJ 2 A_SawSwipe(); CSWA F 2 A_Overlay(PSP_WEAPON+1,"AltFireSwipes");
CSWA GHIJ 2;
CSWA K 2 A_Vibrate(true); CSWA K 2 A_Vibrate(true);
CSWA K 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true); CSWA K 0 A_PlaySound("chainsaw/idle",CHAN_6,looping:true);
Goto Ready; Goto Ready;
AltFireSwipes:
TNT1 A 1 A_SawSwipe(true);
TNT1 AAAAAAAAA 1 A_SawSwipe();
Stop;
Deselect: Deselect:
CSWD A 0 A_PlaySound("chainsaw/lower",CHAN_6); CSWD A 0 A_PlaySound("chainsaw/lower",CHAN_6);
CSWD ABCDEF 1; CSWD ABCDEF 1;

View file

@ -458,20 +458,20 @@ Class Enforcer : UTWeapon replaces Pistol
Hold: Hold:
ENFF A 0 A_EnforcerFire(); ENFF A 0 A_EnforcerFire();
ENFF ABCDEFGHIJ 1; ENFF ABCDEFGHIJ 1;
ENFF J 5; ENFF J 2;
ENFF J 0 A_EnforcerRefire(); ENFF J 0 A_EnforcerRefire();
ENFF J 2; ENFF J 2;
ENFI A 0; ENFI A 0;
Goto Idle; Goto Idle;
LeftFire: LeftFire:
2NFI A 0 A_Overlay(-9998,"Null"); 2NFI A 0 A_Overlay(-9998,"Null");
2NFI A 8; 2NFI A 5;
2NFI A 0 A_EnforcerRefire(1,true); 2NFI A 0 A_EnforcerRefire(1,true);
Goto LeftIdle; Goto LeftIdle;
LeftHold: LeftHold:
2NFF A 0 A_EnforcerFire(false,true); 2NFF A 0 A_EnforcerFire(false,true);
2NFF ABCDEFGHIJ 1; 2NFF ABCDEFGHIJ 1;
2NFF J 5; 2NFF J 2;
2NFF J 0 A_EnforcerRefire("LeftHold",true); 2NFF J 0 A_EnforcerRefire("LeftHold",true);
2NFF J 2; 2NFF J 2;
2NFI A 0; 2NFI A 0;
@ -482,20 +482,20 @@ Class Enforcer : UTWeapon replaces Pistol
AltHold: AltHold:
ENFA G 0 A_EnforcerFire(true); ENFA G 0 A_EnforcerFire(true);
ENFA GHIJKLMN 1; ENFA GHIJKLMN 1;
ENFA N 3; ENFA N 1;
ENFA G 0 A_EnforcerRefire(); ENFA G 0 A_EnforcerRefire();
ENFA OPQRSTU 1; ENFA OPQRSTU 1;
Goto Idle; Goto Idle;
LeftAltFire: LeftAltFire:
2NFI A 0 A_Overlay(-9998,"Null"); 2NFI A 0 A_Overlay(-9998,"Null");
2NFI A 7; 2NFI A 5;
2NFI A 0 A_EnforcerRefire(1,true); 2NFI A 0 A_EnforcerRefire(1,true);
Goto LeftIdle; Goto LeftIdle;
2NFA ABCDEF 1; 2NFA ABCDEF 1;
LeftAltHold: LeftAltHold:
2NFA G 0 A_EnforcerFire(true,true); 2NFA G 0 A_EnforcerFire(true,true);
2NFA GHIJKLMN 1; 2NFA GHIJKLMN 1;
2NFA N 3; 2NFA N 1;
2NFA G 0 A_EnforcerRefire("LeftAltHold",true); 2NFA G 0 A_EnforcerRefire("LeftAltHold",true);
2NFA OPQRSTU 1; 2NFA OPQRSTU 1;
Goto LeftIdle; Goto LeftIdle;

View file

@ -600,12 +600,11 @@ Class FlakCannon : UTWeapon
} }
FLKL BCEFGIJKMNO 1; FLKL BCEFGIJKMNO 1;
Idle: Idle:
FLKI A 10;
FLKI A 1 A_WeaponReady(); FLKI A 1 A_WeaponReady();
Wait; Wait;
Fire: Fire:
FLKF A 1 A_FireChunks(); FLKF A 1 A_FireChunks();
FLKF BCEFHI 1; FLKF BCDEFGHI 1;
FLKF J 4; FLKF J 4;
Goto Loading; Goto Loading;
AltFire: AltFire:

View file

@ -295,9 +295,9 @@ Class UTJumpBoots : Inventory replaces RadSuit
Tag "AntiGrav Boots"; Tag "AntiGrav Boots";
+INVENTORY.AUTOACTIVATE; +INVENTORY.AUTOACTIVATE;
+INVENTORY.ALWAYSPICKUP; +INVENTORY.ALWAYSPICKUP;
Inventory.Amount 3; Inventory.Amount 2100;
Inventory.MaxAmount 3; Inventory.MaxAmount 2100;
Inventory.InterHubAmount 3; Inventory.InterHubAmount 2100;
Inventory.PickupMessage "You picked up the AntiGrav boots."; Inventory.PickupMessage "You picked up the AntiGrav boots.";
Inventory.PickupSound "boot/pickup"; Inventory.PickupSound "boot/pickup";
Inventory.RespawnTics 1050; Inventory.RespawnTics 1050;
@ -315,15 +315,16 @@ Class UTJumpBoots : Inventory replaces RadSuit
{ {
Super.Tick(); Super.Tick();
if ( !Owner || !Owner.player ) return; if ( !Owner || !Owner.player ) return;
if ( owner.player.jumptics == -1 ) amount--;
if ( (amount > 0) && (owner.player.jumptics == -1) )
{ {
Amount--; Amount = max(0,Amount-700);
Owner.A_PlaySound("boot/jump",CHAN_BODY); Owner.A_PlaySound("boot/jump",CHAN_BODY);
if ( Amount <= 0 ) }
{ else if ( (Amount <= 0) && owner.player.onground )
PrintPickupMessage(true,"The AntiGrav Boots have drained."); {
DepleteOrDestroy(); PrintPickupMessage(true,"The AntiGrav Boots have drained.");
} DepleteOrDestroy();
} }
} }
override void DetachFromOwner() override void DetachFromOwner()

View file

@ -310,7 +310,7 @@ Class Ripper2 : UTWeapon
Goto Idle; Goto Idle;
AltFire: AltFire:
RZRF A 0 A_RazorFire(true); RZRF A 0 A_RazorFire(true);
RZRF ABCDEFG 3; RZRF ABDEG 3;
RZRF HIJKLMNO 1; RZRF HIJKLMNO 1;
Goto Idle; Goto Idle;
Deselect: Deselect:

View file

@ -1083,11 +1083,11 @@ Class ShockRifle : UTWeapon
Wait; Wait;
Fire: Fire:
ASMF A 1 A_ShockFire(); ASMF A 1 A_ShockFire();
ASMF BCDEFGHIJ 2; ASMF BCDEFGHIJJ 2;
Goto Idle; Goto Idle;
AltFire: AltFire:
ASMA A 1 A_ShockAlt(); ASMA A 1 A_ShockAlt();
ASMA BCDEFGHIJ 2; ASMA BCDFGHIJ 2;
Goto Idle; Goto Idle;
Deselect: Deselect:
ASMD ABCDEFG 1; ASMD ABCDEFG 1;
@ -1256,12 +1256,12 @@ Class EnhancedShockRifle : UTWeapon replaces InvulnerabilitySphere
Fire: Fire:
ASMI A 0 A_JumpIfNoAmmo("DryFire"); ASMI A 0 A_JumpIfNoAmmo("DryFire");
ASMF A 1 A_SShockFire(); ASMF A 1 A_SShockFire();
ASMF BCDEFGHIJ 2; ASMF BCDEFGHIJJ 2;
Goto Idle; Goto Idle;
AltFire: AltFire:
ASMI A 0 A_JumpIfNoAmmo("DryFire"); ASMI A 0 A_JumpIfNoAmmo("DryFire");
ASMA A 1 A_SShockAlt(); ASMA A 1 A_SShockAlt();
ASMA BCDEFGHIJ 2; ASMA BCDFGHIJ 2;
Goto Idle; Goto Idle;
DryFire: DryFire:
ASMA I 3 ASMA I 3