mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
tiny optimization
This commit is contained in:
parent
8112fbe161
commit
6d84dff2b0
@ -559,15 +559,16 @@ static cell AMX_NATIVE_CALL set_view(AMX *amx, cell *params) {
|
|||||||
static cell AMX_NATIVE_CALL set_lights(AMX *amx, cell *params) {
|
static cell AMX_NATIVE_CALL set_lights(AMX *amx, cell *params) {
|
||||||
int iLength;
|
int iLength;
|
||||||
char *szLights = MF_GetAmxString(amx, params[1], 0, &iLength);
|
char *szLights = MF_GetAmxString(amx, params[1], 0, &iLength);
|
||||||
g_pFunctionTable_Post->pfnStartFrame = StartFrame_Post;
|
|
||||||
|
|
||||||
if (FStrEq(szLights, "#OFF")) {
|
if (FStrEq(szLights, "#OFF")) {
|
||||||
glinfo.bCheckLights = false;
|
glinfo.bCheckLights = false;
|
||||||
|
g_pFunctionTable_Post->pfnStartFrame = NULL;
|
||||||
memset(glinfo.szLastLights, 0x0, 128);
|
memset(glinfo.szLastLights, 0x0, 128);
|
||||||
(g_engfuncs.pfnLightStyle)(0, (char *)glinfo.szRealLights);
|
(g_engfuncs.pfnLightStyle)(0, (char *)glinfo.szRealLights);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pFunctionTable_Post->pfnStartFrame = StartFrame_Post;
|
||||||
glinfo.bCheckLights = true;
|
glinfo.bCheckLights = true;
|
||||||
|
|
||||||
//Reset LastLights
|
//Reset LastLights
|
||||||
|
Loading…
Reference in New Issue
Block a user