tiny optimization

This commit is contained in:
Borja Ferrer 2005-11-26 20:59:47 +00:00
parent 8112fbe161
commit 6d84dff2b0

View File

@ -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