]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
fix a logic bug in EntLight handling (should have been checking r_shadow_realtime_wor...
[xonotic/darkplaces.git] / cl_main.c
index 6a1356c66af6e0379c41a38d1cb35774054921c1..2ea477a3c4dc75bc501978c69e704975239f5856 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -224,11 +224,13 @@ void CL_EstablishConnection(const char *host)
        m_return_reason[0] = 0;
        cls.demonum = -1;
 
+       // stop demo loop in case this fails
+       CL_Disconnect();
+       NetConn_ClientFrame();
+       NetConn_ServerFrame();
+       
        if (LHNETADDRESS_FromString(&cls.connect_address, host, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
        {
-               // stop demo loop in case this fails
-               CL_Disconnect();
-
                cls.connect_trying = true;
                cls.connect_remainingtries = 3;
                cls.connect_nextsendtime = 0;
@@ -612,7 +614,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                        Mod_CheckLoaded(e->render.model);
                        if (e->render.model->type == mod_alias || e->render.model->type == mod_sprite)
                                angles[0] = -angles[0];
-                       if (e->render.model->flags & EF_ROTATE)
+                       if ((e->render.model->flags & EF_ROTATE) && (!e->state_current.tagentity && !(e->render.flags & RENDER_VIEWMODEL)))
                        {
                                angles[1] = ANGLEMOD(100*cl.time);
                                if (cl_itembobheight.value)
@@ -722,7 +724,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                        e->persistent.muzzleflash -= cl.frametime * 1000;
                }
                // LordHavoc: if the model has no flags, don't check each
-               if (e->render.model && e->render.model->flags)
+               if (e->render.model && e->render.model->flags && (!e->state_current.tagentity && !(e->render.flags & RENDER_VIEWMODEL)))
                {
                        if (e->render.model->flags & EF_GIB)
                                trailtype = 2;
@@ -855,7 +857,7 @@ static void CL_RelinkNetworkEntities(void)
        else if (cl.items & IT_INVISIBILITY)
        {
                if (gamemode == GAME_TRANSFUSION)
-                       ent->state_current.alpha = 0.5;
+                       ent->state_current.alpha = 128;
                else
                        ent->state_current.modelindex = 0;
        }