Load mod zone and model stuff

This commit is contained in:
momo5502 2016-11-10 20:05:49 +01:00
parent 5e2e9cb8a3
commit 29dcaa242b
5 changed files with 18 additions and 7 deletions

2
deps/mongoose vendored

@ -1 +1 @@
Subproject commit 5e91d919e0554bfb84f407c536396de07a25184a
Subproject commit fd45a6d31bd454a5386887fd4f860fbd3a32389c

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit 1f2dbc899b634f3236e1923a90683eebed283d52
Subproject commit 9f75c5aa851cd877fb0d93ccc31b8567a6706546

View File

@ -330,11 +330,13 @@ namespace Components
{
Utils::Memory::Allocator allocator;
// If this fails, you can try to fallback to OpenThreadToken
HANDLE hToken = nullptr;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &hToken))
{
return GetLastError();
if (!OpenThreadToken(GetCurrentThread(), TOKEN_READ, TRUE, &hToken))
{
return GetLastError();
}
}
auto freeSid = [] (void* sid)

View File

@ -220,8 +220,17 @@ namespace Components
const char* FastFiles::GetZoneLocation(const char* file)
{
const char* dir = Dvar::Var("fs_basepath").Get<const char*>();
std::vector<std::string> paths;
std::string modDir = Dvar::Var("fs_game").Get<std::string>();
if (file == "mod"s || file == "mod.ff"s || !modDir.empty())
{
paths.push_back(fmt::sprintf("zone\\%s\\", modDir.data()));
}
Utils::Merge(&paths, FastFiles::ZonePaths);
for (auto &path : FastFiles::ZonePaths)
for (auto &path : paths)
{
std::string absoluteFile = fmt::sprintf("%s\\%s%s", dir, path.data(), file);

View File

@ -1402,9 +1402,9 @@ namespace Game
GfxPackedVertex* vertexBuffer; // +28
int numCT; // +32
XRigidVertList* ct; // +36
char boneIndex;
char unk;
short something;
char unk;
char boneIndex;
int something2;
char pad5[16]; // +40
// pad5 matches XModelSurfaces pad