I made a gravity function:
invoke JmpPatch,0040E6F3h, addr Gravity
Grav is the factor by which all the Gravity stuff is multiplied. The function is still buggy (I think I'm multiplying variables I shouldn't be touching ), so some times items don't fall or something. Not sure really . Anyway have fun .
[youtube]K-cMcO7D4rc[/youtube]
A bad video showing how gravity is affected when you half it(I know it's not a very good demonstration, but yeah ).
Code:
.data
Grav REAL8 0.5
Grav_r dd 0040E794h
.Code
Gravity proc
cmp eax, 6
jnz short loc_40E706
fld qword ptr ds:[448360h]
fmul qword ptr ds:[Grav]
fld qword ptr [esi+48h]
jmp loc_40E791
; ---------------------------------------------------------------------------
loc_40E706: ; CODE XREF: sub_40E490+266j
cmp eax, 4
jnz short loc_40E716
fld qword ptr ds:[447A18h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
jmp loc_40E791
; ---------------------------------------------------------------------------
loc_40E716: ; CODE XREF: sub_40E490+279j
mov edx, [esi+70h]
imul edx, 178h
mov eax, [edx+ecx+7ACh]
cmp eax, 3EAh
jnz short loc_40E788
cmp dword ptr [ecx+6F4h], 7Ch
jnz short loc_40E741
fld qword ptr ds:[448358h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
jmp short loc_40E791
; ---------------------------------------------------------------------------
loc_40E741: ; CODE XREF: sub_40E490+2A4j
cmp eax, 3EAh
jnz short loc_40E788
cmp [ecx+6F4h], edi
jnz short loc_40E75B
fld qword ptr ds:[448350h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
jmp short loc_40E791
; ---------------------------------------------------------------------------
loc_40E75B: ; CODE XREF: sub_40E490+2BEj
cmp eax, 3EAh
jnz short loc_40E788
cmp dword ptr [ecx+6F4h], 65h
jnz short loc_40E776
fld qword ptr ds:[448360h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
jmp short loc_40E791
; ---------------------------------------------------------------------------
loc_40E776: ; CODE XREF: sub_40E490+2D9j
cmp eax, 3EAh
jnz short loc_40E788
fld qword ptr ds:[448348h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
jmp short loc_40E791
; ---------------------------------------------------------------------------
loc_40E788: ; CODE XREF: sub_40E490+29Bj
; sub_40E490+2B6j ...
fld qword ptr ds:[448340h]
fmul qword ptr ds:[Grav]
fadd qword ptr [esi+48h]
loc_40E791: ; CODE XREF: sub_40E490+271j
; sub_40E490+284j ...
fstp qword ptr [esi+48h]
jmp [Grav_r]
Gravity endp
invoke JmpPatch,0040E6F3h, addr Gravity
Grav is the factor by which all the Gravity stuff is multiplied. The function is still buggy (I think I'm multiplying variables I shouldn't be touching ), so some times items don't fall or something. Not sure really . Anyway have fun .
[youtube]K-cMcO7D4rc[/youtube]
A bad video showing how gravity is affected when you half it(I know it's not a very good demonstration, but yeah ).
10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.