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

◆ AddActiveInputRestriction() [2/2]

override void MissionBase::AddActiveInputRestriction ( int restrictor)
inlineprotected

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

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

943 {
944 //unique behaviour outside regular excludes
945 if (restrictor > -1)
946 {
947 switch (restrictor)
948 {
949 case EInputRestrictors.INVENTORY:
950 {
951 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
952 PlayerBase player = PlayerBase.Cast( g_Game.GetPlayer() );
953 if ( player )
954 {
955 ItemBase item = player.GetItemInHands();
956 if (item && item.IsWeapon())
957 player.RequestResetADSSync();
958 }
959 break;
960 }
961 case EInputRestrictors.MAP:
962 {
963 GetUApi().GetInputByID(UAWalkRunForced).ForceEnable(true); // force walk on!
964 break;
965 }
966 case EInputRestrictors.SURRENDER_TRANSITION:
967 {
968 GetUApi().GetInputByID(UATempRaiseWeapon).ForceDisable(true);
969 break;
970 }
971 }
972
974 {
975 m_ActiveInputRestrictions = new array<int>;
976 }
977 if (m_ActiveInputRestrictions.Find(restrictor) == -1)
978 {
979 m_ActiveInputRestrictions.Insert(restrictor);
980 }
981 }
982 }
DayZGame g_Game
Определения DayZGame.c:4074
class GP5GasMask extends MaskBase ItemBase
proto native UAInputAPI GetUApi()
ref array< int > m_ActiveInputRestrictions
Определения missionGameplay.c:40
proto native void ForceEnable(bool bEnable)
proto native void ForceDisable(bool bEnable)
proto native UAInput GetInputByID(int iID)
returns list of all bindable (i.e. visible) inputs from the active group ('core' by default)

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