Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

109 lines
3.2 KiB
C++

//===========================================================================//
// File: mechai.hpp //
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 07/13/99 AHF Created File //
//---------------------------------------------------------------------------//
// Copyright (C) 1999, Microsoft //
// All Rights reserved worldwide //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
//===========================================================================//
#pragma once
#include "CombatAI.hpp"
#include "mech.hpp"
namespace MechWarrior4
{
typedef CombatAI__CreateMessage MechAI__CreateMessage;
//##########################################################################
//########################### MechAI ##################################
//##########################################################################
class MechAI
: public CombatAI
{
typedef CombatAI inherited;
public:
static void InitializeClass();
static void TerminateClass();
static ClassData *DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Inheritance Support
//
public:
typedef MechAI__CreateMessage CreateMessage;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Run-time Construction and Destruction Support
//
public:
static MechAI* Make(CreateMessage *message,ReplicatorID *base_id);
virtual void Save (MemoryStream *stream);
virtual void Load (MemoryStream *stream);
static void NotifyShutDownMechsShotFired(const Adept::Entity::CollisionQuery& query, MWObject& shooter);
protected:
MechAI(
ClassData *class_data,
CreateMessage *message,
ReplicatorID *base_id,
ElementRenderer::Element *element
);
virtual ~MechAI();
static std::list<MechAI*>* m_gShutdownMechAIs;
static int m_gShutdownMechAIs_RefCount;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Message Support
//
public:
enum {
DebugTextMessageID = MechWarrior4::CombatAI::NextMessageID,
NextMessageID
};
void DebugTextMessageHandler(Adept::ReceiverDataMessageOf<int> *message);
virtual bool GetLeaderAlignment(int& alignment);
protected:
static const MessageEntry MessageEntries[];
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Execution Support
//
protected:
MechWarrior4::Mech *m_Mech;
public:
virtual void PreCollisionExecute(Stuff::Time till);
virtual bool ReactToCollision(Stuff::DynamicArrayOf<CollisionData> *collisions,bool& shoulddamage);
virtual void Shutdown (void);
virtual void Startup (void);
virtual void SetOrderSpeed (Stuff::Scalar newvalue);
virtual bool ShouldRunScript();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Test Support
//
public:
void TestInstance() const;
};
}