diff --git a/engine/common/base_cmd.c b/engine/common/base_cmd.c index 732a5b1e..78b5b33f 100644 --- a/engine/common/base_cmd.c +++ b/engine/common/base_cmd.c @@ -141,32 +141,6 @@ void BaseCmd_Insert( base_command_type_e type, base_command_t *basecmd, const ch elem->next = find; } -/* -============ -BaseCmd_Replace - -Used in case, when basecmd has been registered, but gamedll wants to register it's own -============ -*/ -qboolean BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name ) -{ - base_command_hashmap_t *i = BaseCmd_GetBucket( name ); - - for( ; i && ( i->type != type || Q_stricmp( name, i->name ) ) ; // filter out - i = i->next ); - - if( !i ) - { - Con_Reportf( S_ERROR "BaseCmd_Replace: couldn't find %s\n", name); - return false; - } - - i->basecmd = basecmd; - i->name = name; // may be freed after - - return true; -} - /* ============ BaseCmd_Remove diff --git a/engine/common/base_cmd.h b/engine/common/base_cmd.h index c99a55d2..671dee42 100644 --- a/engine/common/base_cmd.h +++ b/engine/common/base_cmd.h @@ -38,7 +38,6 @@ base_command_t *BaseCmd_Find( base_command_type_e type, const char *name ); void BaseCmd_FindAll( const char *name, base_command_t **cmd, base_command_t **alias, base_command_t **cvar ); void BaseCmd_Insert ( base_command_type_e type, base_command_t *basecmd, const char *name ); -qboolean BaseCmd_Replace( base_command_type_e type, base_command_t *basecmd, const char *name ); // only if same name void BaseCmd_Remove ( base_command_type_e type, const char *name ); void BaseCmd_Stats_f( void ); // to be registered later void BaseCmd_Test_f( void ); // to be registered later