/
SN1054NGC
/
DayZ_Projects_cpp
Обзор
Документация
Войти
/
SN1054NGC
/
DayZ_Projects_cpp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
scripts/3_game/persistentflag.c
12 строк
590 B
SN1054NGC
Initial DayZ mod project commit
26 ноя 2025, 01:03
26 ноя 2025, 01:03
fddb039
Код
Авторство
О чём код?
// These are flags which are persistent for the player entity, ie. are saved when the player is disconnected and loaded after connection. // Normal persistence events OnStoreSave/OnStoreLoad are used to save/load these flags within a single int, the purpose is to unify the getter/setter interface so that every system that needs a bool does not need to create its own handling methods/logic. // !!! Every value needs to be a power of 2 !!! enum PersistentFlag { AREA_PRESENCE = 1, //ADDITIONAL_FLAG_1 = 2, //ADDITIONAL_FLAG_2 = 4, //ADDITIONAL_FLAG_3 = 8, //ADDITIONAL_FLAG_4 = 16, }