From 9d8573a844cdb6bddd2779af8ddeb4128db055f4 Mon Sep 17 00:00:00 2001 From: DBmaoha <56738369+DBmaoha@users.noreply.github.com> Date: Mon, 10 Jul 2023 03:37:47 +0800 Subject: [BH] Fix Bounty Titan Damage Checks (#654) Update _gamemode_at.nut --- .../mod/scripts/vscripts/gamemodes/_gamemode_at.nut | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'Northstar.CustomServers/mod/scripts/vscripts') 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 -- cgit v1.2.3