diff --git a/saco/game/rwstuff.cpp b/saco/game/rwstuff.cpp index 79bf8f2..64b9ca5 100644 --- a/saco/game/rwstuff.cpp +++ b/saco/game/rwstuff.cpp @@ -342,6 +342,21 @@ void RpWorldAddLight(RpLight *light) _asm pop edx } +void RpWorldRemoveLight(RpLight *light) +{ + DWORD dwWorld = *(DWORD*)0xC17038; + if(!dwWorld) return; + + DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x7519B0 : 0x751960; + + _asm push light + _asm push dwWorld + _asm mov edx, dwFunc + _asm call edx + _asm pop edx + _asm pop edx +} + void RwCameraSetProjection(RwCamera *camera, int projection) { DWORD dwFunc = (iGtaVersion != GTASA_VERSION_USA10) ? 0x7EE3E0 : 0x7EE3A0; diff --git a/saco/game/rwstuff.h b/saco/game/rwstuff.h index a2b9d08..d49b390 100644 --- a/saco/game/rwstuff.h +++ b/saco/game/rwstuff.h @@ -37,6 +37,7 @@ void RpClumpAddLight(RpClump *clump, RpLight *light); void RpLightSetColor(RpLight *light, RwRGBAReal *color); void RpLightSetRadius(RpLight *light, float radius); void RpWorldAddLight(RpLight *light); +void RpWorldRemoveLight(RpLight *light); void RwCameraSetProjection(RwCamera *camera, int projection); void RwFrameTranslate(RwFrame *frame, VECTOR *v, int combine); void RwFrameRotate(RwFrame* frame, int axis, float angle);