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

◆ IsColliding()

bool IsColliding ( string part_name)
protected

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

1720 {
1722 return false;
1723
1724 ConstructionPart part = GetConstructionPart(part_name);
1725 if (part && part.GetCollisionData().Count() == 2)
1726 {
1727 vector center;
1728 float absolute_ofset = 0.05; //we need to lift BBox even more, because it colliddes with house floors due to various reasons (probably geometry or float imperfections)
1729 vector edge_length;
1730 vector min_max[2]; //data used for creating trigger
1731 array<Object> excludedObjects = new array<Object>();
1732 array<Object> collidedObjects = new array<Object>();
1733
1734 excludedObjects.Insert(m_EntityParent);
1735
1736 //get min_max and center from config and memory points
1737 GetCollisionBoxData(part_name, min_max);
1738
1739 center = GetBoxCenter(min_max);
1740 center = m_EntityParent.ModelToWorld(center); //convert to world coordinates
1741 edge_length = GetCollisionBoxSize(min_max);
1742
1743 if (g_Game.IsBoxCollidingGeometry(Vector(center[0], center[1] + absolute_ofset, center[2]), m_EntityParent.GetOrientation(), edge_length, ObjIntersectView, ObjIntersectGeom, excludedObjects, collidedObjects))
1744 {
1745 for (int i = 0; i < collidedObjects.Count(); ++i)
1746 {
1747 EntityAI entity = EntityAI.Cast(collidedObjects.Get(i));
1748 if (entity && !entity.IsIgnoredByConstruction())
1749 return true;
1750 }
1751 }
1752 }
1753 return false;
1754 }
ConstructionPart GetConstructionPart()
Определения ActionPartInfo.c:235
vector GetBoxCenter(vector min_max[2])
Определения ConstructionBase.c:1634
vector GetCollisionBoxSize(vector min_max[2])
Определения ConstructionBase.c:1574
void GetCollisionBoxData(string part_name, out vector min_max[2])
Определения ConstructionBase.c:1586
EntityAI m_EntityParent
Определения ConstructionBase.c:45
DayZGame g_Game
Определения DayZGame.c:4074
static bool GetDisableIsCollidingCheck()
Определения CfgGameplayHandler.c:337
array< string > GetCollisionData()
strings of min/max selections (should be single points in memory LOD)
Определения ConstructionPart.c:294
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
Определения ConstructionPart.c:4
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:119
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки g_Game, GetBoxCenter(), GetCollisionBoxData(), GetCollisionBoxSize(), ConstructionPart::GetCollisionData(), GetConstructionPart(), CfgGameplayHandler::GetDisableIsCollidingCheck(), m_EntityParent и Vector().