DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ StartPendingAction()

void WeaponManager::StartPendingAction ( )
inlineprivate

См. определение в файле WeaponManager.c строка 807

808 {
809 m_WeaponInHand = Weapon_Base.Cast(m_player.GetItemInHands());
810 if(!m_WeaponInHand)
811 {
813 return;
814 }
815 switch (m_PendingWeaponAction)
816 {
818 {
819 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventAttachMagazine(m_player, m_PendingTargetMagazine) );
820 break;
821 }
823 {
824 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventSwapMagazine(m_player, m_PendingTargetMagazine, m_PendingInventoryLocation) );
825 break;
826 }
828 {
829 Magazine mag = Magazine.Cast(m_PendingInventoryLocation.GetItem());
830 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventDetachMagazine(m_player, mag, m_PendingInventoryLocation) );
831 break;
832 }
834 {
835 m_WantContinue = false;
836 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventLoad1Bullet(m_player, m_PendingTargetMagazine) );
837 break;
838 }
840 {
841 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventLoad1Bullet(m_player, m_PendingTargetMagazine) );
842 break;
843 }
845 {
846 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventContinuousLoadBulletEnd(m_player) );
847 break;
848 }
849 case AT_WPN_UNJAM:
850 {
851 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventUnjam(m_player, NULL) );
852 break;
853 }
855 {
856 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventMechanism(m_player, NULL) );
857 break;
858 }
860 {
861 m_player.GetDayZPlayerInventory().PostWeaponEvent( new WeaponEventSetNextMuzzleMode(m_player, NULL) );
862 break;
863 }
864 default:
865 m_InProgress = false;
866 Error("unknown actionID=" + m_PendingWeaponAction);
867 }
868 m_IsEventSended = true;
869 m_canEnd = false;
870 }
const int AT_WPN_DETACH_MAGAZINE
Определения _constants.c:12
const int AT_WPN_LOAD_MULTI_BULLETS_END
Определения _constants.c:17
const int AT_WPN_ATTACH_MAGAZINE
Определения _constants.c:10
const int AT_WPN_LOAD_BULLET
Определения _constants.c:13
const int AT_WPN_UNJAM
Определения _constants.c:14
const int AT_WPN_SWAP_MAGAZINE
Определения _constants.c:11
const int AT_WPN_LOAD_MULTI_BULLETS_START
Определения _constants.c:16
const int AT_WPN_EJECT_BULLET
Определения _constants.c:15
const int AT_WPN_SET_NEXT_MUZZLE_MODE
Определения _constants.c:18
PlayerBase m_player
Определения WeaponManager.c:5
bool m_WantContinue
Определения WeaponManager.c:19
bool m_IsEventSended
Определения WeaponManager.c:18
bool m_InProgress
Определения WeaponManager.c:17
Magazine m_PendingTargetMagazine
Определения WeaponManager.c:10
void OnWeaponActionEnd()
Определения WeaponManager.c:995
Weapon_Base m_WeaponInHand
Определения WeaponManager.c:23
ref InventoryLocation m_PendingInventoryLocation
Определения WeaponManager.c:13
int m_PendingWeaponAction
Определения WeaponManager.c:12
bool m_canEnd
Определения WeaponManager.c:15
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки AT_WPN_ATTACH_MAGAZINE, AT_WPN_DETACH_MAGAZINE, AT_WPN_EJECT_BULLET, AT_WPN_LOAD_BULLET, AT_WPN_LOAD_MULTI_BULLETS_END, AT_WPN_LOAD_MULTI_BULLETS_START, AT_WPN_SET_NEXT_MUZZLE_MODE, AT_WPN_SWAP_MAGAZINE, AT_WPN_UNJAM, Error(), m_canEnd, m_InProgress, m_IsEventSended, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_player, m_WantContinue, m_WeaponInHand и OnWeaponActionEnd().

Используется в StartAction() и Update().