Files
TeslaRel410/restoration/source410/BT/PROJWEAP.HPP
T
CydandClaude Fable 5 1cab46ae72 Mech phase 2: reconstruct ProjectileWeapon + MissileLauncher + AmmoBin -- weapon family complete
ProjectileWeapon (: MechWeapon) -- ballistic (ammo-fed) base: ammo-bin link,
tracer/eject/jam/lead members. MissileLauncher (: ProjectileWeapon) -- salvo
launcher, using the surviving CODE MISLANCH.HPP (missileCount + per-salvo damage
split). AmmoBin (: HeatWatcher) -- ammo store with cook-off heat. All ctors chain
their parents + init from resource; fire paths staged.

Weapon family now COMPLETE: MechWeapon -> {Emitter -> PPC, GaussRifle;
ProjectileWeapon -> MissileLauncher} + AmmoBin. The surviving PPC.CPP/GAUSS.CPP
link against the reconstructed Emitter base. BT: 36 ok.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 00:27:08 -05:00

88 lines
2.5 KiB
C++

//===========================================================================//
// File: projweap.hpp //
// Project: BattleTech Brick: Mech weapons //
// Contents: ProjectileWeapon -- the ballistic (ammo-fed) weapon base //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#if !defined(PROJWEAP_HPP)
# define PROJWEAP_HPP
# if !defined(MECHWEAP_HPP)
# include <mechweap.hpp>
# endif
# if !defined(POINT3D_HPP)
# include <point3d.hpp>
# endif
//##################### Forward Class Declarations #######################
class Mech;
//###########################################################################
//################ ProjectileWeapon Model Resource #####################
//###########################################################################
struct ProjectileWeapon__SubsystemResource:
public MechWeapon::SubsystemResource
{
int tracerInterval;
int ammoBinIndex;
Scalar minTimeOfFlight;
Scalar minVoltagePercentToFire;
Scalar minJamChance;
Scalar muzzleVelocity;
int missileCount;
};
//###########################################################################
//######################### ProjectileWeapon ###########################
//###########################################################################
class ProjectileWeapon:
public MechWeapon
{
public:
static Derivation ClassDerivations;
static SharedData DefaultData;
static Logical
TestClass(Mech &);
Logical
TestInstance() const;
virtual void
FireWeapon();
public:
typedef ProjectileWeapon__SubsystemResource SubsystemResource;
ProjectileWeapon(
Mech *owner,
int subsystem_ID,
SubsystemResource *subsystem_resource,
SharedData &shared_data = DefaultData
);
~ProjectileWeapon();
protected:
SubsystemConnection ammoBinLink;
int tracerInterval;
int tracerCounter;
int ejectState;
Scalar totalTimeToEject;
Scalar timeToEject;
Scalar percentOfEject;
Scalar minJamChance;
Scalar minTimeOfFlight;
Scalar minVoltagePercentToFire;
Vector3D launchVelocity;
Vector3D tracerOrigin;
Point3D leadPosition;
int tracerModelHandle;
};
#endif