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

◆ OnSyncJuncture()

void WeaponManager::OnSyncJuncture ( int pJunctureID,
ParamsReadContext pCtx )
inlineprivate

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

580 {
581 if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_SET_JAMMING_CHANCE )
582 {
583 pCtx.Read(m_NewJamChance);
584 }
585 else
586 {
587 int AcknowledgmentID;
588 pCtx.Read(AcknowledgmentID);
589 if ( AcknowledgmentID == m_PendingWeaponActionAcknowledgmentID)
590 {
591 if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_ACTION_ACK_ACCEPT)
592 {
593 m_readyToStart = true;
594 }
595 else if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_ACTION_ACK_REJECT)
596 {
597 if(m_PendingWeaponAction >= 0 )
598 {
599 if(!(g_Game.IsServer() && g_Game.IsMultiplayer()))
600 {
601 InventoryLocation ilWeapon = new InventoryLocation();
602 ItemBase weapon = m_player.GetItemInHands();
603 GameInventory playerInventory = m_player.GetInventory();
604 weapon.GetInventory().GetCurrentInventoryLocation(ilWeapon);
605 playerInventory.ClearInventoryReservationEx(weapon, ilWeapon);
606
608 {
609 m_PendingTargetMagazine.GetInventory().ClearInventoryReservationEx(m_PendingTargetMagazine, m_TargetInventoryLocation );
610 }
611
613 {
615 }
616 }
621 m_InProgress = false;
622 }
623 }
624 }
625 }
626 }
DayZGame g_Game
Определения DayZGame.c:3942
class GP5GasMask extends MaskBase ItemBase
bool ClearInventoryReservationEx(EntityAI item, InventoryLocation dst)
proto bool Read(void value_in)
PlayerBase m_player
Определения WeaponManager.c:5
bool m_readyToStart
Определения WeaponManager.c:22
int m_PendingWeaponActionAcknowledgmentID
Определения WeaponManager.c:9
bool m_InProgress
Определения WeaponManager.c:17
float m_NewJamChance
Определения WeaponManager.c:39
Magazine m_PendingTargetMagazine
Определения WeaponManager.c:10
ref InventoryLocation m_PendingInventoryLocation
Определения WeaponManager.c:13
ref InventoryLocation m_TargetInventoryLocation
Определения WeaponManager.c:11
int m_PendingWeaponAction
Определения WeaponManager.c:12

Перекрестные ссылки GameInventory::ClearInventoryReservationEx(), g_Game, m_InProgress, m_NewJamChance, m_PendingInventoryLocation, m_PendingTargetMagazine, m_PendingWeaponAction, m_PendingWeaponActionAcknowledgmentID, m_player, m_readyToStart, m_TargetInventoryLocation, Serializer::Read(), DayZPlayerSyncJunctures::SJ_WEAPON_ACTION_ACK_ACCEPT, DayZPlayerSyncJunctures::SJ_WEAPON_ACTION_ACK_REJECT и DayZPlayerSyncJunctures::SJ_WEAPON_SET_JAMMING_CHANCE.