- Switched to a genericly extensible representation for userinfo.
- Fixed: The playerinfo CCMD did not range check the player number. SVN r4253 (trunk)
This commit is contained in:
parent
404df07629
commit
2668988870
37 changed files with 744 additions and 429 deletions
|
|
@ -596,12 +596,12 @@ void PlayerIsGone (int netnode, int netconsole)
|
|||
if (deathmatch)
|
||||
{
|
||||
Printf ("%s left the game with %d frags\n",
|
||||
players[netconsole].userinfo.netname,
|
||||
players[netconsole].fragcount);
|
||||
players[netconsole].userinfo.GetName(),
|
||||
players[netconsole].fragcount);
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf ("%s left the game\n", players[netconsole].userinfo.netname);
|
||||
Printf ("%s left the game\n", players[netconsole].userinfo.GetName());
|
||||
}
|
||||
|
||||
// [RH] Revert each player to their own view if spying through the player who left
|
||||
|
|
@ -646,7 +646,7 @@ void PlayerIsGone (int netnode, int netconsole)
|
|||
{
|
||||
Net_Arbitrator = i;
|
||||
players[i].settings_controller = true;
|
||||
Printf ("%s is the new arbitrator\n", players[i].userinfo.netname);
|
||||
Printf ("%s is the new arbitrator\n", players[i].userinfo.GetName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1361,7 +1361,7 @@ bool DoArbitrate (void *userdata)
|
|||
data->playersdetected[0] |= 1 << netbuffer[1];
|
||||
|
||||
StartScreen->NetMessage ("Found %s (node %d, player %d)",
|
||||
players[netbuffer[1]].userinfo.netname,
|
||||
players[netbuffer[1]].userinfo.GetName(),
|
||||
node, netbuffer[1]+1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1968,12 +1968,12 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
{
|
||||
case DEM_SAY:
|
||||
{
|
||||
const char *name = players[player].userinfo.netname;
|
||||
const char *name = players[player].userinfo.GetName();
|
||||
BYTE who = ReadByte (stream);
|
||||
|
||||
s = ReadString (stream);
|
||||
CleanseString (s);
|
||||
if (((who & 1) == 0) || players[player].userinfo.team == TEAM_NONE)
|
||||
if (((who & 1) == 0) || players[player].userinfo.GetTeam() == TEAM_NONE)
|
||||
{ // Said to everyone
|
||||
if (who & 2)
|
||||
{
|
||||
|
|
@ -1985,7 +1985,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
}
|
||||
S_Sound (CHAN_VOICE | CHAN_UI, gameinfo.chatSound, 1, ATTN_NONE);
|
||||
}
|
||||
else if (players[player].userinfo.team == players[consoleplayer].userinfo.team)
|
||||
else if (players[player].userinfo.GetTeam() == players[consoleplayer].userinfo.GetTeam())
|
||||
{ // Said only to members of the player's team
|
||||
if (who & 2)
|
||||
{
|
||||
|
|
@ -2392,7 +2392,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
players[playernum].settings_controller = true;
|
||||
|
||||
if (consoleplayer == playernum || consoleplayer == Net_Arbitrator)
|
||||
Printf ("%s has been added to the controller list.\n", players[playernum].userinfo.netname);
|
||||
Printf ("%s has been added to the controller list.\n", players[playernum].userinfo.GetName());
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -2402,7 +2402,7 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
|||
players[playernum].settings_controller = false;
|
||||
|
||||
if (consoleplayer == playernum || consoleplayer == Net_Arbitrator)
|
||||
Printf ("%s has been removed from the controller list.\n", players[playernum].userinfo.netname);
|
||||
Printf ("%s has been removed from the controller list.\n", players[playernum].userinfo.GetName());
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -2653,7 +2653,7 @@ CCMD (pings)
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i])
|
||||
Printf ("% 4d %s\n", currrecvtime[i] - lastrecvtime[i],
|
||||
players[i].userinfo.netname);
|
||||
players[i].userinfo.GetName());
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
@ -2675,13 +2675,13 @@ static void Network_Controller (int playernum, bool add)
|
|||
|
||||
if (players[playernum].settings_controller && add)
|
||||
{
|
||||
Printf ("%s is already on the setting controller list.\n", players[playernum].userinfo.netname);
|
||||
Printf ("%s is already on the setting controller list.\n", players[playernum].userinfo.GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!players[playernum].settings_controller && !add)
|
||||
{
|
||||
Printf ("%s is not on the setting controller list.\n", players[playernum].userinfo.netname);
|
||||
Printf ("%s is not on the setting controller list.\n", players[playernum].userinfo.GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2780,7 +2780,7 @@ CCMD (net_listcontrollers)
|
|||
|
||||
if (players[i].settings_controller)
|
||||
{
|
||||
Printf ("- %s\n", players[i].userinfo.netname);
|
||||
Printf ("- %s\n", players[i].userinfo.GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue