onemanarmy buff

This commit is contained in:
INeedBots 2020-09-21 00:09:24 -06:00
parent efc7e649ca
commit e7fd0ca42e
3 changed files with 52 additions and 24 deletions

View File

@ -538,3 +538,6 @@ set scr_empEffectsAll "0"
// _perks // _perks
set combathighIsJuiced "1" set combathighIsJuiced "1"
// _perkfunctions
set onemanarmyRefillsTubes "1"

View File

@ -12,8 +12,6 @@
#include maps\mp\perks\_perks; #include maps\mp\perks\_perks;
blastshieldUseTracker( perkName, useFunc ) blastshieldUseTracker( perkName, useFunc )
{ {
self endon ( "death" ); self endon ( "death" );
@ -121,8 +119,11 @@ setCombatHigh()
level endon( "end_game" ); level endon( "end_game" );
self.damageBlockedTotal = 0; self.damageBlockedTotal = 0;
if (level.combathighIsJuiced)
{
self.moveSpeedScaler = 1.25; self.moveSpeedScaler = 1.25;
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" ); self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
}
//self visionSetNakedForPlayer( "end_game", 1 ); //self visionSetNakedForPlayer( "end_game", 1 );
if ( level.splitscreen ) if ( level.splitscreen )
@ -149,7 +150,11 @@ setCombatHigh()
self.combatHighTimer = createTimer( "hudsmall", 1.0 ); self.combatHighTimer = createTimer( "hudsmall", 1.0 );
self.combatHighTimer setPoint( "CENTER", "CENTER", 0, yOffset ); self.combatHighTimer setPoint( "CENTER", "CENTER", 0, yOffset );
if (level.combathighIsJuiced)
self.combatHighTimer setTimer( 7.0 ); self.combatHighTimer setTimer( 7.0 );
else
self.combatHighTimer setTimer( 10.0 );
self.combatHighTimer.color = (.8,.8,0); self.combatHighTimer.color = (.8,.8,0);
self.combatHighTimer.archived = false; self.combatHighTimer.archived = false;
self.combatHighTimer.foreground = true; self.combatHighTimer.foreground = true;
@ -170,7 +175,10 @@ setCombatHigh()
self thread unsetCombatHighOnDeath(); self thread unsetCombatHighOnDeath();
if (level.combathighIsJuiced)
wait( 5 ); wait( 5 );
else
wait( 8 );
self.combatHighIcon fadeOverTime( 2.0 ); self.combatHighIcon fadeOverTime( 2.0 );
self.combatHighIcon.alpha = 0.0; self.combatHighIcon.alpha = 0.0;
@ -184,6 +192,8 @@ setCombatHigh()
wait( 2 ); wait( 2 );
self.damageBlockedTotal = undefined; self.damageBlockedTotal = undefined;
if (level.combathighIsJuiced)
{
self.moveSpeedScaler = 1; self.moveSpeedScaler = 1;
if (self _hasperk( "specialty_lightweight" )) if (self _hasperk( "specialty_lightweight" ))
@ -192,6 +202,7 @@ setCombatHigh()
} }
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" ); self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
}
self _unsetPerk( "specialty_combathigh" ); self _unsetPerk( "specialty_combathigh" );
} }
@ -203,12 +214,15 @@ unsetCombatHighOnDeath()
self waittill ( "death" ); self waittill ( "death" );
if (level.combathighIsJuiced)
{
self.moveSpeedScaler = 1; self.moveSpeedScaler = 1;
if (self _hasperk( "specialty_lightweight" )) if (self _hasperk( "specialty_lightweight" ))
{ {
self.moveSpeedScaler = 1.07; self.moveSpeedScaler = 1.07;
} }
}
self thread _unsetPerk( "specialty_combathigh" ); self thread _unsetPerk( "specialty_combathigh" );
} }
@ -220,12 +234,15 @@ unsetCombatHigh()
self.combatHighIcon destroy(); self.combatHighIcon destroy();
self.combatHighTimer destroy(); self.combatHighTimer destroy();
if (level.combathighIsJuiced)
{
self.moveSpeedScaler = 1; self.moveSpeedScaler = 1;
if (self _hasperk( "specialty_lightweight" )) if (self _hasperk( "specialty_lightweight" ))
{ {
self.moveSpeedScaler = 1.07; self.moveSpeedScaler = 1.07;
} }
}
} }
setSiege() setSiege()
@ -366,10 +383,13 @@ setLightWeight()
{ {
self.moveSpeedScaler = 1.07; self.moveSpeedScaler = 1.07;
if (level.combathighIsJuiced)
{
if (self _hasperk( "specialty_combathigh" )) if (self _hasperk( "specialty_combathigh" ))
{ {
self.moveSpeedScaler = 1.4; self.moveSpeedScaler = 1.4;
} }
}
self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" ); self maps\mp\gametypes\_weapons::updateMoveSpeedScale( "primary" );
} }
@ -620,7 +640,6 @@ selectOneManArmyClass()
self _disableWeaponSwitch(); self _disableWeaponSwitch();
self _disableOffhandWeapons(); self _disableOffhandWeapons();
self _disableUsability(); self _disableUsability();
self switchToWeapon( self getLastWeapon() ); self switchToWeapon( self getLastWeapon() );
self waittill ( "weapon_change" ); self waittill ( "weapon_change" );
self _enableWeaponSwitch(); self _enableWeaponSwitch();
@ -693,6 +712,9 @@ giveOneManArmyClass( className )
self notify ( "changed_kit" ); self notify ( "changed_kit" );
level notify ( "changed_kit" ); level notify ( "changed_kit" );
if (level.onemanarmyRefillsTubes)
return;
weaponNameSize = self getCurrentWeapon().size; weaponNameSize = self getCurrentWeapon().size;
if( getSubStr( self getCurrentWeapon(), weaponNameSize - 6, weaponNameSize ) == "_gl_mp" ) if( getSubStr( self getCurrentWeapon(), weaponNameSize - 6, weaponNameSize ) == "_gl_mp" )

View File

@ -178,9 +178,12 @@ init()
level.perkSetFuncs["specialty_tacticalinsertion"] = ::setTacticalInsertion; level.perkSetFuncs["specialty_tacticalinsertion"] = ::setTacticalInsertion;
level.perkUnsetFuncs["specialty_tacticalinsertion"] = ::unsetTacticalInsertion; level.perkUnsetFuncs["specialty_tacticalinsertion"] = ::unsetTacticalInsertion;
setDvarIfUninitialized( "combathighIsJuiced", false ); setDvarIfUninitialized( "combathighIsJuiced", true );
level.combathighIsJuiced = getDvarInt( "combathighIsJuiced" ); level.combathighIsJuiced = getDvarInt( "combathighIsJuiced" );
setDvarIfUninitialized( "onemanarmyRefillsTubes", false );
level.onemanarmyRefillsTubes = getDvarInt( "onemanarmyRefillsTubes" );
initPerkDvars(); initPerkDvars();
level thread onPlayerConnect(); level thread onPlayerConnect();