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.
159 lines
5.4 KiB
C++
159 lines
5.4 KiB
C++
//===========================================================================//
|
|
// File: NetVehicleMovement.hpp
|
|
//---------------------------------------------------------------------------//
|
|
// Date Who Modification //
|
|
// -------- --- ---------------------------------------------------------- //
|
|
// 05/18/2000 JSE Inital coding
|
|
//---------------------------------------------------------------------------//
|
|
// Copyright (C) 1998, Microsoft Corp. //
|
|
// All Rights reserved worldwide //
|
|
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL //
|
|
//===========================================================================//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "NetConstants.hpp"
|
|
#include "NetUpdateManager.hpp"
|
|
|
|
|
|
|
|
|
|
namespace MechWarrior4
|
|
{
|
|
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
class AirMovementUpdate
|
|
{
|
|
public:
|
|
|
|
enum {
|
|
XPositionUpdateEntryID = 0,
|
|
YPositionUpdateEntryID,
|
|
ZPositionUpdateEntryID,
|
|
YawPositionUpdateEntryID,
|
|
PitchPositionUpdateEntryID,
|
|
RollPositionUpdateEntryID,
|
|
CurrentSpeedUpdateEntryID,
|
|
SpeedDemandUpdateEntryID,
|
|
YawDemandUpdateEntryID,
|
|
PitchDemandUpdateEntryID,
|
|
RollDemandUpdateEntryID,
|
|
UpdateEntryCount
|
|
};
|
|
|
|
enum {
|
|
UpdateType = UpdateManager::AirMovementUpdateID
|
|
};
|
|
|
|
|
|
static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
|
|
static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
|
|
static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
|
|
static int SizeFunction(Entity *entity){return -1;};
|
|
static int MaxSize(Entity *entity, int debug_level, int bandwidth);
|
|
static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);
|
|
|
|
static int GetUpdateEntryCount(){return UpdateEntryCount;};
|
|
static int GetUpdateEntryType(){return UpdateType;};
|
|
|
|
};
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
class GroundMovementUpdate
|
|
{
|
|
public:
|
|
|
|
enum {
|
|
XPositionUpdateEntryID = 0,
|
|
YPositionUpdateEntryID,
|
|
ZPositionUpdateEntryID,
|
|
YawPositionUpdateEntryID,
|
|
CurrentSpeedUpdateEntryID,
|
|
SpeedDemandUpdateEntryID,
|
|
YawDemandUpdateEntryID,
|
|
UpdateEntryCount
|
|
};
|
|
|
|
enum {
|
|
UpdateType = UpdateManager::GroundMovementUpdateID
|
|
};
|
|
|
|
|
|
static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
|
|
static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
|
|
static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
|
|
static int SizeFunction(Entity *entity){return -1;};
|
|
static int MaxSize(Entity *entity, int debug_level, int bandwidth);
|
|
static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);
|
|
|
|
static int GetUpdateEntryCount(){return UpdateEntryCount;};
|
|
static int GetUpdateEntryType(){return UpdateType;};
|
|
|
|
};
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class TurretMovementUpdate
|
|
{
|
|
public:
|
|
|
|
enum {
|
|
UpdateEntryCount = 0
|
|
};
|
|
|
|
enum {
|
|
UpdateType = UpdateManager::TurretMovementUpdateID
|
|
};
|
|
|
|
|
|
static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
|
|
static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
|
|
static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
|
|
static int SizeFunction(Entity *entity){return -1;};
|
|
static int MaxSize(Entity *entity, int debug_level, int bandwidth);
|
|
static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);
|
|
|
|
static int GetUpdateEntryCount(){return UpdateEntryCount;};
|
|
static int GetUpdateEntryType(){return UpdateType;};
|
|
|
|
};
|
|
|
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
class TorsoMovementUpdate
|
|
{
|
|
public:
|
|
|
|
enum {
|
|
PitchTorsoPositionUpdateEntryID = 0,
|
|
YawTorsoPositionUpdateEntryID,
|
|
PitchTorsoDemandUpdateEntryID,
|
|
YawTorsoDemandUpdateEntryID,
|
|
UpdateEntryCount
|
|
};
|
|
|
|
enum {
|
|
UpdateType = UpdateManager::TorsoMovementUpdateID
|
|
};
|
|
|
|
|
|
static void Decode(Entity *entity, MemoryStream *memory_stream, Time till, Scalar packet_latency, int connection, int debug_level, int bandwidth, Scalar rate);
|
|
static void Skip(MemoryStream *memory_stream, int size, Time till, int connection, int debug_level, int bandwidth);
|
|
static void Encode(Entity *entity, DynamicMemoryStream *memory_stream, int connection, int debug_level, int bandwidth);
|
|
static int SizeFunction(Entity *entity){return -1;};
|
|
static int MaxSize(Entity *entity, int debug_level, int bandwidth);
|
|
static bool MaintainActiveFlagFunction(Entity *entity,Point3D cull_location);
|
|
|
|
static int GetUpdateEntryCount(){return UpdateEntryCount;};
|
|
static int GetUpdateEntryType(){return UpdateType;};
|
|
|
|
};
|
|
|
|
|
|
}; |