12-12-2010, 11:08 AM
couldnt think of a better title... basically makes characters go to a specific frame when the summary screen shows up
code:
and
you actually need the WriteMem stuff since this is a CallPatch and not a JmpPatch
anyway this basically:
*) checks if in vs mode
*) loops through all objects
*) checks if the object exists
*) checks if the object is type 0
*) checks if the character has more than 0 health
*) sets frame number to x (here it is 201 for testing)
could be useful for victory stance or something - could also be used to fix any bugs which may occur during weird transforms and summary screens and stuff... yeah
code:
ASM-Code:
action_on_finish proc MOV DWORD PTR DS:[44D02Ch],1 ;original line cmp dword ptr ds:[451160h],0 ;only for VS mode jne return xor eax,eax next: cmp byte ptr ds:[458B00h+eax+4],0 je skip ;object doesn't exist mov ecx, dword ptr ds:[458B00h+eax*4+194h] mov edx, dword ptr ds:[ecx+368h] cmp dword ptr ds:[edx+6f8h],0 ;object isn't type 0 jne skip cmp dword ptr ds:[ecx+2fch],0 ;character is dead JLE skip mov dword ptr ds:[ecx+70h],201 ;set frame to 201, change this skip: inc eax cmp eax,400 JL next return: ret action_on_finish endp |
and
ASM-Code:
invoke CallPatch,0041DB8Dh, addr action_on_finish invoke WriteMem,0041DB92h, addr FourNOP,4 invoke WriteMem,0041DB96h, addr oneNOP, 1 |
you actually need the WriteMem stuff since this is a CallPatch and not a JmpPatch
anyway this basically:
*) checks if in vs mode
*) loops through all objects
*) checks if the object exists
*) checks if the object is type 0
*) checks if the character has more than 0 health
*) sets frame number to x (here it is 201 for testing)
could be useful for victory stance or something - could also be used to fix any bugs which may occur during weird transforms and summary screens and stuff... yeah
...