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

◆ OnStoreLoad()

bool BleedingSourcesManagerBase::OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected

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

256 {
257 int active_bits;
258 if (!ctx.Read(active_bits))
259 {
260 return false;
261 }
262
263 int bit_offset = 0;
264 for (int i = 0; i < BIT_INT_SIZE; ++i)
265 {
266 int bit = 1 << bit_offset;
267 if ((bit & active_bits) != 0 && CanAddBleedingSource(bit))
268 {
270 int active_time = 0;
271 if (!ctx.Read(active_time))
272 {
273 return false;
274 }
275 else
276 {
277 SetBleedingSourceActiveTime(bit,active_time);
278 }
279 if (version >= 121)//type was added in this version
280 {
282 if (!ctx.Read(type))
283 {
284 return false;
285 }
286 else
287 {
288 SetBleedingSourceType(bit,type);
289 }
290 }
291 }
292 bit_offset++;
293 }
294 return true;
295 }
const int BIT_INT_SIZE
Определения BitArray.c:4
void AddBleedingSource(int bit)
Определения BleedingSourcesManagerBase.c:260
void SetBleedingSourceActiveTime(int bit, int time)
Определения BleedingSourcesManagerBase.c:284
bool CanAddBleedingSource(int bit)
Определения BleedingSourcesManagerBase.c:241
void SetBleedingSourceType(int bit, eBleedingSourceType type)
Определения BleedingSourcesManagerBase.c:292
proto bool Read(void value_in)

Перекрестные ссылки AddBleedingSource(), BIT_INT_SIZE, CanAddBleedingSource(), Serializer::Read(), SetBleedingSourceActiveTime() и SetBleedingSourceType().