From 6d84dff2b0455a52a3e16a53ab947178f080e6e7 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Sat, 26 Nov 2005 20:59:47 +0000 Subject: [PATCH] tiny optimization --- dlls/engine/engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index b642df60..a492facf 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -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) { int iLength; char *szLights = MF_GetAmxString(amx, params[1], 0, &iLength); - g_pFunctionTable_Post->pfnStartFrame = StartFrame_Post; if (FStrEq(szLights, "#OFF")) { glinfo.bCheckLights = false; + g_pFunctionTable_Post->pfnStartFrame = NULL; memset(glinfo.szLastLights, 0x0, 128); (g_engfuncs.pfnLightStyle)(0, (char *)glinfo.szRealLights); return 1; } - + + g_pFunctionTable_Post->pfnStartFrame = StartFrame_Post; glinfo.bCheckLights = true; //Reset LastLights