//===========================================================================// // File: mislanch.cpp // // Project: BattleTech Brick: Mech weapons // // Contents: MissileLauncher -- a projectile weapon that fires missile salvos // //---------------------------------------------------------------------------// // Copyright (C) 1995, Virtual World Entertainment, Inc. // // All Rights reserved worldwide // // This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL // //===========================================================================// #include #pragma hdrstop #if !defined(MISLANCH_HPP) # include #endif #if !defined(MECH_HPP) # include #endif Derivation MissileLauncher::ClassDerivations( ProjectileWeapon::ClassDerivations, "MissileLauncher" ); MissileLauncher::SharedData MissileLauncher::DefaultData( MissileLauncher::ClassDerivations, Subsystem::MessageHandlers, Subsystem::AttributeIndex, Subsystem::StateCount ); MissileLauncher::MissileLauncher( Mech *owner, int subsystem_ID, SubsystemResource *subsystem_resource, SharedData &default_data ): ProjectileWeapon(owner, subsystem_ID, subsystem_resource, default_data) { Check(owner); Check_Pointer(subsystem_resource); missileCount = subsystem_resource->missileCount; // // A salvo delivers missileCount missiles; split the per-shot damage across // the salvo. (The per-missile launch mechanics live in FireWeapon, staged.) // if (missileCount > 0) { damageData.burstCount = missileCount; damageData.damageAmount = damageData.damageAmount / (Scalar)missileCount; } Check_Fpu(); } MissileLauncher::~MissileLauncher() { } Logical MissileLauncher::TestInstance() const { return IsDerivedFrom(ClassDerivations); } // //############################################################################# // Damage / death. //############################################################################# // void MissileLauncher::TakeDamage(Damage &damage) { Check(this); ProjectileWeapon::TakeDamage(damage); } void MissileLauncher::DeathReset(Logical /*full_reset*/) { Check(this); } // // The missile-salvo discharge. Not yet reconstructed. // void MissileLauncher::FireWeapon() { Fail("MissileLauncher::FireWeapon -- mislanch.cpp not yet reconstructed"); } // // Model-load-time construction. Not yet reconstructed. // Logical MissileLauncher::CreateStreamedSubsystem( ResourceFile *, NotationFile *, const char *, const char *, SubsystemResource *, NotationFile *, const ResourceDirectories *, int ) { Fail("MissileLauncher::CreateStreamedSubsystem -- mislanch.cpp not yet reconstructed"); return False; }