Reflex mapping format given its own file, removed from code
This commit is contained in:
parent
457595f2ff
commit
62de82a945
@ -259,9 +259,6 @@ EntityConverter::convertPickup(std::vector<std::string> &lines)
|
|||||||
* -Optionally includes angle, team indicator, and 0 or more game
|
* -Optionally includes angle, team indicator, and 0 or more game
|
||||||
* mode indicators (defaults to all modes enabled so this line
|
* mode indicators (defaults to all modes enabled so this line
|
||||||
* is used to disable a mode. eg Bool8 modeRace 0)
|
* is used to disable a mode. eg Bool8 modeRace 0)
|
||||||
* *mode indicators cause problem with maps that support race
|
|
||||||
* and other modes because Xonotic doesn't handle spawns this
|
|
||||||
* way
|
|
||||||
*--------------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
std::vector<std::string>
|
std::vector<std::string>
|
||||||
@ -272,7 +269,8 @@ EntityConverter::convertPlayerSpawn(std::vector<std::string> &lines)
|
|||||||
std::string coords[3];
|
std::string coords[3];
|
||||||
//Requires an angle so if no reflex one is given, use 0
|
//Requires an angle so if no reflex one is given, use 0
|
||||||
std::string angle("0");
|
std::string angle("0");
|
||||||
int team = 0; // 1-2 for corresponding team, 0 for deathmatch spawn
|
// 3 for race spawn, 1-2 for corresponding team, 0 for deathmatch spawn
|
||||||
|
int team = 0;
|
||||||
std::string trash;
|
std::string trash;
|
||||||
bool havePosition = false;
|
bool havePosition = false;
|
||||||
|
|
||||||
@ -468,7 +466,8 @@ std::vector<std::string>
|
|||||||
EntityConverter::convertRaceStart(std::vector<std::string> &lines)
|
EntityConverter::convertRaceStart(std::vector<std::string> &lines)
|
||||||
{
|
{
|
||||||
std::vector<std::string> convertedLines;
|
std::vector<std::string> convertedLines;
|
||||||
|
convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\"");
|
||||||
|
convertedLines.push_back ("\"cnt\" \"1\"");
|
||||||
return convertedLines;
|
return convertedLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -478,7 +477,8 @@ std::vector<std::string>
|
|||||||
EntityConverter::convertRaceFinish(std::vector<std::string> &lines)
|
EntityConverter::convertRaceFinish(std::vector<std::string> &lines)
|
||||||
{
|
{
|
||||||
std::vector<std::string> convertedLines;
|
std::vector<std::string> convertedLines;
|
||||||
|
convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\"");
|
||||||
|
convertedLines.push_back ("\"cnt\" \"0\"");
|
||||||
return convertedLines;
|
return convertedLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,49 +25,6 @@
|
|||||||
#ifndef ENTITY_CONVERTER_HPP
|
#ifndef ENTITY_CONVERTER_HPP
|
||||||
#define ENTITY_CONVERTER_HPP
|
#define ENTITY_CONVERTER_HPP
|
||||||
|
|
||||||
// Reflex Format
|
|
||||||
// -****While Worldspawn is an entity, an external parser handles
|
|
||||||
// this because it contains all other entities
|
|
||||||
// -"Pickup" denoted by ID
|
|
||||||
// conventional item and weapon conversion stored in r2x.ent
|
|
||||||
// -"PlayerSpawn" consists of coordinate (Vector3),
|
|
||||||
// angle (first element of Vector3),
|
|
||||||
// team indicator (on individual lines),
|
|
||||||
// game type indicator (on individual lines)
|
|
||||||
// -"JumpPad" stored as a brush and a Target
|
|
||||||
// -"Teleporter" stored as a brush and a Target
|
|
||||||
// -"Target" stored as a position (Vector3) and
|
|
||||||
// "name" (String32)
|
|
||||||
// ***Target can be destination of teleports OR jump pads
|
|
||||||
// -"RaceStart" stored as a brush
|
|
||||||
// -"RaceFinish" stored as a brush
|
|
||||||
// -MORE TO BE ADDED? (Effect, PointLight, Prefab, CameraPath, liquids)
|
|
||||||
|
|
||||||
// Xonotic Format
|
|
||||||
// -pickups prefixed by either "item_" or "weapon_"
|
|
||||||
// -spawns stored as separate entity types
|
|
||||||
// "info_player_deathmatch"
|
|
||||||
// "info_player_team1"
|
|
||||||
// "info_player_team2"
|
|
||||||
// "info_player_team3"
|
|
||||||
// "info_player_team4"
|
|
||||||
// where each consists of a coordinate "origin" (vector3)
|
|
||||||
// an angle "angle" (a single number)
|
|
||||||
// -jump pads stored as "classname" "target_push",
|
|
||||||
// a coordinate "origin" (vector3),
|
|
||||||
// a target "targetname"
|
|
||||||
// OR stored as "classname" "trigger_push",
|
|
||||||
// a target "target",
|
|
||||||
// a brush
|
|
||||||
// -teleports stored as "classname" "trigger_teleport"
|
|
||||||
// a target "target",
|
|
||||||
// a brush
|
|
||||||
// -teleport destinations stored as "classname" "misc_teleporter_dest",
|
|
||||||
// a coordinate "origin" (vector3),
|
|
||||||
// an angle "angle" (a single number),
|
|
||||||
// a target "targetname"
|
|
||||||
// -checkpoints stored as "trigger_race_checkpoint",
|
|
||||||
// a count "cnt", where "cnt" "0" is the finish line (start line?)
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -88,8 +45,7 @@ class EntityConverter
|
|||||||
*--------------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
EntityConverter(std::string entityMapFile);
|
EntityConverter(std::string entityMapFile);
|
||||||
/*
|
/* *--------------------------------------------------------------------------------------
|
||||||
*--------------------------------------------------------------------------------------
|
|
||||||
* Class: EntityConverter
|
* Class: EntityConverter
|
||||||
* Method: Constructor
|
* Method: Constructor
|
||||||
* Description: Creates entity format mapping and pre-scans for related entities
|
* Description: Creates entity format mapping and pre-scans for related entities
|
||||||
|
Loading…
Reference in New Issue
Block a user