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

◆ ReadVarsFromCTX()

override bool ReadVarsFromCTX ( ParamsReadContext ctx,
int version = -1 )
protected

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

2999 {
3000 if (!super.ReadVarsFromCTX(ctx,version))
3001 return false;
3002
3003 int intValue;
3004 float value;
3005
3006 if (version < 140)
3007 {
3008 if (!ctx.Read(intValue))
3009 return false;
3010
3011 m_VariablesMask = intValue;
3012 }
3013
3014 if (m_VariablesMask & VARIABLE_QUANTITY)
3015 {
3016 if (!ctx.Read(value))
3017 return false;
3018
3019 if (IsStoreLoad())
3020 {
3022 }
3023 else
3024 {
3025 SetQuantity(value, true, false, false, false);
3026 }
3027 }
3028 //--------------------------------------------
3029 if (version < 140)
3030 {
3031 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3032 {
3033 if (!ctx.Read(value))
3034 return false;
3035 SetTemperatureDirect(value);
3036 }
3037 }
3038 //--------------------------------------------
3039 if (m_VariablesMask & VARIABLE_WET)
3040 {
3041 if (!ctx.Read(value))
3042 return false;
3043 SetWet(value);
3044 }
3045 //--------------------------------------------
3046 if (m_VariablesMask & VARIABLE_LIQUIDTYPE)
3047 {
3048 if (!ctx.Read(intValue))
3049 return false;
3050 SetLiquidType(intValue);
3051 }
3052 //--------------------------------------------
3053 if (m_VariablesMask & VARIABLE_COLOR)
3054 {
3055 int r,g,b,a;
3056 if (!ctx.Read(r))
3057 return false;
3058 if (!ctx.Read(g))
3059 return false;
3060 if (!ctx.Read(b))
3061 return false;
3062 if (!ctx.Read(a))
3063 return false;
3064
3065 SetColor(r,g,b,a);
3066 }
3067 //--------------------------------------------
3068 if (m_VariablesMask & VARIABLE_CLEANNESS)
3069 {
3070 if (!ctx.Read(intValue))
3071 return false;
3072 SetCleanness(intValue);
3073 }
3074 //--------------------------------------------
3075 if (version >= 138 && version < 140)
3076 {
3077 if (m_VariablesMask & VARIABLE_TEMPERATURE)
3078 {
3079 if (!ctx.Read(intValue))
3080 return false;
3081 SetFrozen(intValue);
3082 }
3083 }
3084
3085 return true;
3086 }
override void SetQuantity()
Определения ConstructionInfoIcons.c:298
override void SetStoreLoadedQuantity(float value)
Определения ItemBase.c:3769
override void SetCleanness(int value, bool allow_client=false)
Определения ItemBase.c:3791
override void SetColor(int r, int g, int b, int a)
Определения ItemBase.c:3831
override bool IsStoreLoad()
Определения ItemBase.c:3764
override void SetWet(float value, bool allow_client=false)
Определения ItemBase.c:3688
override void SetLiquidType(int value, bool allow_client=false)
Определения ItemBase.c:3867
proto bool Read(void value_in)
const int VARIABLE_LIQUIDTYPE
Определения 3_Game/DayZ/constants.c:669
const int VARIABLE_CLEANNESS
Определения 3_Game/DayZ/constants.c:672
const int VARIABLE_COLOR
Определения 3_Game/DayZ/constants.c:671
const int VARIABLE_TEMPERATURE
Определения 3_Game/DayZ/constants.c:667
const int VARIABLE_QUANTITY
Определения 3_Game/DayZ/constants.c:665
const int VARIABLE_WET
Определения 3_Game/DayZ/constants.c:668

Перекрестные ссылки IsStoreLoad(), Serializer::Read(), SetCleanness(), SetColor(), SetLiquidType(), SetQuantity(), SetStoreLoadedQuantity(), SetWet(), VARIABLE_CLEANNESS, VARIABLE_COLOR, VARIABLE_LIQUIDTYPE, VARIABLE_QUANTITY, VARIABLE_TEMPERATURE и VARIABLE_WET.

Используется в Entity::LoadVariables() и OnSyncVariables().