3 const float MAX_TIME_ACTIVE_SAVEGUARD = 20;
5 SoundOnVehicle m_SoundObject;
9 float m_ServerUpdateInterval = 1;
10 float m_ServerUpdateDelta;
11 bool m_IsTemplate =
true;
12 float m_ActivatedTime;
16 bool m_DestroyOnAnimFinish =
true;
17 bool m_DestroyRequested =
false;
18 int m_SymptomType = -1;
19 bool m_IsPersistent =
false;
21 bool m_SyncToClient =
false;
23 bool m_AnimPlayRequested;
26 SymptomCB m_AnimCallback;
64 bool CanBeInterupted()
66 if (m_AnimPlayRequested)
76 return m_IsClientOnly;
80 void SetDuration(
float duration)
92 return this.ClassName();
105 void SetParam(
Param p)
110 bool IsSyncToClient()
112 return m_SyncToClient;
116 bool IsSyncToRemotes()
123 for (
int i = 0; i < m_PersistentParams.Count(); i++)
125 params.Insert(m_PersistentParams.Get(i));
129 void MakeParamObjectPersistent(
Param object)
131 if ( !
GetGame().IsServer() && !
GetGame().IsMultiplayer() )
return;
133 m_PersistentParams.Insert(
object);
149 bool AllowInUnconscious()
171 if ( IsActivated() ) Deactivate();
172 if ( GetManager() )
m_Manager.OnSymptomExit(
this, m_UID);
177 m_IsActivated =
true;
181 if (
GetGame().IsMultiplayer() )
183 if ( IsSyncToClient() )
184 SyncToClientActivated( GetType(), GetUID() );
185 #ifdef DIAG_DEVELOPER
186 GetManager().SendServerDebugToClient();
190 if ( !
GetGame().IsDedicatedServer() )
199 m_IsActivated =
false;
203 if (
GetGame().IsMultiplayer() && IsSyncToClient() )
205 SyncToClientDeactivated( GetType(), GetUID() );
208 if ( !
GetGame().IsDedicatedServer() )
217 return m_IsActivated;
222 void Update(
float deltatime)
226 m_ServerUpdateDelta += deltatime;
227 if (m_ServerUpdateDelta > m_ServerUpdateInterval )
231 m_ServerUpdateDelta = 0;
245 void PlayAnimationFB(
int animation,
int stance_mask,
float running_time = -1)
248 m_AnimPlayRequested =
true;
251 void PlayAnimationADD(
int type)
254 m_AnimPlayRequested =
true;
259 GetPlayer().RequestSoundEvent(
id);
260 m_PlayedSound =
true;
263 void SyncToClientActivated(
int SYMPTOM_id,
int uid )
265 if ( !GetPlayer() )
return;
272 void SyncToClientDeactivated(
int SYMPTOM_id,
int uid )
274 if ( !GetPlayer() )
return;
280 void CheckSoundFinished()
291 CheckSoundFinished();
307 void RequestDestroy()
320 void AnimationFinish()
323 if ( m_DestroyOnAnimFinish ) RequestDestroy();
327 void AnimationPlayFailed()
333 void AnimationStart()