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

◆ OnSyncJuncture()

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

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

579 {
580 if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_SET_JAMMING_CHANCE )
581 {
582 pCtx.Read(m_NewJamChance);
583 }
584 else
585 {
586 int AcknowledgmentID;
587 pCtx.Read(AcknowledgmentID);
588 if ( AcknowledgmentID == m_PendingWeaponActionAcknowledgmentID)
589 {
590 if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_ACTION_ACK_ACCEPT)
591 {
592 m_readyToStart = true;
593 }
594 else if (pJunctureID == DayZPlayerSyncJunctures.SJ_WEAPON_ACTION_ACK_REJECT)
595 {
596 if(m_PendingWeaponAction >= 0 )
597 {
598 if(!(GetGame().IsServer() && GetGame().IsMultiplayer()))
599 {
600 InventoryLocation ilWeapon = new InventoryLocation();
601 ItemBase weapon = m_player.GetItemInHands();
602 weapon.GetInventory().GetCurrentInventoryLocation(ilWeapon);
603 m_player.GetInventory().ClearInventoryReservationEx(m_player.GetItemInHands(),ilWeapon);
604
606 {
607 m_PendingTargetMagazine.GetInventory().ClearInventoryReservationEx(m_PendingTargetMagazine, m_TargetInventoryLocation );
608 }
609
611 {
612 m_player.GetInventory().ClearInventoryReservationEx( NULL, m_PendingInventoryLocation );
613 }
614 }
619 m_InProgress = false;
620 }
621 }
622 }
623 }
624 }
class GP5GasMask extends MaskBase ItemBase
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
proto native CGame GetGame()

Перекрестные ссылки GetGame(), 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.