Skip to content

Commit

Permalink
Multiplayer: Fixed thing and state ID lookup
Browse files Browse the repository at this point in the history
Now only prints the things and states not found in the local
definitions.
  • Loading branch information
skyjake committed Jan 19, 2012
1 parent 1e21653 commit 9d54848
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions doomsday/engine/portable/src/cl_world.c
Expand Up @@ -115,10 +115,12 @@ void Cl_ReadServerMobjTypeIDs(void)
// Translate the type IDs to local.
for(i = 0; i < StringArray_Size(ar); ++i)
{
xlatMobjType.serverToLocal[i] = Def_GetMobjNumForName(StringArray_At(ar, i));
#ifdef _DEBUG
Con_Message("Server mobj %i => local %i\n", i, xlatMobjType.serverToLocal[i]);
#endif
xlatMobjType.serverToLocal[i] = Def_GetMobjNum(StringArray_At(ar, i));
if(xlatMobjType.serverToLocal[i] < 0)
{
Con_Message("Could not find '%s' in local thing definitions.\n",
StringArray_At(ar, i));
}
}

StringArray_Delete(ar);
Expand All @@ -139,9 +141,11 @@ void Cl_ReadServerMobjStateIDs(void)
for(i = 0; i < StringArray_Size(ar); ++i)
{
xlatMobjState.serverToLocal[i] = Def_GetStateNum(StringArray_At(ar, i));
#ifdef _DEBUG
Con_Message("Server state %i => local %i\n", i, xlatMobjState.serverToLocal[i]);
#endif
if(xlatMobjState.serverToLocal[i] < 0)
{
Con_Message("Could not find '%s' in local state definitions.\n",
StringArray_At(ar, i));
}
}

StringArray_Delete(ar);
Expand Down

0 comments on commit 9d54848

Please sign in to comment.