DayZ 1.27
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 строка 983

984 {
985 //unique behaviour outside regular excludes
986 if (restrictor > -1)
987 {
988 switch (restrictor)
989 {
990 case EInputRestrictors.INVENTORY:
991 {
992 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
993 PlayerBase player = PlayerBase.Cast( GetGame().GetPlayer() );
994 if ( player )
995 {
996 ItemBase item = player.GetItemInHands();
997 if (item && item.IsWeapon())
998 player.RequestResetADSSync();
999 }
1000 break;
1001 }
1002 case EInputRestrictors.MAP:
1003 {
1004 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
1005 break;
1006 }
1007 }
1008
1010 {
1011 m_ActiveInputRestrictions = new array<int>;
1012 }
1013 if (m_ActiveInputRestrictions.Find(restrictor) == -1)
1014 {
1015 m_ActiveInputRestrictions.Insert(restrictor);
1016 }
1017 }
1018 }
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().