That will make state 18 never show smoke, even if timestop is disabled.
Code:
cmp edx, 13h
jnz smoke
smoke:
doesn't do anything. It will ALWAYS go to smoke, since if the jump isn't taken, it will still go to smoke as that is the next line.
I'm pretty sure my code is right.
If timestop is enabled: don't do smoke.
If state 18 show smoke.
If not state 19, don't show smoke
otherwise show smoke.
That is my code. If timestop is enabled, smoke will never show. If timestop isn't enabled, state 18 and 19 will have smoke(normal mode).
If my code doesn't work, there is a chance that I got ts_182 and ts_181 mixed up.
I think this will disable timestop for a specific ID(replace the original timeloop):
Code:
time_loop proc
MOV EDX,DWORD PTR DS:[450B90h]
pushad
mov eax,0
mov timeStop, FALSE
looop:
cmp byte ptr ds:[458B00h+eax+4],0
je chk_chk_boom
mov ebx, dword ptr ds:[458B00h+eax+194h]
mov ebx, dword ptr ds :[ebx+368h]
cmp dword ptr ds:[ebx+6f4h], 1337 ;ID goes here
je chk_chk_boom
mov ebx,dword ptr ds:[memAlloc]
lea ebx,dword ptr ds:[ebx+eax*8]
cmp byte ptr ds:[ebx],1
jnz skip
mov timeStop,TRUE
jmp return
chk_chk_boom:
mov ebx,dword ptr ds:[memAlloc]
lea ebx,dword ptr ds:[ebx+eax*8]
mov byte ptr ds:[ebx],0
mov dword ptr ds:[ebx+1],0
skip:
inc eax
cmp eax,190h
jl looop
return:
popad
ret
time_loop endp
If this doesn't work, then the timestop state must be modified like this:
Code:
timestop:
CMP EAX,10000
jl return
CMP EAX,20000
jge return
sub eax,10000
push ecx
push edx
push esi
mov ecx,dword ptr ds:[memAlloc]
lea ecx,dword ptr ds:[ecx+edi*8]
mov dword ptr ds:[ecx+1],eax
mov byte ptr ds:[ecx],1
xor edx,edx
timestop_loop:
mov esi, dword ptr ds:[458B00h+edx*4+194h]
mov esi, dword ptr ds:[esi+368h]
cmp dword ptr ds:[esi+6f4h], 1337 ;ID goes here
je timestop_skip
mov ecx,dword ptr ds:[memAlloc]
lea ecx,dword ptr ds:[ecx+edi*8]
mov dword ptr ds:[ecx+1],eax
mov byte ptr ds:[ecx],1
timestop_skip:
inc edx
cmp edx, 400
jl timestop_loop
pop esi
pop edx
pop ecx
Sadly, I don't remember how I coded it, but I think changing the state is more likely to work.