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

◆ AddActiveInputRestriction()

override void MissionBase::AddActiveInputRestriction ( int restrictor)
inlineprotected

Adds one input restriction (specific behaviour oudside regular excludes, defined below)

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

994 {
995 //unique behaviour outside regular excludes
996 if (restrictor > -1)
997 {
998 switch (restrictor)
999 {
1000 case EInputRestrictors.INVENTORY:
1001 {
1002 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
1003 PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() );
1004 if ( player )
1005 {
1006 ItemBase item = player.GetItemInHands();
1007 if (item && item.IsWeapon())
1008 player.RequestResetADSSync();
1009 }
1010 break;
1011 }
1012 case EInputRestrictors.MAP:
1013 {
1014 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
1015 break;
1016 }
1017 }
1018
1020 {
1021 m_ActiveInputRestrictions = new array<int>;
1022 }
1023 if (m_ActiveInputRestrictions.Find(restrictor) == -1)
1024 {
1025 m_ActiveInputRestrictions.Insert(restrictor);
1026 }
1027 }
1028 }
class GP5GasMask extends MaskBase ItemBase
PlayerBase GetPlayer()
Определения ModifierBase.c:51
proto native UAInputAPI GetUApi()
ref array< int > m_ActiveInputRestrictions
Определения missionGameplay.c:40
proto native void ForceEnable(bool bEnable)
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)
proto native CGame GetGame()

Перекрестные ссылки UAInput::ForceEnable(), GetGame(), UAInputAPI::GetInputByID(), GetPlayer(), GetUApi() и m_ActiveInputRestrictions.

Используется в OnUpdate(), Pause(), PlayerControlDisable() и ShowInventory().