From 1c2282115c0679dfc38bfe84bcafead7e6499c9a Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 24 Aug 2011 08:49:36 +0000 Subject: [PATCH] big oops: fix C++ compilation (had used "operator" as variable name) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11293 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=b8ed834873fe145cc3c6d45d31badfd28ea6274a --- model_shared.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/model_shared.c b/model_shared.c index a7a57690..dc332803 100644 --- a/model_shared.c +++ b/model_shared.c @@ -2105,47 +2105,47 @@ void Mod_LoadQ3Shaders(void) // this sets dpshaderkill to true if dpshaderkillifcvar was used, and to false if dpnoshaderkillifcvar was used else if (((dpshaderkill = !strcasecmp(parameter[0], "dpshaderkillifcvar")) || !strcasecmp(parameter[0], "dpnoshaderkillifcvar")) && numparameters >= 2) { - const char *operator = NULL; + const char *op = NULL; if (numparameters >= 3) - operator = parameter[2]; - if(!operator) + op = parameter[2]; + if(!op) { if (Cvar_VariableValue(parameter[1]) != 0.0f) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, "==")) + else if (numparameters >= 4 && !strcmp(op, "==")) { if (Cvar_VariableValue(parameter[1]) == atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, "!=")) + else if (numparameters >= 4 && !strcmp(op, "!=")) { if (Cvar_VariableValue(parameter[1]) != atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, ">")) + else if (numparameters >= 4 && !strcmp(op, ">")) { if (Cvar_VariableValue(parameter[1]) > atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, "<")) + else if (numparameters >= 4 && !strcmp(op, "<")) { if (Cvar_VariableValue(parameter[1]) < atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, ">=")) + else if (numparameters >= 4 && !strcmp(op, ">=")) { if (Cvar_VariableValue(parameter[1]) >= atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } - else if (numparameters >= 4 && !strcmp(operator, "<=")) + else if (numparameters >= 4 && !strcmp(op, "<=")) { if (Cvar_VariableValue(parameter[1]) <= atof(parameter[3])) shader.dpshaderkill = dpshaderkill; } else { - Con_DPrintf("%s parsing warning: unknown dpshaderkillifcvar operator \"%s\", or not enough arguments\n", search->filenames[fileindex], operator); + Con_DPrintf("%s parsing warning: unknown dpshaderkillifcvar op \"%s\", or not enough arguments\n", search->filenames[fileindex], op); } } else if (!strcasecmp(parameter[0], "sky") && numparameters >= 2) -- 2.39.2