diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2023-07-10 03:37:47 +0800 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-07-11 01:33:05 +0200 |
commit | a3a7b8993216e91266c41a6823ad52fd957f940c (patch) | |
tree | 2995d34f9d9cadfb97e21e2f78b441bd21f0a94f /Northstar.CustomServers | |
parent | 730dcd27edbc7c411c9765d49384841e3a379070 (diff) | |
download | NorthstarMods-a3a7b8993216e91266c41a6823ad52fd957f940c.tar.gz NorthstarMods-a3a7b8993216e91266c41a6823ad52fd957f940c.zip |
[BH] Fix Bounty Titan Damage Checks (#654)
Update _gamemode_at.nut
Diffstat (limited to 'Northstar.CustomServers')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_at.nut | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_at.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_at.nut index c61cb585..93a3aa16 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_at.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_at.nut @@ -107,7 +107,6 @@ void function GamemodeAt_Init() // Set-up score callbacks ScoreEvent_SetupEarnMeterValuesForMixedModes() - AddDamageFinalCallback( "npc_titan", OnNPCTitanFinalDamaged ) AddCallback_OnPlayerKilled( AT_PlayerOrNPCKilledScoreEvent ) AddCallback_OnNPCKilled( AT_PlayerOrNPCKilledScoreEvent ) @@ -1658,9 +1657,10 @@ void function AT_HandleBossTitanSpawn( entity titan, AT_WaveOrigin campData, int titan.Minimap_AlwaysShow( TEAM_MILITIA, null ) thread BountyBossHighlightThink( titan ) - // set up titan-specific death callbacks, mark it as bounty boss for finalDamageCallbacks to work + // set up titan-specific death callbacks, mark it as bounty boss file.titanIsBountyBoss[ titan ] <- true file.bountyTitanRewards[ titan ] <- ATTRITION_SCORE_BOSS_DAMAGE + AddEntityCallback_OnPostDamaged( titan, OnBountyTitanPostDamage ) AddEntityCallback_OnKilled( titan, OnBountyTitanKilled ) titan.GetTitanSoul().soul.skipDoomState = true @@ -1684,13 +1684,7 @@ void function BountyBossHighlightThink( entity titan ) } } -void function OnNPCTitanFinalDamaged( entity titan, var damageInfo ) -{ - if ( titan in file.titanIsBountyBoss ) - OnBountyTitanDamaged( titan, damageInfo ) -} - -void function OnBountyTitanDamaged( entity titan, var damageInfo ) +void function OnBountyTitanPostDamage( entity titan, var damageInfo ) { entity attacker = DamageInfo_GetAttacker( damageInfo ) if ( !IsValid( attacker ) ) // delayed by projectile shots @@ -1703,14 +1697,6 @@ void function OnBountyTitanDamaged( entity titan, var damageInfo ) return } - // respawn FUCKED UP pilot weapon against titan's damage calculation, have to copy-paste this check from Titan_NPCTookDamage() - if ( HeavyArmorCriticalHitRequired( damageInfo ) && - CritWeaponInDamageInfo( damageInfo ) && - !IsCriticalHit( attacker, titan, DamageInfo_GetHitBox( damageInfo ), DamageInfo_GetDamage( damageInfo ), DamageInfo_GetDamageType( damageInfo ) ) && - IsValid( attacker ) && - !attacker.IsTitan() ) - return - int rewardSegment = ATTRITION_SCORE_BOSS_DAMAGE int healthSegment = titan.GetMaxHealth() / rewardSegment |