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

◆ DrawDebugs()

void PluginBase::DrawDebugs ( )
inlineprotected

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

51 {
52 foreach (UTemperatureSourceDebug utsd : m_UTemperatureSourceDebugs)
53 {
54 float fullRange = utsd.GetValue(1).ToFloat();
55 float maxRange = utsd.GetValue(2).ToFloat();
56 float temp = utsd.GetValue(3).ToFloat();
57 vector sphPos = utsd.GetValue(0).ToVector();
58
59 int fullRangeColor = COLOR_RED_A;
60 int maxRangeColor = COLOR_YELLOW_A;
61 if (temp < 0)
62 {
63 fullRangeColor = COLOR_GREEN_A;
64 maxRangeColor = COLOR_BLUE_A;
65 }
66 else if (temp == 0)
67 {
68 fullRangeColor = 0x1fefefef;
69 maxRangeColor = 0x1fefefef;
70 }
71
72 Debug.DrawCylinder(sphPos, fullRange, fullRange, fullRangeColor, ShapeFlags.ONCE|ShapeFlags.TRANSP);
73 Debug.DrawCylinder(sphPos, maxRange, maxRange, maxRangeColor, ShapeFlags.ONCE|ShapeFlags.TRANSP);
74 Debug.DrawArrow(m_Player.GetPosition(), sphPos, 1.0, 0xffffffff, ShapeFlags.ONCE|ShapeFlags.TRANSP);
75 }
76
78
79 if (m_UTemperatureSourceDebugs.Count() > 0)
80 {
81 DbgUI.Begin("Universal Temp Sources", 10, 300);
82 DbgUI.Text(string.Format("Lookup radius: %1m (server-side)", PluginUniversalTemperatureSourceServer.LOOKUP_RADIUS));
83 DbgUI.Text(string.Format("Count: %1", m_UTemperatureSourceDebugs.Count()));
84 DbgUI.Text(string.Format("Avg. temp: %1 °C", m_UTSAverageTemperature));
85 DbgUI.End();
86 }
87 }
void Debug()
Определения UniversalTemperatureSource.c:349
void ProcessUniversalTemperatureSources()
void PluginUniversalTemperatureSourceServer()
ref array< ref UTemperatureSourceDebug > m_UTemperatureSourceDebugs
PlayerBase m_Player
Определения PluginAdminLog.c:12
float m_UTSAverageTemperature
const int COLOR_BLUE_A
Определения constants.c:71
const int COLOR_RED_A
Определения constants.c:69
const int COLOR_YELLOW_A
Определения constants.c:72
const int COLOR_GREEN_A
Определения constants.c:70
ShapeFlags
Определения EnDebug.c:126

Перекрестные ссылки DbgUI::Begin(), COLOR_BLUE_A, COLOR_GREEN_A, COLOR_RED_A, COLOR_YELLOW_A, Debug::DrawArrow(), Debug::DrawCylinder(), DbgUI::End(), m_Player, m_UTemperatureSourceDebugs, m_UTSAverageTemperature, PluginUniversalTemperatureSourceServer(), ProcessUniversalTemperatureSources() и DbgUI::Text().

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