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

◆ DisplayDebug()

void BleedingSourcesManagerBase::DisplayDebug ( )
inlineprotected

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

160 {
161 m_ShowingDiag = true;
162 DbgUI.BeginCleanupScope();
163 DbgUI.Begin("Bleeding Sources", 50, 50);
164
165 int pow = 0;
166 bool anyBleedingSourceActive = false;
167
168 for (int i = 0; i < BIT_INT_SIZE ; ++i)
169 {
170 int bit = Math.Pow(2, pow);
171 pow++;
172 if ((m_BleedingBits & bit) != 0)
173 {
174 BleedingSourceZone bsz = GetBleedingSourceMeta(bit);
175 string name = GetSelectionNameFromBit(bit);
176 string slot_name = InventorySlots.GetSlotName(bsz.GetInvLocation());
177 float timeRemaining = -1;
178
179 #ifdef DIAG_DEVELOPER
180 BleedingSource bsi = m_BleedingSources.Get(bit);
181 timeRemaining = bsz.GetMaxTime() + bsi.m_DiagTimeStart - g_Game.GetTickTime();
182 timeRemaining = Math.Round(timeRemaining);
183 #endif
184
185 DbgUI.Text(string.Format("zone: %1 | closest inv. slot: %2 | time remaining: %3", name, slot_name, timeRemaining.ToString()));
186 anyBleedingSourceActive = true;
187 }
188 }
189
190 if (!anyBleedingSourceActive)
191 {
192 DbgUI.Text("No bleeding sources are active.");
193 }
194 else
195 {
196 DbgUI.Text("");
197 DbgUI.Text("Note: BleedingSourcesManagerServer only updates active sources every 3s, displayed times are client estimates.");
198 }
199
200 DbgUI.End();
201 DbgUI.EndCleanupScope();
202 }
void BleedingSource(PlayerBase player, int bit, string bone, vector orientation, vector offset, int max_time, float flow_modifier, string particle_name)
const int BIT_INT_SIZE
Определения BitArray.c:4
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
DayZGame g_Game
Определения DayZGame.c:3942
int GetInvLocation()
Определения BleedingSourceZone.c:31
int GetMaxTime()
Определения BleedingSourceZone.c:46
BleedingSourceZone GetBleedingSourceMeta(int bit)
Определения BleedingSourcesManagerBase.c:127
string GetSelectionNameFromBit(int bit)
Определения BleedingSourcesManagerBase.c:189
ref map< int, ref BleedingSource > m_BleedingSources
Определения BleedingSourcesManagerBase.c:3
proto string ToString(bool simple=true)

Перекрестные ссылки DbgUI::Begin(), DbgUI::BeginCleanupScope(), BIT_INT_SIZE, BleedingSource(), DbgUI::End(), DbgUI::EndCleanupScope(), g_Game, GetBleedingSourceMeta(), BleedingSourceZone::GetInvLocation(), BleedingSourceZone::GetMaxTime(), GetSelectionNameFromBit(), InventorySlots::GetSlotName(), m_BleedingBits, m_BleedingSources, m_ShowingDiag, name, Math::Pow(), Math::Round(), DbgUI::Text() и float::ToString().

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