mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Extend Team Arena name edit fields to MAX_NAME_LENGTH
This commit is contained in:
parent
6f88df262c
commit
62cef99b28
1 changed files with 14 additions and 0 deletions
|
@ -5145,6 +5145,20 @@ static void Item_ApplyHacks( itemDef_t *item ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( item->type == ITEM_TYPE_EDITFIELD && item->cvar && ( !Q_stricmp( item->cvar, "ui_Name" ) || !Q_stricmp( item->cvar, "ui_findplayer" ) ) ) {
|
||||
editFieldDef_t *editField = (editFieldDef_t *)item->typeData;
|
||||
|
||||
// enough to hold a full player name
|
||||
if ( editField->maxChars < MAX_NAME_LENGTH ) {
|
||||
if ( editField->maxPaintChars > editField->maxChars ) {
|
||||
editField->maxPaintChars = editField->maxChars;
|
||||
}
|
||||
|
||||
Com_Printf( "Extended player name field using cvar %s to %d characters\n", item->cvar, MAX_NAME_LENGTH );
|
||||
editField->maxChars = MAX_NAME_LENGTH;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue