From 0acc0eb4536ad17f7fb8cbda306a0d7ef7768c05 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 23 Jul 2007 22:03:02 +0000 Subject: [PATCH] comment change to lightstyle code --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401160 --- extensions/sdktools/vnatives.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/extensions/sdktools/vnatives.cpp b/extensions/sdktools/vnatives.cpp index f968cfc4..a018e42a 100644 --- a/extensions/sdktools/vnatives.cpp +++ b/extensions/sdktools/vnatives.cpp @@ -321,15 +321,6 @@ static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params static String *g_lightstyle[MAX_LIGHTSTYLES] = {NULL}; static cell_t SetLightStyle(IPluginContext *pContext, const cell_t *params) { - if (!g_lightstyle) - { - /* We allocate and never free this because the Engine wants to hold onto it :\ - * in theory we could hook light style and know whether we're supposed to free - * this or not on shutdown, but for 4K of memory, it doesn't seem worth it yet. - * So, it's a :TODO:! - */ - } - int style = params[1]; if (style >= MAX_LIGHTSTYLES) { @@ -338,6 +329,11 @@ static cell_t SetLightStyle(IPluginContext *pContext, const cell_t *params) if (g_lightstyle[style] == NULL) { + /* We allocate and never free this because the Engine wants to hold onto it :\ + * in theory we could hook light style and know whether we're supposed to free + * this or not on shutdown, but for ~4K of memory MAX, it doesn't seem worth it yet. + * So, it's a :TODO:! + */ g_lightstyle[style] = new String(); }