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);
}
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)
{
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;
}
}
}
+ 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));
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++)