This commit is contained in:
FutureRave 2021-10-04 21:07:54 +01:00
parent d948024895
commit 75a5200055
No known key found for this signature in database
GPG Key ID: E883E2BC9657D955
2 changed files with 18 additions and 30 deletions

View File

@ -203,7 +203,6 @@ namespace Components
while (it != Dvar::ChangedDvars.end())
{
auto var = Dvar::Var(*it).get<Game::dvar_t*>();
assert(var != nullptr);
Dvar::DvarReset(var, Game::DVAR_SOURCE_INTERNAL);
it = Dvar::ChangedDvars.erase(it);
}

View File

@ -1055,20 +1055,22 @@ namespace Game
{
__asm
{
push eax
pushad
mov eax, [esp + 0x4 + 0x20] // dvar
push[esp + 0x18 + 0x20] // source
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
mov edi, [esp + 2Ch] // name
push edi
mov ebx, 0x647400
call ebx
add esp, 0x14
mov edi, [esp + 2Ch] // type
mov eax, 5BB1B0h
call eax
add esp, 4h
mov [esp + 20h], eax
popad
pop eax
retn
}
@ -1497,29 +1499,16 @@ namespace Game
{
pushad
mov edx, [esp + 8h + 20h] // First 4 bytes of DvarValue
mov ecx, [esp + 18h + 20h] // Source
push ecx // Push from right to left
mov ecx, [esp + 8h + 20h] // dvar_t pointer, because of last push it's not at esp + 4 anymore
sub esp, 10h // Reserve space for DvarValue
mov eax, esp
mov [eax], edx // DvarValue
// 20h + 10h because of sub esp, 10h
mov edx, [esp + 10h + 30h] // Second 4 bytes of DvarValue
mov [eax + 4], edx
mov edx, [esp + 16h + 30h] // Third 4 bytes of DvarValue
mov [eax + 8], edx
mov edx, [esp + 1Ah + 30h] // Fourth 4 bytes of DvarValue
mov [eax + 0Ch], edx
mov eax, [ecx] // dvar_t pointer
mov eax, [esp + 0x4 + 0x20] // dvar
push[esp + 0x18 + 0x20] // source
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
push[esp + 0x18 + 0x20] // value
mov ebx, 0x647400
call ebx
add esp, 14h
add esp, 0x14
popad