Stack/heap collision in modified SetVehicleParamsEx
#2

Oh, goddamnit. Because I define SetVehicleParamsEx, then the SetVehicleParamsEx inside the hooked function gets recrusive.

pawn Код:
#define SetVehicleParamsEx HookedSetVehicleParams
stock HookedSetVehicleParams(vid, e, l, a, d, b, bo, o) {
    #undef SetVehicleParamsEx
   
    NS-><Vehicles[vid][engine]>     = e > 0;
    NS-><Vehicles[vid][lights]>     = l > 0;
    NS-><Vehicles[vid][alarm]>      = a > 0;
    NS-><Vehicles[vid][doors]>      = d > 0;
    NS-><Vehicles[vid][bonnet]>     = b > 0;
    NS-><Vehicles[vid][boot]>       = bo > 0;
    NS-><Vehicles[vid][objective]>  = o > 0;
   
    SetVehicleParamsEx(vid, e, l, a, d, b, bo, o);
    #define SetVehicleParamsEx HookedSetVehicleParams
}
Reply


Messages In This Thread
Stack/heap collision in modified SetVehicleParamsEx - by Misiur - 03.03.2013, 14:32
Re: Stack/heap collision in modified SetVehicleParamsEx - by Misiur - 03.03.2013, 14:40
Re: Stack/heap collision in modified SetVehicleParamsEx - by Misiur - 03.03.2013, 15:39
Re: Stack/heap collision in modified SetVehicleParamsEx - by Misiur - 03.03.2013, 15:59
Re: Stack/heap collision in modified SetVehicleParamsEx - by mastermax7777 - 03.03.2013, 16:35

Forum Jump:


Users browsing this thread: 1 Guest(s)