Load mod zone and model stuff
This commit is contained in:
2
deps/mongoose
vendored
2
deps/mongoose
vendored
Submodule deps/mongoose updated: 5e91d919e0...fd45a6d31b
2
deps/protobuf
vendored
2
deps/protobuf
vendored
Submodule deps/protobuf updated: 1f2dbc899b...9f75c5aa85
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user