1.1 --- a/extensions/sdktools/vnatives.cpp Mon Jul 23 21:57:03 2007 +0000
1.2 +++ b/extensions/sdktools/vnatives.cpp Mon Jul 23 22:03:02 2007 +0000
1.3 @@ -321,15 +321,6 @@
1.4 static String *g_lightstyle[MAX_LIGHTSTYLES] = {NULL};
1.5 static cell_t SetLightStyle(IPluginContext *pContext, const cell_t *params)
1.6 {
1.7 - if (!g_lightstyle)
1.8 - {
1.9 - /* We allocate and never free this because the Engine wants to hold onto it :\
1.10 - * in theory we could hook light style and know whether we're supposed to free
1.11 - * this or not on shutdown, but for 4K of memory, it doesn't seem worth it yet.
1.12 - * So, it's a :TODO:!
1.13 - */
1.14 - }
1.15 -
1.16 int style = params[1];
1.17 if (style >= MAX_LIGHTSTYLES)
1.18 {
1.19 @@ -338,6 +329,11 @@
1.20
1.21 if (g_lightstyle[style] == NULL)
1.22 {
1.23 + /* We allocate and never free this because the Engine wants to hold onto it :\
1.24 + * in theory we could hook light style and know whether we're supposed to free
1.25 + * this or not on shutdown, but for ~4K of memory MAX, it doesn't seem worth it yet.
1.26 + * So, it's a :TODO:!
1.27 + */
1.28 g_lightstyle[style] = new String();
1.29 }
1.30