Called on clients after receiving synchronization data from server.
3070 {
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)
3081 else
3083 }
3084
3085 int id_low =
m_EM.GetEnergySourceNetworkIDLow();
3086 int id_High =
m_EM.GetEnergySourceNetworkIDHigh();
3087
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 {
3106 }
3107
3108 m_EM.DeviceUpdate();
3109 m_EM.StartUpdates();
3110 }
3111 }
3112
3114 {
3117 }
3118
3120 if (constructionComponent)
3122 }
void OnConstructionVariablesSynchronized()
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
ComponentEnergyManager m_EM
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.