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()) while (it != Dvar::ChangedDvars.end())
{ {
auto var = Dvar::Var(*it).get<Game::dvar_t*>(); auto var = Dvar::Var(*it).get<Game::dvar_t*>();
assert(var != nullptr);
Dvar::DvarReset(var, Game::DVAR_SOURCE_INTERNAL); Dvar::DvarReset(var, Game::DVAR_SOURCE_INTERNAL);
it = Dvar::ChangedDvars.erase(it); it = Dvar::ChangedDvars.erase(it);
} }

View File

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