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

◆ DrawLineOfFire()

void WeaponDebug::DrawLineOfFire ( vector begin_point,
vector end_point )
inlineprivate

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

217 {
218 vector contact_point;
219 vector contact_dir;
220 vector aim_point = end_point - begin_point;
221 int contact_component;
222
223 aim_point = aim_point.Normalized() * 100;
224 aim_point = aim_point + end_point;
225
226 m_ShapeFireDirection1 = Debug.DrawLine(end_point, aim_point);
227 m_ShapeFireDirection2 = Debug.DrawLine(begin_point, end_point, ShapeFlags.NOZBUFFER );
228
229 if ( DayZPhysics.RaycastRV(end_point, aim_point, contact_point, contact_dir, contact_component, null, null, null, false, false, ObjIntersectFire) )
230 {
231 m_HitShape = Debug.DrawSphere(contact_point, 0.04, COLOR_RED);
232 }
233
234 if ( m_IsFireKeyPressed )
235 {
236 Debug.RemoveShape(m_PermanentLine1);
237 m_PermanentLine1 = Debug.DrawLine(end_point, contact_point, Colors.RED, ShapeFlags.NOZBUFFER );
238 }
239 }
void Debug()
Определения UniversalTemperatureSource.c:349
bool m_IsFireKeyPressed
Определения WeaponDebug.c:24
Shape m_PermanentLine1
Определения WeaponDebug.c:46
Shape m_ShapeFireDirection2
Определения WeaponDebug.c:37
Shape m_ShapeFireDirection1
Определения WeaponDebug.c:36
Shape m_HitShape
Определения WeaponDebug.c:38
proto vector Normalized()
return normalized vector (keeps orginal vector untouched)
@ Colors
Определения EnWorld.c:88
const int COLOR_RED
Определения constants.c:64
ShapeFlags
Определения EnDebug.c:126

Перекрестные ссылки COLOR_RED, Debug::DrawLine(), Debug::DrawSphere(), m_HitShape, m_IsFireKeyPressed, m_PermanentLine1, m_ShapeFireDirection1, m_ShapeFireDirection2, vector::Normalized(), DayZPhysics::RaycastRV(), Colors::RED и Debug::RemoveShape().

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