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

◆ PerformRoofCheckForBase()

override bool BaseBuildingBase::PerformRoofCheckForBase ( string partName,
PlayerBase player,
out bool result )
inlineprivate

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

139 {
140 if (CfgGameplayHandler.GetDisablePerformRoofCheck())
141 return false;
142
143 if (partName != "level_1_base" && partName != "level_2_base" && partName != "level_3_base" && partName != "level_3_roof")
144 {
145 return false;
146 }
147
148 vector center;
149 vector orientation = GetOrientation();
150 vector edge_length;
151 vector min_max[2];
152 ref array<Object> excluded_objects = new array<Object>;
153 ref array<Object> collided_objects = new array<Object>;
154
155 excluded_objects.Insert( this );
156 excluded_objects.Insert( player );
157
158 if ( partName == "level_2_base" )
159 {
160 min_max[0] = GetMemoryPointPos( "level_2_wall_1_down_min" );
161 min_max[1] = GetMemoryPointPos( "level_2_roof_max" );
162 }
163 else if ( partName == "level_3_base" )
164 {
165 min_max[0] = GetMemoryPointPos( "level_3_wall_1_down_min" );
166 min_max[1] = GetMemoryPointPos( "level_3_wall_2_up_max" );
167 }
168 else if ( partName == "level_3_roof" )
169 {
170 min_max[0] = GetMemoryPointPos( "level_3_roof_min" );
171 min_max[1] = GetMemoryPointPos( "level_3_roof_max" );
172 }
173 else
174 {
175 //min_max[0] = GetMemoryPointPos( "level_1_wall_1_up_min" );
176 //min_max[0] = GetMemoryPointPos( "level_1_wall_1_down_min" );
177 min_max[0] = GetMemoryPointPos( "level_1_collisioncheck_min" );
178 min_max[1] = GetMemoryPointPos( "level_1_roof_max" );
179 }
180 center = GetPosition();
181 center[1] = center[1] + ( min_max[1][1] + min_max[0][1] ) / 2;
182
183 edge_length[0] = min_max[1][0] - min_max[0][0];
184 edge_length[2] = min_max[1][2] - min_max[0][2];
185 edge_length[1] = min_max[1][1] - min_max[0][1];
186
187 result = false;
188 /*result = */g_Game.IsBoxCollidingGeometry( center, orientation, edge_length, ObjIntersectView, ObjIntersectGeom, excluded_objects, collided_objects );
189 if ( collided_objects.Count() > 0 )
190 {
191 foreach ( Object o : collided_objects )
192 {
193 if (Building.Cast(o))
194 {
195 result = true;
196 }
197 }
198 }
199 return true;
200 }
vector GetOrientation()
Определения AreaDamageManager.c:306
DayZGame g_Game
Определения DayZGame.c:4074
vector orientation
Определения DustKickupEffects.c:21
class LOD Object
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473

Перекрестные ссылки g_Game, CfgGameplayHandler::GetDisablePerformRoofCheck(), GetOrientation(), GetPosition() и orientation.

Используется в ComplexBuildCollideCheckClient() и ActionConstructionPartInfoContinuous::SimplifiedCollisionInfoCheck().