From a1a71ab87b5847bbaba6c0b93fcd8c3c55c7c15d Mon Sep 17 00:00:00 2001 From: Spoike Date: Mon, 24 Jan 2005 03:05:39 +0000 Subject: [PATCH] Fixed v_cshift issues in malice by simply disabling the v_cshift when the mod specifies the wrong number of arguments (luckily, cshift is cleared between server anyway) git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@825 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/view.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/engine/client/view.c b/engine/client/view.c index ee4d965ee..0f53522c6 100644 --- a/engine/client/view.c +++ b/engine/client/view.c @@ -450,6 +450,11 @@ V_cshift_f */ void V_cshift_f (void) { + if (Cmd_Argc() != 5) //this is actually to warn of a malice bug (and prevent a totally black screen) more than it is to help the user. :/ + { + Con_Printf("v_cshift: v_cshift \n"); + return; + } if (Cmd_FromServer()) { cl.cshifts[CSHIFT_SERVER].destcolor[0] = atoi(Cmd_Argv(1)); @@ -602,10 +607,9 @@ void GLV_CalcBlend (void) } else { - a2 = cl.cshifts[j].percent / 255.0; + a2 = cl.cshifts[j].percent / 255.0; //don't allow modification of this one. } -// a2 = (cl.cshifts[j].percent/2)/255.0; if (!a2) continue; a = a + a2*(1-a); @@ -748,10 +752,14 @@ void SWV_UpdatePalette (void) new = false; + force = V_CheckGamma (); + for (i=0 ; i