forked from mirror/openmw-tes3mp
[Client] Shorten player names to 31 characters after they are inputted
This commit is contained in:
parent
ac3254d85f
commit
3fc1bdecb3
1 changed files with 12 additions and 0 deletions
|
@ -397,6 +397,18 @@ namespace MWGui
|
|||
if (mNameDialog)
|
||||
{
|
||||
mPlayerName = mNameDialog->getTextInput();
|
||||
|
||||
/*
|
||||
Start of tes3mp change (major)
|
||||
|
||||
Ensure names are not longer than the original game's 31 character maximum
|
||||
*/
|
||||
if (mPlayerName.length() > 31)
|
||||
mPlayerName = mPlayerName.substr(0, 31);
|
||||
/*
|
||||
End of tes3mp change (major)
|
||||
*/
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->setValue("name", mPlayerName);
|
||||
MWBase::Environment::get().getMechanicsManager()->setPlayerName(mPlayerName);
|
||||
MWBase::Environment::get().getWindowManager()->removeDialog(mNameDialog);
|
||||
|
|
Loading…
Reference in a new issue