If no player exists and GameCfg.LasterPlayer is unset, give user a nice default for convenience and - more important - let menu stop to nag about missing callsign and thereby showing the player creation dialogue over and over again
This commit is contained in:
parent
f4d8a1e0a1
commit
ffa7f639c1
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
|||
20100623
|
||||
--------
|
||||
main/menu.c, main/newmenu.c, main/newmenu.h, main/net_ipx.c: Making menus recreated on the fly in case resolution or font-size changes; Removing arguments to pass width and height to menu which was not used except on one IPX menu; Fixing measurement of menu strings of type NM_TYPE_INPUT_MENU; Fixing slight bug in freeing IPX netlist
|
||||
main/menu.c: If no player exists and GameCfg.LasterPlayer is unset, give user a nice default for convenience and - more important - let menu stop to nag about missing callsign and thereby showing the player creation dialogue over and over again
|
||||
|
||||
20100622
|
||||
--------
|
||||
|
|
11
main/menu.c
11
main/menu.c
|
@ -321,11 +321,16 @@ int RegisterPlayer()
|
|||
|
||||
if ( Players[Player_num].callsign[0] == 0 )
|
||||
{
|
||||
// Read the last player's name from config file, not lastplr.txt
|
||||
strncpy( Players[Player_num].callsign, GameCfg.LastPlayer, CALLSIGN_LEN );
|
||||
|
||||
if (GameCfg.LastPlayer[0]==0)
|
||||
{
|
||||
strncpy( Players[Player_num].callsign, "player", CALLSIGN_LEN );
|
||||
allow_abort_flag = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read the last player's name from config file, not lastplr.txt
|
||||
strncpy( Players[Player_num].callsign, GameCfg.LastPlayer, CALLSIGN_LEN );
|
||||
}
|
||||
}
|
||||
|
||||
list = PHYSFSX_findFiles(GameArg.SysUsePlayersDir ? "Players/" : "", types);
|
||||
|
|
Loading…
Reference in a new issue