[StructuredData] Reset empty classnames
This commit is contained in:
parent
89ef10b789
commit
0d4934d163
@ -20,7 +20,7 @@ namespace Components
|
|||||||
|
|
||||||
Console::FreeNativeConsole();
|
Console::FreeNativeConsole();
|
||||||
|
|
||||||
if (Loader::PerformingUnitTests() || Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) return;
|
if (Loader::PerformingUnitTests() || Dedicated::IsEnabled() || ZoneBuilder::IsEnabled() || Monitor::IsEnabled()) return;
|
||||||
|
|
||||||
Singleton::FirstInstance = (CreateMutexA(nullptr, FALSE, "iw4x_mutex") && GetLastError() != ERROR_ALREADY_EXISTS);
|
Singleton::FirstInstance = (CreateMutexA(nullptr, FALSE, "iw4x_mutex") && GetLastError() != ERROR_ALREADY_EXISTS);
|
||||||
|
|
||||||
|
@ -152,6 +152,17 @@ namespace Components
|
|||||||
// 15 or more custom classes
|
// 15 or more custom classes
|
||||||
Utils::Hook::Set<BYTE>(0x60A2FE, NUM_CUSTOM_CLASSES);
|
Utils::Hook::Set<BYTE>(0x60A2FE, NUM_CUSTOM_CLASSES);
|
||||||
|
|
||||||
|
// Reset empty names
|
||||||
|
Command::Add("checkClasses", [](Command::Params*)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < NUM_CUSTOM_CLASSES; ++i)
|
||||||
|
{
|
||||||
|
// TODO: Correctly lookup using structured data
|
||||||
|
char* className = (reinterpret_cast<char*>(0x1AD3694) - 4 + 3003 + (64 * i) + 0x29);
|
||||||
|
if (!*className) strcpy_s(className, 24, Game::SEH_StringEd_GetString(Utils::String::VA("CLASS_SLOT%i", i + 1)));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Only execute this when building zones
|
// Only execute this when building zones
|
||||||
if (!ZoneBuilder::IsEnabled()) return;
|
if (!ZoneBuilder::IsEnabled()) return;
|
||||||
|
|
||||||
|
@ -1560,6 +1560,11 @@ namespace Game
|
|||||||
size_t size; // 8188
|
size_t size; // 8188
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct StructuredDataLookup
|
||||||
|
{
|
||||||
|
char pad[0x10];
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
StructuredDataDef* data;
|
StructuredDataDef* data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user