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

◆ CheckForGag()

void ManBase::CheckForGag ( )
inlineprotected

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

6182 {
6183 #ifdef SERVER
6184 Clothing item;
6185 GameInventory inventory = GetInventory();
6186 Class.CastTo(item, inventory.FindAttachment(InventorySlots.MASK));
6187 if (!item)
6188 {
6189 Class.CastTo(item, inventory.FindAttachment(InventorySlots.HEADGEAR));
6190 }
6191
6192 if (item && item.IsObstructingVoice())
6193 {
6194 item.MutePlayer(this,true);
6195 }
6196 else //should probably check for relevant types before removing mumbling and obstruction specifically..
6197 {
6198 g_Game.SetVoiceEffect(this, VoiceEffectMumbling, false);
6199 g_Game.SetVoiceEffect(this, VoiceEffectObstruction, false);
6200 }
6201 #endif
6202 }
DayZGame g_Game
Определения DayZGame.c:3942
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)

Перекрестные ссылки Class::CastTo(), GameInventory::FindAttachment() и g_Game.

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