From 62de82a945bbb25173892659023bb2ab963c5084 Mon Sep 17 00:00:00 2001 From: suhrke Date: Mon, 3 Jul 2017 17:04:06 -0700 Subject: [PATCH] Reflex mapping format given its own file, removed from code --- ReflexToQ3/includes/EntityConverter.cpp | 12 +++---- ReflexToQ3/includes/EntityConverter.hpp | 46 +------------------------ ReflexToQ3/{r2x.ent => r2x.pck} | 0 3 files changed, 7 insertions(+), 51 deletions(-) rename ReflexToQ3/{r2x.ent => r2x.pck} (100%) diff --git a/ReflexToQ3/includes/EntityConverter.cpp b/ReflexToQ3/includes/EntityConverter.cpp index d2ba973..79852b5 100644 --- a/ReflexToQ3/includes/EntityConverter.cpp +++ b/ReflexToQ3/includes/EntityConverter.cpp @@ -259,9 +259,6 @@ EntityConverter::convertPickup(std::vector &lines) * -Optionally includes angle, team indicator, and 0 or more game * mode indicators (defaults to all modes enabled so this line * 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 @@ -272,7 +269,8 @@ EntityConverter::convertPlayerSpawn(std::vector &lines) std::string coords[3]; //Requires an angle so if no reflex one is given, use 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; bool havePosition = false; @@ -468,7 +466,8 @@ std::vector EntityConverter::convertRaceStart(std::vector &lines) { std::vector convertedLines; - + convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\""); + convertedLines.push_back ("\"cnt\" \"1\""); return convertedLines; } @@ -478,7 +477,8 @@ std::vector EntityConverter::convertRaceFinish(std::vector &lines) { std::vector convertedLines; - + convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\""); + convertedLines.push_back ("\"cnt\" \"0\""); return convertedLines; } diff --git a/ReflexToQ3/includes/EntityConverter.hpp b/ReflexToQ3/includes/EntityConverter.hpp index 7e8b303..3535702 100644 --- a/ReflexToQ3/includes/EntityConverter.hpp +++ b/ReflexToQ3/includes/EntityConverter.hpp @@ -25,49 +25,6 @@ #ifndef 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 #include @@ -88,8 +45,7 @@ class EntityConverter *-------------------------------------------------------------------------------------- */ EntityConverter(std::string entityMapFile); - /* - *-------------------------------------------------------------------------------------- + /* *-------------------------------------------------------------------------------------- * Class: EntityConverter * Method: Constructor * Description: Creates entity format mapping and pre-scans for related entities diff --git a/ReflexToQ3/r2x.ent b/ReflexToQ3/r2x.pck similarity index 100% rename from ReflexToQ3/r2x.ent rename to ReflexToQ3/r2x.pck