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

◆ CheckForGag()

void ManBase::CheckForGag ( )
inlineprotected

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

6463 {
6464 #ifdef SERVER
6465 Clothing item;
6466 GameInventory inventory = GetInventory();
6467 Class.CastTo(item, inventory.FindAttachment(InventorySlots.MASK));
6468 if (!item)
6469 {
6470 Class.CastTo(item, inventory.FindAttachment(InventorySlots.HEADGEAR));
6471 }
6472
6473 if (item && item.IsObstructingVoice())
6474 {
6475 item.MutePlayer(this,true);
6476 }
6477 else //should probably check for relevant types before removing mumbling and obstruction specifically..
6478 {
6479 g_Game.SetVoiceEffect(this, VoiceEffectMumbling, false);
6480 g_Game.SetVoiceEffect(this, VoiceEffectObstruction, false);
6481 }
6482 #endif
6483 }
Glasses_Base Clothing
DayZGame g_Game
Определения DayZGame.c:4074
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().