]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
don't send empty lightstyles during signon
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Oct 2005 23:13:11 +0000 (23:13 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Oct 2005 23:13:11 +0000 (23:13 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5760 d7cf8633-e32d-0410-b094-e92efae38249

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