COD2.asl 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. state("CoD2SP_s")
  2. {
  3. string98 CurrentLevel : 0xCFEBD0;
  4. bool Loader : 0x415010; // Originally an int
  5. }
  6. init
  7. {
  8. vars.doneMaps = new List<string>(); //Used for not splitting twice just in cause the game crashes
  9. vars.DoWeSplit = false;
  10. }
  11. startup
  12. {
  13. settings.Add("missions", true, " All Missions");
  14. vars.missions = new Dictionary<string,string>
  15. {
  16. {"demolition", "Demolition"},
  17. {"tunkhunt", "Repairing the Wire"},
  18. {"trainyard", "The Pipeline"},
  19. {"downtown_assault", "Downtown Assault"},
  20. {"cityhall", "City Hall"},
  21. {"downtown_sniper", "Comrade Sniper"},
  22. {"decoytrenches", "The Diversionary Raid"},
  23. {"decoytown", "Holding The Line"},
  24. {"elalamein", "Operation Supercharge"},
  25. {"eldaba", "The End of the Beginning"},
  26. {"libya", "Crusader Charge"},
  27. {"88ridge", "88 Ridge"},
  28. {"toujane_ride", "Outnumbered and Outgunned"},
  29. {"toujane", "Retaking Lost Ground"},
  30. {"matmata", "Assault on Matmata"},
  31. {"duhoc_assault", "The Battle of Pointe du Hoc"},
  32. {"duhoc_defend", "Defending the Pointe"},
  33. {"silotown_assault", "The Silo"},
  34. {"beltot", " Prisoners of War"},
  35. {"crossroads", "The Crossroads"},
  36. {"newvillers", "The Tiger"},
  37. {"breakout", "The Brigade Box"},
  38. {"bergstein", "Approaching Hill 400"},
  39. {"hill400_assault", "Rangers Lead the Way"},
  40. {"hill400_defend", " The Battle for Hill 400"},
  41. {"rhine", " Crossing the Rhine"},
  42. };
  43. foreach (var Tag in vars.missions)
  44. {
  45. settings.Add(Tag.Key, true, Tag.Value, "missions");
  46. };
  47. if (timer.CurrentTimingMethod == TimingMethod.RealTime) // stolen from dude simulator 3, basically asks the runner to set their livesplit to game time
  48. {
  49. var timingMessage = MessageBox.Show
  50. (
  51. "This game uses Time without Loads (Game Time) as the main timing method.\n"+
  52. "LiveSplit is currently set to show Real Time (RTA).\n"+
  53. "Would you like to set the timing method to Game Time? This will make verification easier",
  54. "LiveSplit | Call of Duty 2",
  55. MessageBoxButtons.YesNo,MessageBoxIcon.Question
  56. );
  57. if (timingMessage == DialogResult.Yes)
  58. {
  59. timer.CurrentTimingMethod = TimingMethod.GameTime;
  60. }
  61. }
  62. }
  63. update
  64. {
  65. if (((current.CurrentLevel != old.CurrentLevel) && (settings[current.CurrentLevel])) || (current.CurrentLevel == "credits"))
  66. {
  67. vars.DoWeSplit = true;
  68. }
  69. }
  70. start
  71. {
  72. return ((current.CurrentLevel == "moscow") && (old.CurrentLevel == "movie_eastern"));
  73. }
  74. onStart
  75. {
  76. vars.doneMaps.Clear();
  77. }
  78. split
  79. {
  80. if (vars.DoWeSplit)
  81. {
  82. vars.DoWeSplit = false;
  83. return true;
  84. }
  85. }
  86. reset
  87. {
  88. return (current.CurrentLevel == "movie_eastern");
  89. }
  90. onReset
  91. {
  92. vars.doneMaps.Clear();
  93. }
  94. isLoading
  95. {
  96. return (!current.Loader);
  97. }