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

◆ IsIgnoredObject()

bool EntityAI::IsIgnoredObject ( Object o)
inlineprotected

If the player can't interact (hint: collide) with the object, then it is ignored

Ignore any player that is currently in this vehicle

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

440 {
441 if (!o)
442 return false;
443
445 int layer = dBodyGetInteractionLayer(o);
446 bool interacts = dGetInteractionLayer(this, PhxInteractionLayers.CHARACTER, layer);
447 if (!interacts)
448 {
449 return true;
450 }
451
452 DayZPlayer player;
453 if (Class.CastTo(player, o))
454 {
456 HumanCommandVehicle hcv = player.GetCommand_Vehicle();
457 if (hcv && hcv.GetTransport() == this)
458 {
459 return true;
460 }
461 }
462
463 EntityAI e = EntityAI.Cast(o);
464 // CanBeSkinned means it is a dead entity which should not block the door
465 return ( ( e && (e.IsZombie() || e.IsHologram()) ) || o.CanBeSkinned() || o.IsBush() || o.IsTree() );
466 }
class LogManager EntityAI
PhxInteractionLayers
Определения DayZPhysics.c:2
proto native Transport GetTransport()
proto native bool dGetInteractionLayer(notnull IEntity worldEntity, int mask1, int mask2)
proto native int dBodyGetInteractionLayer(notnull IEntity ent)

Перекрестные ссылки Class::CastTo(), dBodyGetInteractionLayer(), dGetInteractionLayer() и HumanCommandVehicle::GetTransport().

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