| 632 | } |
| 633 | void start_tutorial(LPCSTR name); |
| 634 | void CActor::Die(CObject* who) |
| 635 | { |
| 636 | inherited::Die(who); |
| 637 | |
| 638 | { |
| 639 | xr_vector<CInventorySlot>::iterator I = inventory().m_slots.begin(); |
| 640 | xr_vector<CInventorySlot>::iterator E = inventory().m_slots.end(); |
| 641 | |
| 642 | for (u32 slot_idx = 0; I != E; ++I, ++slot_idx) |
| 643 | { |
| 644 | if (slot_idx == inventory().GetActiveSlot()) |
| 645 | { |
| 646 | if ((*I).m_pIItem) |
| 647 | { |
| 648 | (*I).m_pIItem->SetDropManual(TRUE); |
| 649 | } |
| 650 | continue; |
| 651 | } |
| 652 | else |
| 653 | { |
| 654 | CCustomOutfit* pOutfit = smart_cast<CCustomOutfit*>((*I).m_pIItem); |
| 655 | if (pOutfit) |
| 656 | continue; |
| 657 | }; |
| 658 | if ((*I).m_pIItem) |
| 659 | inventory().Ruck((*I).m_pIItem); |
| 660 | }; |
| 661 | |
| 662 | ///!!! чистка пояса |
| 663 | TIItemContainer& l_blist = inventory().m_belt; |
| 664 | while (!l_blist.empty()) |
| 665 | inventory().Ruck(l_blist.front()); |
| 666 | } |
| 667 | |
| 668 | if (!psActorFlags.test(AF_FIRST_PERSON_DEATH)) |
| 669 | { |
| 670 | cam_Set(eacFreeLook); |
| 671 | } |
| 672 | mstate_wishful &= ~mcAnyMove; |
| 673 | mstate_real &= ~mcAnyMove; |
| 674 | |
| 675 | ::Sound->play_at_pos(sndDie[Random.randI(SND_DIE_COUNT)], this, Position()); |
| 676 | |
| 677 | m_HeavyBreathSnd.stop(); |
| 678 | m_BloodSnd.stop(); |
| 679 | |
| 680 | start_tutorial("game_over"); |
| 681 | xr_delete(m_sndShockEffector); |
| 682 | } |
| 683 | |
| 684 | void CActor::SwitchOutBorder(bool new_border_state) |
| 685 | { |
nothing calls this directly
no test coverage detected