fixed hl sprite additive mode
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 2 Apr 2005 16:20:34 +0000 (16:20 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 2 Apr 2005 16:20:34 +0000 (16:20 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5139 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
model_sprite.c

index 94f52fe..c95107d 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -613,8 +613,7 @@ void CL_LinkNetworkEntity(entity_t *e)
                                        origin[2] += (cos(cl.time * cl_itembobspeed.value * (2.0 * M_PI)) + 1.0) * 0.5 * cl_itembobheight.value;
                        }
                        // transfer certain model flags to effects
-                       if (e->render.model->flags2 & EF_FULLBRIGHT)
-                               e->render.effects |= EF_FULLBRIGHT;
+                       e->render.effects |= e->render.model->flags2 & (EF_FULLBRIGHT | EF_ADDITIVE);
                        if (cl_prydoncursor.integer && (e->render.effects & EF_SELECTABLE) && cl.cmd.cursor_entitynumber == e - cl_entities)
                                VectorScale(e->render.colormod, 2, e->render.colormod);
                }
index 1d824c1..351db53 100644 (file)
@@ -55,7 +55,6 @@ static void Mod_Sprite_SharedSetup(qbyte *datapointer, int version, int *palette
                Host_Error ("Mod_Sprite_SharedSetup: Invalid # of frames: %d\n", loadmodel->numframes);
 
        loadmodel->type = mod_sprite;
-       loadmodel->flags2 = EF_FULLBRIGHT;
 
        // LordHavoc: hack to allow sprites to be non-fullbright
        for (i = 0;i < MAX_QPATH && loadmodel->name[i];i++)
@@ -221,6 +220,8 @@ void Mod_IDSP_Load(model_t *mod, void *buffer)
 
        datapointer = buffer;
 
+       loadmodel->flags2 = EF_FULLBRIGHT;
+
        loadmodel->DrawSky = NULL;
        loadmodel->Draw = R_Model_Sprite_Draw;
        loadmodel->DrawShadowVolume = NULL;