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

◆ SendLiftWeaponSync()

void ManBase::SendLiftWeaponSync ( bool state)
inlineprotected

Client-side only.

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

8099 {
8101
8102 // Apply state immediately
8103 m_LiftWeapon_player = state;
8104
8105 hcw = GetCommandModifier_Weapons();
8106 if (hcw)
8107 hcw.LiftWeapon(state);
8108
8110
8111 // Notify server to apply same state
8112 if (GetGame().IsMultiplayer() && GetGame().IsClient())
8113 {
8114 ScriptInputUserData ctx = new ScriptInputUserData;
8115 if (!ctx.CanStoreInputUserData())
8116 {
8117 // ctx not available??
8118 return;
8119 }
8120
8122 ctx.Write(state);
8123 ctx.Send();
8124 }
8125 }
const int INPUT_UDT_WEAPON_LIFT_EVENT
Определения _constants.c:16
proto native void LiftWeapon(bool pState)
command for lifting weapon near obstacled (works only when weapon is raised)
override WeaponManager GetWeaponManager()
Определения PlayerBase.c:1859
proto native void Send()
proto static native bool CanStoreInputUserData()
Returns true when the channel is free, AND the InputBuffer is NOT full (same as '!...
proto bool Write(void value_out)
void OnLiftWeapon()
Определения WeaponManager.c:1325
proto native CGame GetGame()
void HumanCommandWeapons()
Определения human.c:1113

Перекрестные ссылки ScriptInputUserData::CanStoreInputUserData(), GetGame(), GetWeaponManager(), INPUT_UDT_WEAPON_LIFT_EVENT, HumanCommandWeapons::LiftWeapon(), ScriptInputUserData::Send() и Serializer::Write().

Используется в CheckLiftWeapon().