* Merge unified-sdl to trunk
* Bump Q3_VERSION to 1.35
This commit is contained in:
parent
39abffeb3b
commit
672cfbf16f
188 changed files with 5071 additions and 41739 deletions
|
@ -511,8 +511,20 @@ qboolean Cvar_Command( void ) {
|
|||
if ( Cmd_Argc() == 1 ) {
|
||||
Com_TruncateLongString( string, v->string );
|
||||
Com_TruncateLongString( resetString, v->resetString );
|
||||
Com_Printf ("\"%s\" is:\"%s" S_COLOR_WHITE "\" default:\"%s" S_COLOR_WHITE "\"\n",
|
||||
v->name, string, resetString );
|
||||
Com_Printf ("\"%s\" is:\"%s" S_COLOR_WHITE "\"",
|
||||
v->name, string );
|
||||
|
||||
if ( !( v->flags & CVAR_ROM ) ) {
|
||||
if ( !Q_stricmp( string, resetString ) ) {
|
||||
Com_Printf (", the default" );
|
||||
} else {
|
||||
Com_Printf (" default:\"%s" S_COLOR_WHITE "\"",
|
||||
resetString );
|
||||
}
|
||||
}
|
||||
|
||||
Com_Printf ("\n");
|
||||
|
||||
if ( v->latchedString ) {
|
||||
Com_TruncateLongString( latchedString, v->latchedString );
|
||||
Com_Printf( "latched: \"%s\"\n", latchedString );
|
||||
|
@ -895,8 +907,8 @@ updates an interpreted modules' version of a cvar
|
|||
=====================
|
||||
*/
|
||||
void Cvar_Update( vmCvar_t *vmCvar ) {
|
||||
cvar_t *cv = NULL; // bk001129
|
||||
assert(vmCvar); // bk
|
||||
cvar_t *cv = NULL;
|
||||
assert(vmCvar);
|
||||
|
||||
if ( (unsigned)vmCvar->handle >= cvar_numIndexes ) {
|
||||
Com_Error( ERR_DROP, "Cvar_Update: handle out of range" );
|
||||
|
@ -911,16 +923,10 @@ void Cvar_Update( vmCvar_t *vmCvar ) {
|
|||
return; // variable might have been cleared by a cvar_restart
|
||||
}
|
||||
vmCvar->modificationCount = cv->modificationCount;
|
||||
// bk001129 - mismatches.
|
||||
if ( strlen(cv->string)+1 > MAX_CVAR_VALUE_STRING )
|
||||
Com_Error( ERR_DROP, "Cvar_Update: src %s length %zd exceeds MAX_CVAR_VALUE_STRING",
|
||||
cv->string,
|
||||
strlen(cv->string));
|
||||
// bk001212 - Q_strncpyz guarantees zero padding and dest[MAX_CVAR_VALUE_STRING-1]==0
|
||||
// bk001129 - paranoia. Never trust the destination string.
|
||||
// bk001129 - beware, sizeof(char*) is always 4 (for cv->string).
|
||||
// sizeof(vmCvar->string) always MAX_CVAR_VALUE_STRING
|
||||
//Q_strncpyz( vmCvar->string, cv->string, sizeof( vmCvar->string ) ); // id
|
||||
Q_strncpyz( vmCvar->string, cv->string, MAX_CVAR_VALUE_STRING );
|
||||
|
||||
vmCvar->value = cv->value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue