From: divverent Date: Tue, 8 Jul 2008 17:41:08 +0000 (+0000) Subject: changed the Sys_Error to a Con_Printf. LordHavoc, please check if the equation REALLY... X-Git-Tag: xonotic-v0.1.0preview~2188 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=1c178ccff915a886bb70d108773c9e779552b6d7 changed the Sys_Error to a Con_Printf. LordHavoc, please check if the equation REALLY is right - this errors out for e.g. lurk.zym in Nexuiz git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8391 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cmd.c b/cmd.c index dff6762e..88588672 100644 --- a/cmd.c +++ b/cmd.c @@ -1468,11 +1468,13 @@ FIXME: lookupnoadd the token to speed search? void Cmd_ExecuteString (const char *text, cmd_source_t src) { int oldpos; + int found; cmd_function_t *cmd; cmdalias_t *a; oldpos = cmd_tokenizebufferpos; cmd_source = src; + found = false; Cmd_TokenizeString (text); @@ -1507,8 +1509,9 @@ void Cmd_ExecuteString (const char *text, cmd_source_t src) } else Con_Printf("Command \"%s\" can not be executed\n", Cmd_Argv(0)); - cmd_tokenizebufferpos = oldpos; - return; + found = true; + goto command_found; + break; case src_client: if (cmd->clientfunction) { @@ -1521,11 +1524,13 @@ void Cmd_ExecuteString (const char *text, cmd_source_t src) break; } } +command_found: // if it's a client command and no command was found, say so. if (cmd_source == src_client) { Con_Printf("player \"%s\" tried to %s\n", host_client->name, text); + cmd_tokenizebufferpos = oldpos; return; } @@ -1540,6 +1545,12 @@ void Cmd_ExecuteString (const char *text, cmd_source_t src) } } + if(found) // if the command was hooked and found, all is good + { + cmd_tokenizebufferpos = oldpos; + return; + } + // check cvars if (!Cvar_Command () && host_framecount > 0) Con_Printf("Unknown command \"%s\"\n", Cmd_Argv(0)); diff --git a/model_alias.c b/model_alias.c index 1755bbbb..c48b8beb 100644 --- a/model_alias.c +++ b/model_alias.c @@ -56,9 +56,9 @@ void Mod_Skeletal_AnimateVertices(const dp_model_t *model, const frameblend_t *f size = model->num_surfaces * sizeof(msurface_t) + model->num_surfaces * sizeof(int) + model->num_surfaces * model->numskins * sizeof(texture_t) + model->surfmesh.num_triangles * sizeof(int[3]) + model->surfmesh.num_triangles * sizeof(int[3]) + model->surfmesh.num_vertices * sizeof(float[3]) + model->surfmesh.num_vertices * sizeof(float[3]) + model->surfmesh.num_vertices * sizeof(float[3]) + model->surfmesh.num_vertices * sizeof(float[3]) + model->surfmesh.num_vertices * sizeof(float[2]) + model->surfmesh.num_vertices * sizeof(int[4]) + model->surfmesh.num_vertices * sizeof(float[4]) + model->num_poses * sizeof(float[12]) + model->num_bones * sizeof(float[12]) + model->numskins * sizeof(animscene_t) + model->num_bones * sizeof(aliasbone_t) + model->numframes * sizeof(animscene_t) + ((model->surfmesh.num_vertices <= 65536) ? (model->surfmesh.num_triangles * sizeof(unsigned short[3])) : 0); if (size > ((memheader_t *)model->data_surfaces)[-1].size) - Sys_Error("%s:%i: %i != %i", __FILE__, __LINE__, (int)size, (int)((memheader_t *)model->data_surfaces)[-1].size); + Con_Printf("%s:%i for %s: %i > %i\n", __FILE__, __LINE__, model->name, (int)size, (int)((memheader_t *)model->data_surfaces)[-1].size); else if(size < ((memheader_t *)model->data_surfaces)[-1].size) - Con_DPrintf("%s:%i for %s: %i < %i", __FILE__, __LINE__, model->name, (int)size, (int)((memheader_t *)model->data_surfaces)[-1].size); + Con_DPrintf("%s:%i for %s: %i < %i\n", __FILE__, __LINE__, model->name, (int)size, (int)((memheader_t *)model->data_surfaces)[-1].size); // interpolate matrices and concatenate them to their parents for (i = 0;i < model->num_bones;i++)