- Fixed: When the player setup menu cycles the random players, it needs to rebuild the translation for each one.

SVN r3657 (trunk)
This commit is contained in:
Randy Heit 2012-05-15 22:52:24 +00:00
commit 71e02e2d9e
5 changed files with 28 additions and 5 deletions

View file

@ -48,6 +48,7 @@
#include "gi.h"
#include "r_defs.h"
#include "r_state.h"
#include "r_data/r_translate.h"
//=============================================================================
@ -386,9 +387,33 @@ void FListMenuItemPlayerDisplay::UpdateRandomClass()
mPlayerState = GetDefaultByType (mPlayerClass->Type)->SeeState;
mPlayerTics = mPlayerState->GetTics();
mRandomTimer = 6;
// Since the newly displayed class may used a different translation
// range than the old one, we need to update the translation, too.
UpdateTranslation();
}
}
//=============================================================================
//
//
//
//=============================================================================
void FListMenuItemPlayerDisplay::UpdateTranslation()
{
int PlayerColor = players[consoleplayer].userinfo.color;
int PlayerSkin = players[consoleplayer].userinfo.skin;
int PlayerColorset = players[consoleplayer].userinfo.colorset;
if (mPlayerClass != NULL)
{
PlayerSkin = R_FindSkin (skins[PlayerSkin].name, int(mPlayerClass - &PlayerClasses[0]));
R_GetPlayerTranslation(PlayerColor,
P_GetPlayerColorSet(mPlayerClass->Type->TypeName, PlayerColorset),
&skins[PlayerSkin], translationtables[TRANSLATION_Players][MAXPLAYERS]);
}
}
//=============================================================================
//