Jump to content

How to disable rain splash effect in vice city?


bibidibabidibu

Recommended Posts

bibidibabidibu

Hi 

 

I want to remove rain splash effect on cars and ground. How can I do it(not only removing splash texture). I want to disable this effect mechanism via memory address or smt with CLEO. Is it possible, does anyone know anything about it?

Link to comment
Share on other sites

On 7/25/2023 at 9:28 PM, bibidibabidibu said:

Hi 

 

I want to remove rain splash effect on cars and ground. How can I do it(not only removing splash texture). I want to disable this effect mechanism via memory address or smt with CLEO. Is it possible, does anyone know anything about it?

Under:

CParticle::Render(void);

There's a func call with unknown string ID:

0x561D29 call    sub_577350     //  5 bytes

When disabled the rain stops splashing on vehicles and roads(I haven't checked the rest). 

Link to comment
Share on other sites

bibidibabidibu
8 hours ago, Jack said:

Under:

CParticle::Render(void);

There's a func call with unknown string ID:

0x561D29 call    sub_577350     //  5 bytes

When disabled the rain stops splashing on vehicles and roads(I haven't checked the rest). 

maybe I made a mistake, crashed when I call via 05E1 :/ 

Link to comment
Share on other sites

@bibidibabidibu 

No, not call - disable. Here's that hardcoded part (my database is outdated so most of the stuff is not defined so it looks kinda confusing):

Spoiler
//  CParticle::Render(void) //  partial (idb vc 1.0)
.
.
.
loc_561CC8:                            
    fld     [esp+0x68]
    fstp    st(3)
    fld     flt_698320
    fdiv    st, st(3)
    mov     al, [ebx+0x3B]
    push    eax             
    push    eax             
    fstp    [esp]
    movzx   edx, byte ptr [ebx+0x3A]
    fld     dword ptr [ebx+0x3C]
    mov     al, [esp+0x14]
    mov     cl, [esp+0x18]
    fstp    st(4)
    push    edx             
    push    eax             
    mov     al, [esp+0x14]
    push    ecx             
    fld     st(3)
    push    eax             
loc_561CF9:                             
    fmul    [esp+0x88]
    push    eax             
    fstp    [esp]
    fld     st(3)
    fmul    [esp+0x88]
loc_561D0D:                             
    push    eax             
    fstp    [esp]
    push    eax             
    fld     st(2)
    fstp    [esp]
    fcompp
    fcompp
    push    [esp+0x88] 
    push    [esp+0x88] 
    call    sub_577350  //  relevant (disable it to stop the rain)
    add     esp, 0x2C
loc_561D31:                                                      
    mov     ebx, [ebx+0x54]
loc_561D34:                                                  
    test    ebx, ebx
    jnz     loc_560A50
    call    sub_577790
    inc     [esp+0x14]
    add     [esp+0x20], 0x94
    cmp     [esp+0x14], 0x53
    jl      loc_560940
    push    0               
    push    0x0C            
    call    RwRenderStateSet
    pop     ecx
    pop     ecx
    push    1               
    push    8               
    call    RwRenderStateSet
    pop     ecx
    pop     ecx
    push    1               
    push    6               
    call    RwRenderStateSet
    pop     ecx
    pop     ecx
    push    5               
    push    0x0A            
    call    RwRenderStateSet
    pop     ecx
    pop     ecx
    push    6               
    push    0x0B             
    call    RwRenderStateSet
    pop     ecx
    pop     ecx
    add     esp, 0xA0
    pop     ebp
    pop     edi
    pop     esi
    pop     ebx
    ret
.
.
.

 

At first I disabled func call:

CParticle::Render(void);

called within:

Render2dStuff(void);

But that disabled all particles in the game so I start disabling all calls within:

CParticle::Render(void);

until the rain stoped splashing:

//  disabled:
0A8C: write_memory 0x561D29 size 5 value 0x90 virtual_protect 0 //  NOP 5
0A93: terminate_this_custom_script

//  default:     E8 22 56 01 00  --->    call    sub_577350
//  0A8C: write_memory 0x561D29 size 1 value 0xE8 virtual_protect 0
//  0A8C: write_memory 0x561D2A size 4 value 0x00015622 virtual_protect 0
//  0A93: terminate_this_custom_script

But like I mentioned I don't know its string ID or what else it does apart from the rain splash. It's not fully tested so don't say I didn't warn you.
You could use CE to do what I did for further hardcoded testing.

 

EDIT: It's not even defined within plugin-sdk. All I know about it is that it belongs to the CSprite class 'cause it's inside that memory region.

Edited by Jack
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.