//===========================================================================// // File: projweap.cpp // // Project: BattleTech Brick: Mech weapons // // Contents: ProjectileWeapon -- ballistic (ammo-fed) weapon base // //---------------------------------------------------------------------------// // Copyright (C) 1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #pragma hdrstop #if !defined(PROJWEAP_HPP) # include #endif #if !defined(MECH_HPP) # include #endif Derivation ProjectileWeapon::ClassDerivations( MechWeapon::ClassDerivations, "ProjectileWeapon" ); ProjectileWeapon::SharedData ProjectileWeapon::DefaultData( ProjectileWeapon::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount ); ProjectileWeapon::ProjectileWeapon( Mech *owner, int subsystem_ID, SubsystemResource *subsystem_resource, SharedData &shared_data ): MechWeapon(owner, subsystem_ID, subsystem_resource, shared_data), ammoBinLink() { Check(owner); Check_Pointer(subsystem_resource); tracerInterval = subsystem_resource->tracerInterval; minTimeOfFlight = subsystem_resource->minTimeOfFlight; minJamChance = subsystem_resource->minJamChance; minVoltagePercentToFire = subsystem_resource->minVoltagePercentToFire; tracerCounter = 0; ejectState = 0; totalTimeToEject = 0.0f; timeToEject = 0.0f; percentOfEject = 0.0f; tracerModelHandle = 0; leadPosition = Point3D(0.0f, 0.0f, 0.0f); launchVelocity = Vector3D(0.0f, 0.0f, 0.0f); tracerOrigin = Vector3D(0.0f, 0.0f, 0.0f); Check_Fpu(); } ProjectileWeapon::~ProjectileWeapon() { } Logical ProjectileWeapon::TestClass(Mech &) { return True; } Logical ProjectileWeapon::TestInstance() const { return IsDerivedFrom(ClassDerivations); } // // The ballistic discharge (ammo feed, jam roll, tracer, projectile spawn). // Not yet reconstructed. // void ProjectileWeapon::FireWeapon() { Fail("ProjectileWeapon::FireWeapon -- projweap.cpp not yet reconstructed"); }