- let players check MF2_NOTRANSLATE so that mods can create player classes which are not subject to

default player color handling.



SVN r2198 (trunk)
This commit is contained in:
Christoph Oelckers 2010-03-06 09:30:38 +00:00
parent 017fc7bd6a
commit d2a4c19955
2 changed files with 12 additions and 5 deletions

View file

@ -319,7 +319,10 @@ void cht_DoCheat (player_t *player, int cheat)
player->mo->special1 = 0; // required for the Hexen fighter's fist attack.
// This gets set by AActor::Die as flag for the wimpy death and must be reset here.
player->mo->SetState (player->mo->SpawnState);
player->mo->Translation = TRANSLATION(TRANSLATION_Players, BYTE(player-players));
if (!(player->mo->flags2 & MF2_DONTTRANSLATE))
{
player->mo->Translation = TRANSLATION(TRANSLATION_Players, BYTE(player-players));
}
player->mo->DamageType = NAME_None;
// player->mo->GiveDefaultInventory();
if (player->ReadyWeapon != NULL)

View file

@ -3980,11 +3980,15 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer)
p->userinfo.skin = R_FindSkin (skins[p->userinfo.skin].name, p->CurrentPlayerClass);
StatusBar->SetFace (&skins[p->userinfo.skin]);
// [RH] Be sure the player has the right translation
R_BuildPlayerTranslation (playernum);
// [RH] set color translations for player sprites
mobj->Translation = TRANSLATION(TRANSLATION_Players,playernum);
if (!(mobj->flags2 & MF2_DONTTRANSLATE))
{
// [RH] Be sure the player has the right translation
R_BuildPlayerTranslation (playernum);
// [RH] set color translations for player sprites
mobj->Translation = TRANSLATION(TRANSLATION_Players,playernum);
}
mobj->angle = spawn_angle;
mobj->pitch = mobj->roll = 0;