Called on clients after receiving synchronization data from server.
3075 {
3077 {
3078 if (
g_Game.IsMultiplayer() )
3079 {
3080 bool is_on =
m_EM.IsSwitchedOn();
3081
3082 if (is_on !=
m_EM.GetPreviousSwitchState())
3083 {
3084 if (is_on)
3086 else
3088 }
3089
3090 int id_low =
m_EM.GetEnergySourceNetworkIDLow();
3091 int id_High =
m_EM.GetEnergySourceNetworkIDHigh();
3092
3094
3095 if (energy_source)
3096 {
3097 ComponentEnergyManager esem = energy_source.GetCompEM();
3098
3099 if ( !esem )
3100 {
3101 string object = energy_source.GetType();
3102 Error(
"Synchronization error! Object " +
object +
" has no instance of the Energy Manager component!");
3103 }
3104
3105 m_EM.PlugThisInto(energy_source);
3106
3107 }
3108 else
3109 {
3111 }
3112
3113 m_EM.DeviceUpdate();
3114 m_EM.StartUpdates();
3115 }
3116 }
3117
3119 {
3122 }
3123 }
void EntityAI()
cache blood infection chance (cfgVehicles-><entity>->Skinning->BloodInfectionSettings)
ComponentEnergyManager m_EM
void OnFreezeStateChangeClient()
void Error(string err)
Messagebox with error message.