Skip to content

Commit

Permalink
Hexen: Fighter is Yellow by default in single-player
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 9, 2012
1 parent d8526d9 commit eabae76
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -1917,6 +1917,13 @@ void G_PlayerReborn(int player)
#endif
p->colorMap = cfg.playerColor[player];
p->class_ = P_ClassForPlayerWhenRespawning(player, false);
#if __JHEXEN__
if(p->class_ == PCLASS_FIGHTER && !IS_NETGAME)
{
// In Hexen single-player, the Fighter's default color is Yellow.
p->colorMap = 2;
}
#endif
p->useDown = p->attackDown = true; // Don't do anything immediately.
p->playerState = PST_LIVE;
p->health = maxHealth;
Expand Down
6 changes: 5 additions & 1 deletion doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -5248,8 +5248,12 @@ void Hu_MenuPlayerClassPreviewTicker(mn_object_t* ob)
pClass %= 3; // Number of user-selectable classes.

MNMobjPreview_SetPlayerClass(ob, pClass);
MNMobjPreview_SetMobjType(ob, (PCLASS_NONE == pClass? MT_NONE : PCLASS_INFO(pClass)->mobjType));
MNMobjPreview_SetMobjType(ob, PCLASS_INFO(pClass)->mobjType);
}

// Fighter is Yellow, others Red by default.
MNMobjPreview_SetTranslationClass(ob, pClass);
MNMobjPreview_SetTranslationMap(ob, pClass == PCLASS_FIGHTER? 2 : 0);
}

// Call MNMobjPreview's ticker now we've done our own processing.
Expand Down

0 comments on commit eabae76

Please sign in to comment.