aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaleb <caleb@openarc.net>2016-03-19 13:38:22 -0400
committerCaleb <caleb@openarc.net>2016-03-19 13:38:22 -0400
commitde9630f97bab72e82bbddf224db02d3cec9b8b19 (patch)
tree0edefa292fd1c3ef8086df901a8a78ea427cf5a1
parentbe67906a1a598d50f4e4e1591fb1446303bec478 (diff)
downloadAmuletsArmor-de9630f97bab72e82bbddf224db02d3cec9b8b19.tar.gz
AmuletsArmor-de9630f97bab72e82bbddf224db02d3cec9b8b19.tar.bz2
AmuletsArmor-de9630f97bab72e82bbddf224db02d3cec9b8b19.zip
Updated player "look" while in game to display class and level
-rw-r--r--Exe/AA.exebin603136 -> 603136 bytes
-rw-r--r--Include/PEOPHERE.H4
-rw-r--r--Source/CSYNCPCK.C6
-rw-r--r--Source/PEOPHERE.C7
4 files changed, 12 insertions, 5 deletions
diff --git a/Exe/AA.exe b/Exe/AA.exe
index 1aa7daf..574a959 100644
--- a/Exe/AA.exe
+++ b/Exe/AA.exe
Binary files differ
diff --git a/Include/PEOPHERE.H b/Include/PEOPHERE.H
index e396e65..060e453 100644
--- a/Include/PEOPHERE.H
+++ b/Include/PEOPHERE.H
@@ -63,6 +63,10 @@ static T_directTalkUniqueAddress G_peopleNetworkIDInGame[MAX_PLAYERS_PER_GAME];
T_void ISetupGame(T_gameGroupID groupID);
+void GetPlayerLabel(T_playerIDSelf *p_playerID, char* buffer);
+
+T_playerIDSelf *IFindByName(T_byte8 *p_name);
+
#endif
/****************************************************************************/
diff --git a/Source/CSYNCPCK.C b/Source/CSYNCPCK.C
index 73e7dde..3b0f54b 100644
--- a/Source/CSYNCPCK.C
+++ b/Source/CSYNCPCK.C
@@ -581,6 +581,8 @@ static T_void IClientSyncDoPlayerAction(
E_Boolean isTargetMe ;
T_word16 item ;
T_word16 locked ;
+ T_playerIDSelf *p_playerID;
+ char playerLabel[MAX_CHAT_NAME_STRING];
DebugRoutine("IClientSyncDoPlayerAction") ;
DebugCheck(p_playerObj != NULL) ;
@@ -956,10 +958,12 @@ static T_void IClientSyncDoPlayerAction(
}
break ;
case PLAYER_ACTION_ID_SELF:
+ p_playerID = IFindByName((T_byte8 *)p_actionData);
+ GetPlayerLabel(p_playerID, playerLabel);
/* Append this information to the player data names. */
PeopleHereIDPlayer(
ObjectGetServerId(p_playerObj) - 9000,
- (T_byte8 *)p_actionData) ;
+ playerLabel);
break ;
}
diff --git a/Source/PEOPHERE.C b/Source/PEOPHERE.C
index 2442397..0a0d496 100644
--- a/Source/PEOPHERE.C
+++ b/Source/PEOPHERE.C
@@ -40,13 +40,12 @@ static T_word16 G_ourAdventure = 0;
//! Number of players in the current game group
static T_word16 G_numPeopleInGame = 0;
//! Names of the players in the current synchronized game
-static T_byte8 G_peopleNames[MAX_PLAYERS_PER_GAME][STATS_CHARACTER_NAME_MAX_LENGTH];
+static T_byte8 G_peopleNames[MAX_PLAYERS_PER_GAME][MAX_CHAT_NAME_STRING];
/*-------------------------------------------------------------------------*
* Prototypes:
*-------------------------------------------------------------------------*/
static T_playerIDSelf *ICreatePlayerID(T_playerIDSelf *p_playerID);
-static T_playerIDSelf *IFindByName(T_byte8 *p_name);
static T_playerIDLocation IGetOurLocation(T_void);
/*-------------------------------------------------------------------------*
@@ -123,7 +122,7 @@ T_void PeopleHereReset(T_void)
* @return Found player ID pointer or NULL
*
*<!-----------------------------------------------------------------------*/
-static T_playerIDSelf *IFindByName(T_byte8 *p_name)
+T_playerIDSelf *IFindByName(T_byte8 *p_name)
{
T_playerIDSelf *p_found = NULL;
T_word16 i;
@@ -743,7 +742,7 @@ T_void PeopleHereIDPlayer(T_word16 playerNum, T_byte8 *p_name)
DebugCheck(playerNum < MAX_PLAYERS_PER_GAME);
// Build a complete name using pieces of the name
- if (strlen(G_peopleNames[playerNum]) < 30)
+ if (strlen(G_peopleNames[playerNum]) < MAX_CHAT_NAME_STRING)
strcat(G_peopleNames[playerNum], p_name);
DebugEnd();