From 22f04e7923dd42ab8106ae96b3bab76a003c1892 Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 25 Feb 2006 08:56:03 +0000 Subject: [PATCH] fix typos that caused colormod to malfunction when hosting a QUAKEDP protocol server (it was sending red as green and blue), thanks to Spike for pointing this out git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6027 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.c b/protocol.c index 028bc6ff..ad5fe83e 100644 --- a/protocol.c +++ b/protocol.c @@ -491,7 +491,7 @@ void EntityFrameQuake_WriteFrame(sizebuf_t *msg, int numstates, const entity_sta if (bits & U_EFFECTS2) MSG_WriteByte(&buf, s->effects >> 8); if (bits & U_GLOWSIZE) MSG_WriteByte(&buf, s->glowsize); if (bits & U_GLOWCOLOR) MSG_WriteByte(&buf, s->glowcolor); - if (bits & U_COLORMOD) {int c = ((int)bound(0, s->colormod[0] * (7.0f / 32.0f), 7) << 5) | ((int)bound(0, s->colormod[0] * (7.0f / 32.0f), 7) << 2) | ((int)bound(0, s->colormod[0] * (3.0f / 32.0f), 3) << 0);MSG_WriteByte(&buf, c);} + if (bits & U_COLORMOD) {int c = ((int)bound(0, s->colormod[0] * (7.0f / 32.0f), 7) << 5) | ((int)bound(0, s->colormod[1] * (7.0f / 32.0f), 7) << 2) | ((int)bound(0, s->colormod[2] * (3.0f / 32.0f), 3) << 0);MSG_WriteByte(&buf, c);} if (bits & U_FRAME2) MSG_WriteByte(&buf, s->frame >> 8); if (bits & U_MODEL2) MSG_WriteByte(&buf, s->modelindex >> 8); -- 2.39.2