| 272 | #ifndef NEWEDITOR |
| 273 | |
| 274 | bool matcen::StartObjProd() { |
| 275 | if (m_cached_prod_index < 0 || m_max_prod_type[m_cached_prod_index] >= m_num_prod_type[m_cached_prod_index]) |
| 276 | ComputeNextProdInfo(); |
| 277 | |
| 278 | if (m_status & (MSTAT_DONE_PROD | MSTAT_ACTIVE_PAUSE | MSTAT_DISABLED)) |
| 279 | return false; |
| 280 | |
| 281 | if (m_prod_mode != MMODE_NOTPROD) |
| 282 | return false; |
| 283 | |
| 284 | if (!(m_status & (MSTAT_ACTIVE))) |
| 285 | return false; |
| 286 | |
| 287 | if (m_max_prod <= m_num_prod && m_max_prod != -1) { |
| 288 | mprintf(0, "MATCEN: Done\n"); |
| 289 | m_status |= MSTAT_DONE_PROD; |
| 290 | return false; |
| 291 | } |
| 292 | |
| 293 | if (m_cached_prod_index < 0) |
| 294 | return false; |
| 295 | |
| 296 | // Guarentees against designer error |
| 297 | pos_state pos; |
| 298 | matrix idmat = Identity_matrix; |
| 299 | |
| 300 | int croom = m_create_room; |
| 301 | if (!ROOMNUM_OUTSIDE(m_create_room) && (Rooms[m_create_room].flags & RF_EXTERNAL)) { |
| 302 | croom = GetTerrainRoomFromPos(&m_create_pnt); |
| 303 | } |
| 304 | |
| 305 | pos.position = &m_create_pnt; |
| 306 | pos.orient = &idmat; |
| 307 | pos.roomnum = croom; |
| 308 | |
| 309 | Sound_system.StopSoundLooping(Sound_system.Play3dSound(m_sounds[MATCEN_PROD_SOUND], SND_PRIORITY_HIGH, &pos)); |
| 310 | |
| 311 | m_status &= ~MSTAT_NEVER_PROD; |
| 312 | |
| 313 | m_prod_mode_time = 0.0f; |
| 314 | m_prod_mode = MMODE_PREPROD; |
| 315 | m_cur_saturation_count = 0; |
| 316 | |
| 317 | return true; |
| 318 | } |
| 319 | |
| 320 | bool matcen::DoObjProd() { |
| 321 | int objnum; |
nothing calls this directly
no test coverage detected