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:
arcattack
2026-07-07 14:55:53 -05:00
co-authored by Claude Opus 4.8
parent bf44a45ab7
commit c850ffa26c
3 changed files with 52 additions and 12 deletions
+3 -3
View File
@@ -88,8 +88,8 @@
#include <math.h>
// WAVE 7 Phase B -- the port-side flying-projectile service (defined in mech4.cpp).
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);
//#############################################################################
@@ -624,7 +624,7 @@ void
+ launchVelocity.z*launchVelocity.z);
// Always launch -- BTPushProjectile falls back to gEnemyMech when the owner's target
// slot isn't populated (bring-up).
BTPushProjectile(muzzle, target, targetPos, speed, damageData.damageAmount);
BTPushProjectile(muzzle, o, target, targetPos, speed, damageData.damageAmount);
simulationFlags |= 0x1; // replication-dirty
Check_Fpu();