Combat: FIX missile direct damage 6x over-application -- damage once per salvo (task #62)
User live regression: missiles killed a mech in ~2 shots ("takes way more than 2
normally"). Root cause -- DamageZone::TakeDamage (arcade @0041e4e0 == WinTesla
DAMAGE.cpp:379) is `damageLevel += amount*scale` and IGNORES burstCount. So the
arcade's ONE cluster Missile per trigger lands its damageAmount EXACTLY ONCE; the
missileCount/burstCount split is cosmetic for zone damage (only gyro-bounce +
splash-falloff read burstCount). The port re-expresses that one cluster as N
flying rounds and was damaging on EVERY round = ~missileCount x too lethal on the
direct hit (mirrors the splash over-application fixed in 145a69f).
Fix (mislanch.cpp FireWeapon): only the salvo-LEAD round (i==0) carries damage
(damageData.damageAmount) AND the cluster splash; the other N-1 rounds are VISUAL
(damage 0) -- the tracer ripple, no extra damage. AC unaffected (one round/shot,
not a cluster).
Verified (BT_DMG_LOG [dmghit] trace): per-hit missile damage = clean 5.83, burst
1, once. Missiles-ONLY (BT_AF_MISSILE now independent of BT_AUTOFIRE), single
enemy, 45s: 8 damaging hits, top zone reaches only 0.18, NO death (was death in
~3 pulls) -- "way more than 2" restored. Earlier test deaths were BT_AUTOFIRE
firing laser+PPC+missiles combined, not missiles alone.
KB: combat-damage.md documents burstCount-ignored + the N-round cluster trap
(direct + splash both once-per-salvo).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
145a69f865
commit
fa0b825b60
@@ -424,7 +424,14 @@ void
|
||||
}
|
||||
|
||||
// ---- real zone: apply to armour/structure ----
|
||||
Scalar preLvl = damageLevel;
|
||||
DamageZone::TakeDamage(damage); // FUN_0041e4e0
|
||||
if (getenv("BT_DMG_LOG"))
|
||||
DEBUG_STREAM << "[dmghit] mech=" << mech->GetEntityID()
|
||||
<< " zone=" << damageZoneIndex << " vital=" << (int)vitalDamageZone
|
||||
<< " type=" << (int)damage.damageType << " amt=" << damage.damageAmount
|
||||
<< " burst=" << damage.burstCount
|
||||
<< " lvl " << preLvl << "->" << damageLevel << "\n" << std::flush;
|
||||
|
||||
Mech__DamageZone *parent = parentArtifactZone.GetCurrent(); // FUN_00417ab4(this+0x62)
|
||||
if (parent != 0)
|
||||
|
||||
Reference in New Issue
Block a user