X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_main.c;h=fb6d9685f2a0417986d8f36deda9f1e777ae68a3;hb=9deeeb6b94762dbf7e9156b098bb164f91aa0184;hp=39f46ab2399d1ab501395088ce46f653a351da59;hpb=38c2c6ec7c69c4aeaa8ce0ec5f29cd03cbbda6ab;p=xonotic%2Fdarkplaces.git diff --git a/cl_main.c b/cl_main.c index 39f46ab2..fb6d9685 100644 --- a/cl_main.c +++ b/cl_main.c @@ -209,7 +209,7 @@ void CL_SetInfo(const char *key, const char *value, qboolean send, qboolean allo if (!allowmodel && (!strcasecmp(key, "pmodel") || !strcasecmp(key, "emodel"))) fail = true; for (i = 0;key[i];i++) - if (key[i] <= ' ' || key[i] == '\"') + if (ISWHITESPACE(key[i]) || key[i] == '\"') fail = true; for (i = 0;value[i];i++) if (value[i] == '\r' || value[i] == '\n' || value[i] == '\"') @@ -1065,6 +1065,8 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qboolean interpolat e->render.flags |= RENDER_SHADOW; if (e->render.flags & RENDER_VIEWMODEL) e->render.flags |= RENDER_NOSELFSHADOW; + if (e->render.effects & EF_NOSELFSHADOW) + e->render.flags |= RENDER_NOSELFSHADOW; // make the other useful stuff CL_UpdateRenderEntity(&e->render); @@ -1927,7 +1929,7 @@ void CL_Locs_AddNode(vec3_t mins, vec3_t maxs, const char *name) if (!name) name = ""; namelen = strlen(name); - node = Mem_Alloc(cls.levelmempool, sizeof(cl_locnode_t) + namelen + 1); + node = (cl_locnode_t *) Mem_Alloc(cls.levelmempool, sizeof(cl_locnode_t) + namelen + 1); VectorSet(node->mins, min(mins[0], maxs[0]), min(mins[1], maxs[1]), min(mins[2], maxs[2])); VectorSet(node->maxs, max(mins[0], maxs[0]), max(mins[1], maxs[1]), max(mins[2], maxs[2])); node->name = (char *)(node + 1); @@ -2095,10 +2097,10 @@ void CL_Locs_Reload_f(void) if (text < textend) text++; // trim trailing whitespace - while (lineend > linestart && lineend[-1] <= ' ') + while (lineend > linestart && ISWHITESPACE(lineend[-1])) lineend--; // trim leading whitespace - while (linestart < lineend && *linestart <= ' ') + while (linestart < lineend && ISWHITESPACE(*linestart)) linestart++; // check if this is a comment if (linestart + 2 <= lineend && !strncmp(linestart, "//", 2)) @@ -2115,7 +2117,7 @@ void CL_Locs_Reload_f(void) else maxs[i - 3] = atof(linetext); // now advance past the number - while (linetext < lineend && *linetext > ' ' && *linetext != ',') + while (linetext < lineend && !ISWHITESPACE(*linetext) && *linetext != ',') linetext++; // advance through whitespace if (linetext < lineend) @@ -2126,10 +2128,10 @@ void CL_Locs_Reload_f(void) limit = 6; // note: comma can be followed by whitespace } - if (*linetext <= ' ') + if (ISWHITESPACE(*linetext)) { // skip whitespace - while (linetext < lineend && *linetext <= ' ') + while (linetext < lineend && ISWHITESPACE(*linetext)) linetext++; } }