Vehicle Track Asset

From COD Engine Research
Jump to: navigation, search

The vehicle_track asset was added on Modern Warfare 3 and remained completely unchanged on Ghosts. It clearly holds pathing information for particular vehicles to be bound to on a particular map. It is part of the D3DBSP system produced by Radiant.

struct VehicleTrackObstacle
{
  float origin[2];
  float radius;
};
 
struct __declspec(align(8)) VehicleTrackSector
{
  float startEdgeDir[2];
  float startEdgeDist;
  float leftEdgeDir[2];
  float leftEdgeDist;
  float rightEdgeDir[2];
  float rightEdgeDist;
  float sectorLength;
  float sectorWidth;
  float totalPriorLength;
  float totalFollowingLength;
  VehicleTrackObstacle *obstacles;
  unsigned int obstacleCount;
};
 
const struct __declspec(align(8)) VehicleTrackSegment
{
  const char * targetName;
  VehicleTrackSector *sectors;
  unsigned int sectorCount;
  VehicleTrackSegment **nextBranches;
  unsigned int nextBranchesCount;
  VehicleTrackSegment **prevBranches;
  unsigned int prevBranchesCount;
  float endEdgeDir[2];
  float endEdgeDist;
  float totalLength;
};
 
struct __declspec(align(8)) VehicleTrack
{
  const char * name;
  VehicleTrackSegment *segments;
  unsigned int segmentCount;
};