diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 340b952f..5eb6ca25 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -571,7 +571,7 @@ namespace Components float* _selfOrigin = reinterpret_cast(0x85B708); glm::vec2 selfOrigin(_selfOrigin[0], _selfOrigin[1]); - selfOrigin -= (glm::normalize(forward) * 200.0f); // Move 200 units back + selfOrigin -= (forward * 200.0f); // Move 200 units back for (unsigned int i = 0; i < gameWorld->dpvs.smodelCount; ++i) { diff --git a/src/Game/Functions.cpp b/src/Game/Functions.cpp index 5a13bd79..f16ec22e 100644 --- a/src/Game/Functions.cpp +++ b/src/Game/Functions.cpp @@ -503,6 +503,31 @@ namespace Game } } + __declspec(naked) XAssetEntry* DB_FindXAssetEntry(XAssetType /*type*/, const char* /*name*/) + { + __asm + { + push eax + pushad + + mov edi, [esp + 2Ch] // name + push edi + + mov edi, [esp + 2Ch] // type + + mov eax, 5BB1B0h + call eax + + add esp, 4h + + mov[esp + 20h], eax + popad + pop eax + + retn + } + } + __declspec(naked) void FS_AddLocalizedGameDirectory(const char* /*path*/, const char* /*dir*/) { __asm @@ -770,8 +795,8 @@ namespace Game push eax // debugglobals - mov edi, ds:66DAD78h - add edi, 268772 + mov esi, ds:66DAD78h + add esi, 268772 mov edi, [esp + 2Ch] // color diff --git a/src/Game/Functions.hpp b/src/Game/Functions.hpp index d3c6b03a..febb96bc 100644 --- a/src/Game/Functions.hpp +++ b/src/Game/Functions.hpp @@ -746,6 +746,7 @@ namespace Game XAssetType DB_GetXAssetNameType(const char* name); bool DB_IsZoneLoaded(const char* zone); XAssetHeader DB_FindXAssetDefaultHeaderInternal(XAssetType type); + XAssetEntry* DB_FindXAssetEntry(XAssetType type, const char* name); void FS_AddLocalizedGameDirectory(const char *path, const char *dir); diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 455ab94f..d9e54f16 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -3063,8 +3063,6 @@ namespace Game float scale; }; - - struct GfxStaticModelDrawInst { GfxPackedPlacement placement; @@ -3125,6 +3123,12 @@ namespace Game float coeffs[4]; }; + struct DpvsPlanes + { + DpvsPlane *planes; + int count; + }; + struct GfxPortal { GfxPortalWritable writable;