MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Die

Method Die

ogsr_engine/xrGame/Actor.cpp:634–682  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633void start_tutorial(LPCSTR name);
634void 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
684void CActor::SwitchOutBorder(bool new_border_state)
685{

Callers

nothing calls this directly

Calls 13

start_tutorialFunction · 0.85
xr_deleteFunction · 0.85
GetActiveSlotMethod · 0.80
SetDropManualMethod · 0.80
randIMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
RuckMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
testMethod · 0.45
play_at_posMethod · 0.45

Tested by

no test coverage detected