]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
don't send empty lightstyles during signon
[xonotic/darkplaces.git] / host_cmd.c
index b98566f6cea337b98932e0a31f6f2563147f3eff..3030f7c3533d6805e2e35912bec96f3128f19c0c 100644 (file)
@@ -1347,9 +1347,12 @@ void Host_Spawn_f (void)
        // send all current light styles
        for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
        {
-               MSG_WriteByte (&host_client->message, svc_lightstyle);
-               MSG_WriteByte (&host_client->message, (char)i);
-               MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+               if (sv.lightstyles[i][0])
+               {
+                       MSG_WriteByte (&host_client->message, svc_lightstyle);
+                       MSG_WriteByte (&host_client->message, (char)i);
+                       MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+               }
        }
 
        // send some stats