[FastFiles] Load maps from userraw
IWD part is missing!
This commit is contained in:
parent
845d776507
commit
7b22727bdf
@ -239,6 +239,27 @@ namespace Components
|
|||||||
paths.push_back(Utils::String::VA("%s\\", modDir.data()));
|
paths.push_back(Utils::String::VA("%s\\", modDir.data()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Utils::String::StartsWith(file, "mp_"))
|
||||||
|
{
|
||||||
|
std::string zone = file;
|
||||||
|
if(Utils::String::EndsWith(zone, ".ff"))
|
||||||
|
{
|
||||||
|
Utils::String::Replace(zone, ".ff", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string filename = zone;
|
||||||
|
|
||||||
|
if (Utils::String::EndsWith(zone, "_load"))
|
||||||
|
{
|
||||||
|
Utils::String::Replace(zone, "_load", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Utils::IO::FileExists(Utils::String::VA("usermaps\\%s\\%s.ff", zone.data(), filename.data())))
|
||||||
|
{
|
||||||
|
return Utils::String::VA("usermaps\\%s\\", zone.data());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Utils::Merge(&paths, FastFiles::ZonePaths);
|
Utils::Merge(&paths, FastFiles::ZonePaths);
|
||||||
|
|
||||||
for (auto &path : paths)
|
for (auto &path : paths)
|
||||||
|
@ -673,16 +673,17 @@ namespace Components
|
|||||||
|
|
||||||
float cyan[4] = { 0.0f, 0.5f, 0.5f, 1.0f };
|
float cyan[4] = { 0.0f, 0.5f, 0.5f, 1.0f };
|
||||||
|
|
||||||
Game::GfxWorld** gameWorld = reinterpret_cast<Game::GfxWorld**>(0x66DEE94);
|
Game::GfxWorld*& gameWorld = *reinterpret_cast<Game::GfxWorld**>(0x66DEE94);
|
||||||
if (!*gameWorld) return;
|
if (!gameWorld) return;
|
||||||
|
|
||||||
for (int i = 0; i < (*gameWorld)->dpvsPlanes.cellCount; ++i)
|
for (int i = 0; i < gameWorld->dpvsPlanes.cellCount; ++i)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < (*gameWorld)->aabbTreeCounts[i].aabbTreeCount; ++j)
|
for (int j = 0; j < gameWorld->aabbTreeCounts[i].aabbTreeCount; ++j)
|
||||||
{
|
{
|
||||||
Game::vec3_t v1, v2, v3, v4, v5, v6, v7, v8;
|
Game::vec3_t v1, v2, v3, v4, v5, v6, v7, v8;
|
||||||
float* center = (*gameWorld)->aabbTrees[i].aabbTree[j].bounds.midPoint;
|
float* center = gameWorld->aabbTrees[i].aabbTree[j].bounds.midPoint;
|
||||||
float* halfSize = (*gameWorld)->aabbTrees[i].aabbTree[j].bounds.halfSize;
|
float* halfSize = gameWorld->aabbTrees[i].aabbTree[j].bounds.halfSize;
|
||||||
|
|
||||||
v1[0] = center[0] - halfSize[0];
|
v1[0] = center[0] - halfSize[0];
|
||||||
v1[1] = center[1] - halfSize[1];
|
v1[1] = center[1] - halfSize[1];
|
||||||
v1[2] = center[2] - halfSize[2];
|
v1[2] = center[2] - halfSize[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user