mirror of
https://github.com/rei-2/Amalgam
synced 2026-10-10 04:43:09 +08:00
fix for latest game update
mvm respawn/revive doesn't work properly though it seems to be a game issue
This commit is contained in:
@@ -215,7 +215,7 @@ void CMisc::InstantRespawnMVM(CTFPlayer* pLocal)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
KeyValues* kv = new KeyValues("MVM_Revive_Response");
|
KeyValues* kv = new KeyValues("MVM_Revive_Response");
|
||||||
kv->SetInt("accepted", 1);
|
kv->SetBool("accepted", true);
|
||||||
I::EngineClient->ServerCmdKeyValues(kv);
|
I::EngineClient->ServerCmdKeyValues(kv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,26 +5,25 @@
|
|||||||
#define Q_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
#define Q_ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
||||||
|
|
||||||
MAKE_SIGNATURE(KeyValues_LoadFromBuffer, "engine.dll", "4C 89 4C 24 ? 48 89 4C 24 ? 55 56", 0x0);
|
MAKE_SIGNATURE(KeyValues_LoadFromBuffer, "engine.dll", "4C 89 4C 24 ? 48 89 4C 24 ? 55 56", 0x0);
|
||||||
MAKE_SIGNATURE(KeyValues_Initialize, "engine.dll", "40 53 48 83 EC ? 48 8B D9 C7 01", 0x0);
|
MAKE_SIGNATURE(KeyValues_Initialize, "engine.dll", "40 53 48 83 EC ? 48 8B D9 C6 41 ? ? 33 C9 48 8B C2", 0x0);
|
||||||
MAKE_SIGNATURE(KeyValues_GetSymbolForStringClassic, "engine.dll", "48 89 5C 24 ? 57 48 83 EC ? 0F B6 DA 48 8B F9", 0x0);
|
MAKE_SIGNATURE(KeyValues_GetSymbolForStringClassic, "engine.dll", "48 89 5C 24 ? 57 48 83 EC ? 0F B6 DA 48 8B F9", 0x0);
|
||||||
MAKE_SIGNATURE(KeyValues_GetStringForSymbolClassic, "engine.dll", "40 53 48 83 EC ? 8B D9 FF 15", 0x0);
|
MAKE_SIGNATURE(KeyValues_GetStringForSymbolClassic, "engine.dll", "40 53 48 83 EC ? 8B D9 FF 15", 0x0);
|
||||||
MAKE_SIGNATURE(KeyValues_FindKey, "client.dll", "48 8B C4 53 57 41 56", 0x0);
|
MAKE_SIGNATURE(KeyValues_FindKey, "client.dll", "48 8B C4 53 55 56 48 81 EC ? ? ? ? 41 0F B6 E8", 0x0);
|
||||||
|
|
||||||
int UnicodeToUTF8(const wchar_t* unicode, char* ansi, int ansiBufferSize)
|
static int UnicodeToUTF8(const wchar_t* unicode, char* ansi, int ansiBufferSize)
|
||||||
{
|
{
|
||||||
int result = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, ansi, ansiBufferSize, NULL, NULL);
|
int result = WideCharToMultiByte(CP_UTF8, 0, unicode, -1, ansi, ansiBufferSize, NULL, NULL);
|
||||||
ansi[ansiBufferSize - 1] = 0;
|
ansi[ansiBufferSize - 1] = 0;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int UTF8ToUnicode(const char* ansi, wchar_t* unicode, int unicodeBufferSizeInBytes)
|
static int UTF8ToUnicode(const char* ansi, wchar_t* unicode, int unicodeBufferSizeInBytes)
|
||||||
{
|
{
|
||||||
int chars = MultiByteToWideChar(CP_UTF8, 0, ansi, -1, unicode, unicodeBufferSizeInBytes / sizeof(wchar_t));
|
int chars = MultiByteToWideChar(CP_UTF8, 0, ansi, -1, unicode, unicodeBufferSizeInBytes / sizeof(wchar_t));
|
||||||
unicode[(unicodeBufferSizeInBytes / sizeof(wchar_t)) - 1] = 0;
|
unicode[(unicodeBufferSizeInBytes / sizeof(wchar_t)) - 1] = 0;
|
||||||
return chars;
|
return chars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool KeyValues::LoadFromBuffer(char const* resource_name, const char* buffer, void* file_system, const char* path_id)
|
bool KeyValues::LoadFromBuffer(char const* resource_name, const char* buffer, void* file_system, const char* path_id)
|
||||||
{
|
{
|
||||||
return S::KeyValues_LoadFromBuffer.Call<bool>(this, resource_name, buffer, file_system, path_id);
|
return S::KeyValues_LoadFromBuffer.Call<bool>(this, resource_name, buffer, file_system, path_id);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ void CEventListener::FireGameEvent(IGameEvent* pEvent)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
KeyValues* kv = new KeyValues("MVM_Revive_Response");
|
KeyValues* kv = new KeyValues("MVM_Revive_Response");
|
||||||
kv->SetInt("accepted", 1);
|
kv->SetBool("accepted", true);
|
||||||
I::EngineClient->ServerCmdKeyValues(kv);
|
I::EngineClient->ServerCmdKeyValues(kv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user