//
// Plasma Msg Handler
//
hsBool plAgeLoader::MsgReceive(plMessage* msg)
{
    plInitialAgeStateLoadedMsg *stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef( msg );
    if( stateMsg != nil )
    {
        // done receiving the initial state of the age from the server
        return true;
    }

    plClientMsg* clientMsg = plClientMsg::ConvertNoRef(msg);
    if (clientMsg && clientMsg->GetClientMsgFlag()==plClientMsg::kInitComplete)
    {
        ExecPendingAgeFniFiles();   // exec age-specific fni files
        return true;
    }

    
    return plReceiver::MsgReceive(msg);
}
Beispiel #2
0
//
// Plasma Msg Handler
//
bool plAgeLoader::MsgReceive(plMessage* msg)
{
    plInitialAgeStateLoadedMsg *stateMsg = plInitialAgeStateLoadedMsg::ConvertNoRef( msg );
    if( stateMsg != nil )
    {
        // done receiving the initial state of the age from the server
        return true;
    }

    plClientMsg* clientMsg = plClientMsg::ConvertNoRef(msg);
    if (clientMsg && clientMsg->GetClientMsgFlag()==plClientMsg::kInitComplete)
    {
        ExecPendingAgeFniFiles();   // exec age-specific fni files
        return true;
    }

    // sadface thread protection
    if (plResPatcherMsg::ConvertNoRef(msg)) {
        delete plResPatcher::GetInstance()->fProgress;
        plResPatcher::GetInstance()->fProgress = nullptr;
    }

    return plReceiver::MsgReceive(msg);
}