예제 #1
0
void Cl_ResetTransTables()
{
    if (serverMaterials)
    {
        delete serverMaterials;
        serverMaterials = 0;
    }

    xlatMobjType.clear();
    xlatMobjState.clear();
}
예제 #2
0
void Cl_ResetTransTables()
{
    if(serverMaterials)
    {
        MaterialArchive_Delete(serverMaterials);
        serverMaterials = 0;
    }

    xlatMobjType.clear();
    xlatMobjState.clear();
}
예제 #3
0
void Cl_ReadServerMobjTypeIDs()
{
    LOG_AS("Cl_ReadServerMobjTypeIDs");

    StringArray *ar = StringArray_New();
    StringArray_Read(ar, msgReader);

    LOGDEV_NET_VERBOSE("Received %i mobj type IDs") << StringArray_Size(ar);

    xlatMobjType.resize(StringArray_Size(ar));

    // Translate the type IDs to local.
    for (dint i = 0; i < StringArray_Size(ar); ++i)
    {
        xlatMobjType[i] = DED_Definitions()->getMobjNum(StringArray_At(ar, i));
        if (xlatMobjType[i] < 0)
        {
            LOG_NET_WARNING("Could not find '%s' in local thing definitions")
                    << StringArray_At(ar, i);
        }
    }

    StringArray_Delete(ar);
}
예제 #4
0
void Cl_InitTransTables()
{
    serverMaterials = 0;
    xlatMobjType.clear();
    xlatMobjState.clear();
}
예제 #5
0
int Cl_LocalMobjState(int serverMobjState)
{
    if (serverMobjState < 0 || serverMobjState >= xlatMobjState.size())
        return 0; // Invalid state.
    return xlatMobjState[serverMobjState];
}
예제 #6
0
int Cl_LocalMobjType(int serverMobjType)
{
    if (serverMobjType < 0 || serverMobjType >= xlatMobjType.size())
        return 0; // Invalid type.
    return xlatMobjType[serverMobjType];
}