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

◆ DisplayDebug()

void BleedingSourcesManagerBase::DisplayDebug ( )
inlineprotected

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

159 {
160 m_ShowingDiag = true;
161 DbgUI.BeginCleanupScope();
162 DbgUI.Begin("Bleeding Sources", 50, 50);
163
164 int pow = 0;
165 bool anyBleedingSourceActive = false;
166
167 for (int i = 0; i < BIT_INT_SIZE ; ++i)
168 {
169 int bit = Math.Pow(2, pow);
170 pow++;
171 if ((m_BleedingBits & bit) != 0)
172 {
173 BleedingSourceZone bsz = GetBleedingSourceMeta(bit);
174 string name = GetSelectionNameFromBit(bit);
175 string slot_name = InventorySlots.GetSlotName(bsz.GetInvLocation());
176 float timeRemaining = -1;
177
178 #ifdef DIAG_DEVELOPER
179 BleedingSource bsi = m_BleedingSources.Get(bit);
180 timeRemaining = bsz.GetMaxTime() + bsi.m_DiagTimeStart - GetGame().GetTickTime();
181 timeRemaining = Math.Round(timeRemaining);
182 #endif
183
184 DbgUI.Text(string.Format("zone: %1 | closest inv. slot: %2 | time remaining: %3", name, slot_name, timeRemaining.ToString()));
185 anyBleedingSourceActive = true;
186 }
187 }
188
189 if (!anyBleedingSourceActive)
190 {
191 DbgUI.Text("No bleeding sources are active.");
192 }
193 else
194 {
195 DbgUI.Text("");
196 DbgUI.Text("Note: BleedingSourcesManagerServer only updates active sources every 3s, displayed times are client estimates.");
197 }
198
199 DbgUI.End();
200 DbgUI.EndCleanupScope();
201 }
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
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 native float GetTickTime()
Returns current time from start of the game.
proto string ToString(bool simple=true)
proto native CGame GetGame()

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

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