blindnessstate.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class BlindnessSymptom extends SymptomBase
  2. {
  3. Material m_MatGauss;
  4. const int BLUR_DURATION = 3000;
  5. ref Param1<vector> m_Position = new Param1<vector>("0 0 0");
  6. //this is just for the Symptom parameters set-up and is called even if the Symptom doesn't execute, don't put any gameplay code in here
  7. override void OnInit()
  8. {
  9. m_SymptomType = SymptomTypes.SECONDARY;
  10. m_Priority = 0;
  11. m_ID = SymptomIDs.SYMPTOM_BLINDNESS;
  12. m_DestroyOnAnimFinish = true;
  13. m_IsPersistent = false;
  14. MakeParamObjectPersistent(m_Position);
  15. }
  16. //!gets called every frame
  17. override void OnUpdateServer(PlayerBase player, float deltatime)
  18. {
  19. }
  20. override void OnUpdateClient(PlayerBase player, float deltatime)
  21. {
  22. }
  23. //!gets called once on an Symptom which is being activated
  24. override void OnGetActivatedServer(PlayerBase player)
  25. {
  26. if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
  27. }
  28. override void OnGetActivatedClient(PlayerBase player)
  29. {
  30. if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetActivated", m_Player.ToString());
  31. }
  32. override void OnGetDeactivatedServer(PlayerBase player)
  33. {
  34. if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
  35. }
  36. //!only gets called once on an active Symptom that is being deactivated
  37. override void OnGetDeactivatedClient(PlayerBase player)
  38. {
  39. if (LogManager.IsSymptomLogEnable()) Debug.SymptomLog("n/a", this.ToString(), "n/a", "OnGetDeactivated", m_Player.ToString());
  40. PPERequesterBank.GetRequester(PPERequester_BurlapSackEffects).Stop(); //TODO - use different PPERequester when connected, otherwise it would interfere with burlapsack blindness
  41. }
  42. }