| 1160 | */ |
| 1161 | |
| 1162 | int CTaskManager::WaitSignal( CTask *task, bool &completed , CIcarus* icarus ) |
| 1163 | { |
| 1164 | CBlock *block = task->GetBlock(); |
| 1165 | char *sVal; |
| 1166 | int memberNum = 0; |
| 1167 | |
| 1168 | completed = false; |
| 1169 | |
| 1170 | ICARUS_VALIDATE( Get( m_ownerID, block, memberNum, &sVal , icarus) ); |
| 1171 | |
| 1172 | if ( task->GetTimeStamp() == icarus->GetGame()->GetTime() ) |
| 1173 | { |
| 1174 | //Print out the debug info |
| 1175 | icarus->GetGame()->DebugPrint(IGameInterface::WL_DEBUG, "%4d waitsignal(\"%s\"); [%d]", m_ownerID, sVal, task->GetTimeStamp() ); |
| 1176 | } |
| 1177 | |
| 1178 | if ( icarus->CheckSignal( sVal ) ) |
| 1179 | { |
| 1180 | completed = true; |
| 1181 | icarus->ClearSignal( sVal ); |
| 1182 | } |
| 1183 | |
| 1184 | return TASK_OK; |
| 1185 | } |
| 1186 | |
| 1187 | /* |
| 1188 | ------------------------- |
nothing calls this directly
no test coverage detected