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

◆ OnVariablesSynchronized()

void Entity::OnVariablesSynchronized ( )
inlineprotected

Called on clients after receiving synchronization data from server.

См. определение в файле 3_Game/DayZ/Entities/EntityAI.c строка 3069

3070 {
3071 if ( m_EM )
3072 {
3073 if ( g_Game.IsMultiplayer() )
3074 {
3075 bool is_on = m_EM.IsSwitchedOn();
3076
3077 if (is_on != m_EM.GetPreviousSwitchState())
3078 {
3079 if (is_on)
3080 m_EM.SwitchOn();
3081 else
3082 m_EM.SwitchOff();
3083 }
3084
3085 int id_low = m_EM.GetEnergySourceNetworkIDLow();
3086 int id_High = m_EM.GetEnergySourceNetworkIDHigh();
3087
3088 EntityAI energy_source = EntityAI.Cast( g_Game.GetObjectByNetworkId(id_low, id_High) );
3089
3090 if (energy_source)
3091 {
3092 ComponentEnergyManager esem = energy_source.GetCompEM();
3093
3094 if ( !esem )
3095 {
3096 string object = energy_source.GetType();
3097 Error("Synchronization error! Object " + object + " has no instance of the Energy Manager component!");
3098 }
3099
3100 m_EM.PlugThisInto(energy_source);
3101
3102 }
3103 else
3104 {
3105 m_EM.UnplugThis();
3106 }
3107
3108 m_EM.DeviceUpdate();
3109 m_EM.StartUpdates();
3110 }
3111 }
3112
3113 if (m_IsFrozen != m_IsFrozenLocal && !g_Game.IsDedicatedServer())
3114 {
3117 }
3118
3119 ConstructionBasic constructionComponent = GetConstructionBasic();
3120 if (constructionComponent)
3121 constructionComponent.OnConstructionVariablesSynchronized();
3122 }
DayZGame g_Game
Определения DayZGame.c:4074
void OnConstructionVariablesSynchronized()
bool m_IsFrozen
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
ComponentEnergyManager m_EM
bool m_IsFrozenLocal
void OnFreezeStateChangeClient()
ConstructionBasic GetConstructionBasic()
Construction itself is defined on module 4. Workaround. Don't forget to cast!
void Error(string err)
Messagebox with error message.
Определения EnDebug.c:90

Перекрестные ссылки EntityAI(), Error(), g_Game, GetConstructionBasic(), m_EM, m_IsFrozen, m_IsFrozenLocal, ConstructionBasic::OnConstructionVariablesSynchronized() и OnFreezeStateChangeClient().