diff options
author | DBmaoha <56738369+DBmaoha@users.noreply.github.com> | 2023-07-10 03:37:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-09 21:37:47 +0200 |
commit | 9d8573a844cdb6bddd2779af8ddeb4128db055f4 (patch) | |
tree | eddf18532f69997f50f8a103f35b5d0e7936d82e /Northstar.CustomServers/mod/scripts/vscripts/gamemodes | |
parent | af8f5cdfb05face11659f26ea79cf8b6139c544b (diff) | |
download | NorthstarMods-9d8573a844cdb6bddd2779af8ddeb4128db055f4.tar.gz NorthstarMods-9d8573a844cdb6bddd2779af8ddeb4128db055f4.zip |
[BH] Fix Bounty Titan Damage Checks (#654)
Update _gamemode_at.nut
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/gamemodes')
-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 |