WAVE 7 Phase B polish: missiles launch from the mech's missile ports + look like missiles
Two issues the user hit driving the Mad Cat: (1) projectiles appeared to launch from the mech's FEET -- MechWeapon::GetMuzzlePoint falls back to the mech origin (localOrigin) when the weapon's mount segment (this+0xdc) doesn't resolve, so the passed muzzle was at ground level; (2) they rendered as a thin laser-like line, not a missile. Fix: BTPushProjectile now takes the SHOOTER mech and resolves the real launch port by NAME (sitermissleport / sitelmissleport, alternating L/R for a salvo look; then torso ports, then gun ports; then a raised fallback) -- the same segment-name -> world-transform mechanism the visible laser beams use for the gun ports. The tracer is now a 3-part missile look (dim smoke trail behind + orange body + hot flame tip) instead of a single thin beam. FireWeapon (both ProjectileWeapon and MissileLauncher) passes owner as the shooter. 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
bf44a45ab7
commit
c850ffa26c
@@ -68,8 +68,8 @@
|
||||
// WAVE 7 Phase B -- the port-side flying-projectile service (defined in mech4.cpp, a
|
||||
// complete-Mech TU with the render + damage path). A fired missile becomes a tracked
|
||||
// projectile that flies to the target + delivers this weapon's damage on impact.
|
||||
extern void BTPushProjectile(const Point3D &muzzle, void *target, const Point3D &targetPos,
|
||||
Scalar speed, Scalar damage);
|
||||
extern void BTPushProjectile(const Point3D &muzzle, void *shooter, void *target,
|
||||
const Point3D &targetPos, Scalar speed, Scalar damage);
|
||||
|
||||
//###########################################################################
|
||||
//###########################################################################
|
||||
@@ -246,7 +246,7 @@ void MissileLauncher::FireWeapon()
|
||||
// slot isn't populated (bring-up); missileCount missiles per salvo.
|
||||
int nmiss = (missileCount > 0 && missileCount < 40) ? missileCount : 1;
|
||||
for (int i = 0; i < nmiss; ++i)
|
||||
BTPushProjectile(muzzle, target, targetPos, speed, damageData.damageAmount);
|
||||
BTPushProjectile(muzzle, o, target, targetPos, speed, damageData.damageAmount);
|
||||
|
||||
simulationFlags |= 0x1; // replication-dirty
|
||||
Check_Fpu();
|
||||
|
||||
Reference in New Issue
Block a user