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

◆ IsUnderRoofFromToCalculation()

static void IsUnderRoofFromToCalculation ( EntityAI entity,
out vector from,
out vector to,
float height = GameConstants.ROOF_CHECK_RAYCAST_DIST )
staticprotected

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

1057 {
1058 vector minMax[2];
1059 entity.GetCollisionBox(minMax);
1060
1061 vector size = Vector(0,0,0);
1062 //size[1] = minMax[1][1] - minMax[0][1];
1063 float from_override = entity.HeightStartCheckOverride();
1064 if (from_override > 0.0)
1065 {
1066 size[1] = from_override;
1067 }
1068 else
1069 {
1070 size[1] = minMax[1][1] - minMax[0][1];
1071 }
1072
1073 from = entity.GetPosition() + size;
1074 if ( entity.HeightCheckOverride() > 0 )
1075 {
1076 to = entity.GetPosition() + Vector(0, entity.HeightCheckOverride(), 0);
1077 }
1078 else
1079 {
1080 vector ceiling = "0 0 0";
1081 ceiling[1] = height;
1082 to = from + ceiling; //+size ??? offset to cast same distance
1083 }
1084 }
Определения EnConvert.c:119
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки Vector().

Используется в IsUnder() и IsUnderRoofEx().