| 1396 | } |
| 1397 | |
| 1398 | void CCustomZone::ThrowOutArtefact(CArtefact* pArtefact) |
| 1399 | { |
| 1400 | Fvector pos; |
| 1401 | pos.set(Position()); |
| 1402 | pos.y += m_fArtefactSpawnHeight; |
| 1403 | pArtefact->XFORM().c.set(pos); |
| 1404 | |
| 1405 | if (*m_sArtefactSpawnParticles) |
| 1406 | { |
| 1407 | CParticlesObject* pParticles; |
| 1408 | pParticles = CParticlesObject::Create(*m_sArtefactSpawnParticles, TRUE); |
| 1409 | pParticles->UpdateParent(pArtefact->XFORM(), {}); |
| 1410 | pParticles->Play(false); |
| 1411 | } |
| 1412 | |
| 1413 | m_ArtefactBornSound.play_at_pos(0, pos); |
| 1414 | |
| 1415 | NET_Packet PP; |
| 1416 | CGameObject::u_EventGen(PP, GE_CHANGE_POS, pArtefact->ID()); |
| 1417 | PP.w_vec3(pos); |
| 1418 | CGameObject::u_EventSend(PP); |
| 1419 | |
| 1420 | Fvector dir; |
| 1421 | dir.random_dir(); |
| 1422 | dir.normalize(); |
| 1423 | pArtefact->m_pPhysicsShell->applyImpulse(dir, m_fThrowOutPower); |
| 1424 | } |
| 1425 | |
| 1426 | // void CCustomZone::PrefetchArtefacts() |
| 1427 | //{ |
nothing calls this directly
no test coverage detected