From: havoc Date: Sat, 25 Feb 2006 08:56:03 +0000 (+0000) Subject: fix typos that caused colormod to malfunction when hosting a QUAKEDP protocol server... X-Git-Tag: xonotic-v0.1.0preview~4286 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=22f04e7923dd42ab8106ae96b3bab76a003c1892;p=xonotic%2Fdarkplaces.git 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 --- 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);