]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added support for .colormap values >= 1024 in QC to mean direct color specification...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Aug 2002 18:53:25 +0000 (18:53 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Aug 2002 18:53:25 +0000 (18:53 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2246 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
protocol.h
sv_main.c

index aaeb1e5c5c361ac860df8f94070a633139a85b9a..21a4df5c6196e49c2f01f9352260dd21c6309bb0 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -421,7 +421,9 @@ static void CL_RelinkNetworkEntities()
                VectorCopy (neworg, ent->render.origin);
                ent->render.flags = ent->state_current.flags;
                ent->render.effects = effects = ent->state_current.effects;
-               if (cl.scores == NULL || !ent->state_current.colormap)
+               if (ent->state_current.flags & RENDER_COLORMAPPED)
+                       ent->render.colormap = ent->state_current.colormap;
+               else if (cl.scores == NULL || !ent->state_current.colormap)
                        ent->render.colormap = -1; // no special coloring
                else
                        ent->render.colormap = cl.scores[ent->state_current.colormap - 1].colors; // color it
index c90867b343dfc2877f7a15f09904d93c63ae9f02..da37e379fa9ffb7c0d3a20a60e90580e6fb5e326 100644 (file)
@@ -293,6 +293,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #define RENDER_VIEWMODEL 4
 #define RENDER_EXTERIORMODEL 8
 #define RENDER_LOWPRECISION 16 // send as low precision coordinates to save bandwidth
+#define RENDER_COLORMAPPED 32
 
 typedef struct
 {
index edb040364985f235995cb6b9fcfdd2dc597a2d29..0a5b5bdf8c500f8de57c1d204f52d538106b5d40 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -1097,6 +1097,8 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                        break;
                VectorCopy(origin, s->origin);
                VectorCopy(angles, s->angles);
+               if (ent->v.colormap >= 1024)
+                       flags |= RENDER_COLORMAPPED;
                s->colormap = ent->v.colormap;
                s->skin = ent->v.skin;
                s->frame = ent->v.frame;