Game Map Asset: Difference between revisions
Created page with "__NOTOC__ Category:Assets Category:CoD4 Category:MW2 Category:MW3 Category:Ghosts Category:WaW Category:BO1 Category:BO2 The game map (or game ..." |
|||
| Line 406: | Line 406: | ||
=== Multiplayer === | === Multiplayer === | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
struct | struct GameWorldMp | ||
{ | { | ||
const char *name; | const char *name; | ||
Revision as of 06:55, 28 January 2014
The game map (or game world) is part of the D3DBSP system produced by Radiant, and is on every Call of Duty game except for Modern Warfare 3 and Ghosts. This contains scripting information for the map, such as AI pathing information.
Call of Duty 4 Single Player & World at War & Black Ops 1
For World at War and Black Ops 1, the MP and SP assets are identical.
enum nodeType
{
NODE_BADNODE = 0x0,
NODE_PATHNODE = 0x1,
NODE_COVER_STAND = 0x2,
NODE_COVER_CROUCH = 0x3,
NODE_COVER_CROUCH_WINDOW = 0x4,
NODE_COVER_PRONE = 0x5,
NODE_COVER_RIGHT = 0x6,
NODE_COVER_LEFT = 0x7,
NODE_COVER_WIDE_RIGHT = 0x8,
NODE_COVER_WIDE_LEFT = 0x9,
NODE_CONCEALMENT_STAND = 0xA,
NODE_CONCEALMENT_CROUCH = 0xB,
NODE_CONCEALMENT_PRONE = 0xC,
NODE_REACQUIRE = 0xD,
NODE_BALCONY = 0xE,
NODE_SCRIPTED = 0xF,
NODE_NEGOTIATION_BEGIN = 0x10,
NODE_NEGOTIATION_END = 0x11,
NODE_TURRET = 0x12,
NODE_GUARD = 0x13,
NODE_NUMTYPES = 0x14,
};
struct pathlink_s
{
float fDist;
unsigned __int16 nodeNum;
char disconnectCount;
char negotiationLink;
char ubBadPlaceCount[4];
};
struct pathnode_constant_t
{
nodeType type;
unsigned __int16 spawnflags;
ScriptString targetname;
ScriptString script_linkName;
ScriptString script_noteworthy;
ScriptString target;
ScriptString animscript;
int animscriptfunc;
float vOrigin[3];
float fAngle;
float forward[2];
float fRadius;
float minUseDistSq;
__int16 wOverlapNode[2];
__int16 wChainId;
__int16 wChainDepth;
__int16 wChainParent;
unsigned __int16 totalLinkCount;
pathlink_s *Links;
};
struct pathnode_dynamic_t
{
struct sentient_s *pOwner;
int iFreeTime;
int iValidTime[3];
int inPlayerLOSTime;
__int16 wLinkCount;
__int16 wOverlapCount;
__int16 turretEntNumber;
__int16 userCount;
};
struct pathnode_t
{
pathnode_constant_t constant;
pathnode_dynamic_t dynamic;
pathnode_transient_t transient;
};
struct pathnode_transient_t
{
int iSearchFrame;
pathnode_t *pNextOpen;
pathnode_t *pPrevOpen;
pathnode_t *pParent;
float fCost;
float fHeuristic;
float costFactor;
};
struct pathnode_tree_t
{
int axis;
float dist;
pathnode_tree_info_t u;
};
struct pathnode_tree_nodes_t
{
int nodeCount;
unsigned short **nodes;
};
union pathnode_tree_info_t
{
pathnode_tree_t *child[2];
pathnode_tree_nodes_t s;
};
typdef char pathbasenode_t[0x10];
struct PathData
{
unsigned int nodeCount;
pathnode_t *nodes;
pathbasenode_t *nodeBases;
unsigned int chainNodeCount;
unsigned __int16 *chainNodeForNode;
unsigned __int16 *nodeForChainNode;
int visBytes;
char *pathVis;
int nodeTreeCount;
pathnode_tree_t *nodeTree;
};
struct GameWorldSp
{
const char *name;
PathData path;
};Black Ops 2
The Black Ops 2 game maps (which are loaded exactly the same) are slightly different from its predecessors.
enum nodeType
{
NODE_BADNODE = 0x0,
NODE_PATHNODE = 0x1,
NODE_COVER_STAND = 0x2,
NODE_COVER_CROUCH = 0x3,
NODE_COVER_CROUCH_WINDOW = 0x4,
NODE_COVER_PRONE = 0x5,
NODE_COVER_RIGHT = 0x6,
NODE_COVER_LEFT = 0x7,
NODE_COVER_WIDE_RIGHT = 0x8,
NODE_COVER_WIDE_LEFT = 0x9,
NODE_CONCEALMENT_STAND = 0xA,
NODE_CONCEALMENT_CROUCH = 0xB,
NODE_CONCEALMENT_PRONE = 0xC,
NODE_REACQUIRE = 0xD,
NODE_BALCONY = 0xE,
NODE_SCRIPTED = 0xF,
NODE_NEGOTIATION_BEGIN = 0x10,
NODE_NEGOTIATION_END = 0x11,
NODE_TURRET = 0x12,
NODE_GUARD = 0x13,
NODE_NUMTYPES = 0x14,
};
struct pathlink_s
{
char unknown[0x10];
};
struct pathnode_constant_t
{
nodeType type;
unsigned __int16 spawnflags;
ScriptString targetname;
ScriptString script_linkName;
ScriptString script_noteworthy;
ScriptString target;
ScriptString animscript;
int animscriptfunc;
float vOrigin[3];
float fAngle;
float forward[2];
float fRadius;
float minUseDistSq;
__int16 wOverlapNode[2];
__int16 wChainId;
__int16 wChainDepth;
__int16 wChainParent;
unsigned __int16 totalLinkCount;
pathlink_s *Links;
};
struct pathnode_t
{
pathnode_constant_t constant;
char unknown[0x4C];
};
struct pathnode_tree_t
{
int axis;
float dist;
pathnode_tree_info_t u;
};
struct pathnode_tree_nodes_t
{
int nodeCount;
unsigned short **nodes;
};
union pathnode_tree_info_t
{
pathnode_tree_t *child[2];
pathnode_tree_nodes_t s;
};
typdef char pathbasenode_t[0x10];
struct PathData
{
unsigned int nodeCount;
pathnode_t *nodes;
pathbasenode_t *nodeBases;
unsigned int chainNodeCount;
unsigned __int16 *chainNodeForNode;
unsigned __int16 *nodeForChainNode;
int visBytes;
char *pathVis;
int nodeTreeCount;
pathnode_tree_t *nodeTree;
};
struct GameWorldSp
{
const char *name;
PathData path;
};Call of Duty 4 Multiplayer
The multiplayer Call of Duty 4 game world is pretty much unneeded.
struct GameWorldMp
{
const char *name;
};Modern Warfare 2
Single Player
enum nodeType
{
NODE_BADNODE = 0x0,
NODE_PATHNODE = 0x1,
NODE_COVER_STAND = 0x2,
NODE_COVER_CROUCH = 0x3,
NODE_COVER_CROUCH_WINDOW = 0x4,
NODE_COVER_PRONE = 0x5,
NODE_COVER_RIGHT = 0x6,
NODE_COVER_LEFT = 0x7,
NODE_COVER_WIDE_RIGHT = 0x8,
NODE_COVER_WIDE_LEFT = 0x9,
NODE_CONCEALMENT_STAND = 0xA,
NODE_CONCEALMENT_CROUCH = 0xB,
NODE_CONCEALMENT_PRONE = 0xC,
NODE_REACQUIRE = 0xD,
NODE_BALCONY = 0xE,
NODE_SCRIPTED = 0xF,
NODE_NEGOTIATION_BEGIN = 0x10,
NODE_NEGOTIATION_END = 0x11,
NODE_TURRET = 0x12,
NODE_GUARD = 0x13,
NODE_NUMTYPES = 0x14,
};
struct pathlink_s
{
float fDist;
unsigned __int16 nodeNum;
char disconnectCount;
char negotiationLink;
char ubBadPlaceCount[4];
};
struct pathnode_constant_t
{
nodeType type;
unsigned __int16 spawnflags;
ScriptString targetname;
ScriptString script_linkName;
ScriptString script_noteworthy;
ScriptString target;
ScriptString animscript;
int animscriptfunc;
float vOrigin[3];
float fAngle;
float forward[2];
float fRadius;
float minUseDistSq;
__int16 wOverlapNode[2];
unsigned __int16 totalLinkCount;
pathlink_s *Links;
};
struct pathnode_t
{
pathnode_constant_t constant;
char unknown[0x48];
};
struct pathnode_tree_t
{
int axis;
float dist;
pathnode_tree_info_t u;
};
struct pathnode_tree_nodes_t
{
int nodeCount;
unsigned short **nodes;
};
union pathnode_tree_info_t
{
pathnode_tree_t *child[2];
pathnode_tree_nodes_t s;
};
typdef char pathbasenode_t[0x10];
struct PathData
{
unsigned int nodeCount;
pathnode_t *nodes;
pathbasenode_t *nodeBases;
unsigned int chainNodeCount;
unsigned __int16 *chainNodeForNode;
unsigned __int16 *nodeForChainNode;
int visBytes;
char *pathVis;
int nodeTreeCount;
pathnode_tree_t *nodeTree;
};
struct unknownGameWorldSpStruct1Internal1Internal1
{
char unknown1[0x34];
unsigned int unknownCount;
char * unknown2; //Size = ((unknownCount << 1) + unknownCount) << 2
};
struct unknownGameWorldSpStruct1Internal1Internal2
{
unknownGameWorldSpStruct1Internal1Internal1 * unknownStruct;
};
struct unknownGameWorldSpStruct1Internal1
{
const char * unknownString;
unsigned int unknownCount1;
unknownGameWorldSpStruct1Internal1Internal1 * unknownStructs1;
unsigned int unknownCount2;
unknownGameWorldSpStruct1Internal1Internal2 * unknownStructs2;
unsigned int unknownCount3;
unknownGameWorldSpStruct1Internal1Internal2 * unknownStructs3;
char unknown[0x10];
};
struct unknownGameWorldSpStruct1
{
unsigned int unknownCount;
unknownGameWorldSpStruct1Internal1 * unknownStructs;
};
struct unknownGameWorldStruct2Internal1
{
char * unknownString;
short unknown1;
short unknownCount1;
unsigned short * unknown2; //Count = unknownCount1
};
struct unknownGameWorldStruct2
{
unsigned int unknownCount1;
char * unknown1; //Size = ((unknownCount1 << 1) + unknownCount1) << 2
unsigned int unknownCount2;
unknownGameWorldStruct2Internal1 * unknownStructs;
char unknown2[0x6C];
};
struct GameWorldSp
{
const char *name;
PathData path;
unknownGameWorldSpStruct1 unknownStruct1;
unknownGameWorldStruct2 * unknownStruct2;
};Multiplayer
struct GameWorldMp
{
const char *name;
unknownGameWorldStruct2 * unknownStruct; //Refer to this from the singleplayer section
};