CODBlackOps.asl 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. state("BlackOps")
  2. {
  3. string35 currentlevelName : 0x21033E8; // Doesn't work for langagues other than English (idk why)
  4. long Loader : 0x2AEA4B0; // Changed based on timing method changes by community vote
  5. }
  6. startup
  7. {
  8. settings.Add("missions", true, "All Missions"); // Decided to add this just so it's like all the other ones
  9. vars.missions = new Dictionary<string,string>
  10. {
  11. {"vorkuta", "Vorkuta"},
  12. {"pentagon", "USDD"},
  13. {"flashpoint", "Executive Order"},
  14. {"khe_sanh", "SOG"},
  15. {"hue_city", "The Defector"},
  16. {"kowloon", "Numbers"},
  17. {"fullahead", "Project Nova"},
  18. {"creek_1", "Victor Charlie"},
  19. {"river", "Crash Site"},
  20. {"wmd_sr71", "WMD"},
  21. {"pow", "Payback"},
  22. {"rebirth", "Rebirth"},
  23. {"int_escape", "Revelations"},
  24. {"underwaterbase", "Redemption"},
  25. {"outro", "Menu Screen"},
  26. };
  27. foreach (var Tag in vars.missions)
  28. {
  29. settings.Add(Tag.Key, true, Tag.Value, "missions");
  30. };
  31. if (timer.CurrentTimingMethod == TimingMethod.RealTime)
  32. {
  33. var timingMessage = MessageBox.Show
  34. (
  35. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  36. "LiveSplit is currently set to show Real Time (RTA).\n"+
  37. "Would you like to set the timing method to Game Time? This will make verification easier",
  38. "LiveSplit | Call of Duty: Black Ops",
  39. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  40. );
  41. if (timingMessage == DialogResult.Yes)
  42. {
  43. timer.CurrentTimingMethod = TimingMethod.GameTime;
  44. }
  45. }
  46. }
  47. init
  48. {
  49. vars.currentTime = new TimeSpan(0, 0, 0); //TimeSpan object used to add a timer offset on entering USDD
  50. vars.USDDtime = false;
  51. }
  52. update
  53. {
  54. vars.currentTime = timer.CurrentTime.GameTime; //keep the variable updated with the current time on the timer
  55. }
  56. start
  57. {
  58. return ((current.currentlevelName == "cuba") && (current.Loader != 0));
  59. }
  60. onStart
  61. {
  62. vars.USDDtime = false;
  63. }
  64. isLoading
  65. {
  66. return (current.Loader == 0) ||
  67. (current.currentlevelName == "pentagon") || // Adding this because of the new timing method changed based on community vote
  68. (current.currentlevelName == "frontend"); // Adding this just in case it because of the fact that sometimes frontend leaks during the crashed helicopter scenes (thanks 3arc)
  69. }
  70. reset
  71. {
  72. return ((current.currentlevelName == "frontend") && (old.currentlevelName != "pentagon")); // Adding the old.map thing just because of new timing rules, prolly runners don't want to reset when leaving USDD
  73. }
  74. split
  75. {
  76. if ((settings[current.currentlevelName]) && (current.currentlevelName != old.currentlevelName)) // If setting is true, and on a different map
  77. {
  78. if (current.currentlevelName == "pentagon") // if were on USDD
  79. {
  80. vars.USDDtime = true; // adds game time of 4:55
  81. return true;
  82. }
  83. else // if not on USDD split
  84. {
  85. return true;
  86. }
  87. }
  88. }
  89. gameTime
  90. {
  91. if (vars.USDDtime == true)
  92. {
  93. vars.USDDtime = false;
  94. return vars.currentTime.Add(new TimeSpan (0, 4, 55)); //Time taken from the mean of most of the submitted any% runs
  95. }
  96. }