Advertisement
djhonga2001

Untitled

Jan 27th, 2017
1,091
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 284.57 KB | None | 0 0
  1. using GTA;
  2. using GTA.Math;
  3. using GTA.Native;
  4. using Microsoft.VisualBasic;
  5. using Microsoft.VisualBasic.CompilerServices;
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Drawing;
  9. using System.IO;
  10. using System.Runtime.InteropServices;
  11. using System.Windows.Forms;
  12.  
  13. public class JC2 : Script
  14. {
  15. private static List<Prop> \u00358AA0 = new List<Prop>();
  16. private static List<JC2.TGasObjects> \u00368AAA = new List<JC2.TGasObjects>();
  17. private static List<JC2.TEntityInRope> \u0035BAA0 = new List<JC2.TEntityInRope>();
  18. private static Model CBAA0 = (Model) null;
  19. private static List<JC2.ᙃ> BFAAA = new List<JC2.ᙃ>();
  20. private static Prop \u0036GAAA = (Prop) null;
  21. private static List<JC2.ᙄ> \u0038GAAA = new List<JC2.ᙄ>();
  22. private static List<JC2.ᙅ> CA0A0 = new List<JC2.ᙅ>();
  23. private string \u00385AAA;
  24. private string \u00395AA0;
  25. private string B5AAA;
  26. private string C5AA0;
  27. private static Random \u00306AAA;
  28. private CustomIniFile \u00316AA0;
  29. private CustomIniFile \u00326AAA;
  30. private DateTime \u00336AA0;
  31. private bool \u00346AAA;
  32. private TMenu \u00356AA0;
  33. private Keys \u00366AAA;
  34. private Keys \u00376AA0;
  35. private Keys \u00386AAA;
  36. private Keys \u00396AA0;
  37. private Keys B6AAA;
  38. private bool C6AA0;
  39. private bool \u00307AAA;
  40. private static Model \u00317AA0;
  41. private Model \u00327AAA;
  42. private Model \u00337AA0;
  43. private List<Prop> \u00347AAA;
  44. private DateTime \u00357AA0;
  45. private string \u00367AAA;
  46. private string \u00377AA0;
  47. private string \u00387AAA;
  48. private string \u00397AA0;
  49. private string B7AAA;
  50. private string C7AA0;
  51. private string \u00308AAA;
  52. private string \u00318AA0;
  53. private string \u00328AAA;
  54. private string \u00338AA0;
  55. private bool \u00348AAA;
  56. private Vehicle \u00378AA0;
  57. private DateTime \u00388AAA;
  58. private string \u00398AA0;
  59. private string B8AAA;
  60. private string C8AA0;
  61. private string \u00309AAA;
  62. private string \u00319AA0;
  63. private string \u00329AAA;
  64. private string \u00339AA0;
  65. private string \u00349AAA;
  66. private bool \u00359AA0;
  67. private Keys \u00369AAA;
  68. private object \u00379AA0;
  69. private double \u00389AAA;
  70. private Entity \u00399AA0;
  71. private Vector3 B9AAA;
  72. private Entity C9AA0;
  73. private Vector3 \u0030BAAA;
  74. private Vector3 \u0031BAA0;
  75. private DateTime \u0032BAAA;
  76. private Vector3 C3AA0;
  77. private Entity \u0034BAAA;
  78. private List<Entity> \u0036BAAA;
  79. private DateTime \u0037BAA0;
  80. private DateTime \u0038BAAA;
  81. private List<Entity> \u0039BAA0;
  82. private Prop BBAAA;
  83. private string \u0030CAAA;
  84. private bool \u0031CAA0;
  85. private Rope \u0032CAAA;
  86. private bool \u0033CAA0;
  87. private bool \u0034CAAA;
  88. private Vector3 \u0035CAA0;
  89. private Entity \u0036CAAA;
  90. private double \u0037CAA0;
  91. private THelper.TAnimDict \u0038CAAA;
  92. private THelper.TAnimDict \u0039CAA0;
  93. private string BCAAA;
  94. private string CCAA0;
  95. private double \u0030DAAA;
  96. private bool \u0031DAA0;
  97. private DateTime \u0032DAAA;
  98. private bool \u0033DAA0;
  99. private double \u0034DAAA;
  100. private bool \u0035DAA0;
  101. private bool \u0036DAAA;
  102. private int \u0037DAA0;
  103. private Entity \u0038DAAA;
  104. private Vector3 \u0039DAA0;
  105. private double BDAAA;
  106. private double CDAA0;
  107. private int \u0030EAAA;
  108. private Prop \u0031EAA0;
  109. private bool \u0032EAAA;
  110. private List<Entity> \u0033EAA0;
  111. private DateTime \u0034EAAA;
  112. private List<Entity> \u0035EAA0;
  113. private Entity \u0036EAAA;
  114. private Model \u0037EAA0;
  115. private bool \u0038EAAA;
  116. private double \u0039EAA0;
  117. private Vector3 BEAAA;
  118. private int CEAA0;
  119. private DateTime \u0030FAAA;
  120. private bool \u0031FAA0;
  121. private Vector3 \u0032FAAA;
  122. private bool \u0033FAA0;
  123. private static Model \u0034FAAA;
  124. private static Model \u0035FAA0;
  125. private static int \u0036FAAA;
  126. private static int \u0037FAA0;
  127. private static Vector3 \u0038FAAA;
  128. private bool \u0039FAA0;
  129. private Prop CFAA0;
  130. private List<Prop> \u0030GAAA;
  131. private Vector3 \u0031GAA0;
  132. private Vector3 \u0032GAAA;
  133. private Vector3 \u0033GAA0;
  134. private Vehicle \u0034GAAA;
  135. private bool \u0035GAA0;
  136. private static THelper.TAnimDict \u0037GAA0;
  137. private bool \u0039GAA0;
  138. private THelper.TAnimDict BGAAA;
  139. private THelper.TAnimDict CGAA0;
  140. private THelper.TAnimDict \u0030HAAA;
  141. private short \u0031HAA0;
  142. private string \u0032HAAA;
  143. private string \u0033HAA0;
  144. private int \u0034HAAA;
  145. private double \u0035HAA0;
  146. private Vector3 \u0036HAAA;
  147. private Vector3 \u0037HAA0;
  148. private double \u0038HAAA;
  149. private Model \u0039HAA0;
  150. private Prop BHAAA;
  151. private Vector3 CHAA0;
  152. private Vector3 \u0030A0AA;
  153. private DateTime \u0031A0A0;
  154. private double \u0032A0AA;
  155. private double \u0033A0A0;
  156. private double \u0034A0AA;
  157. private Vector3 \u0035A0A0;
  158. private Camera \u0036A0AA;
  159. private Vector3 \u0037A0A0;
  160. private bool \u0038A0AA;
  161. private bool \u0039A0A0;
  162. private DateTime BA0AA;
  163.  
  164. public JC2()
  165. {
  166. base.\u002Ector();
  167. this.add_KeyDown(new KeyEventHandler(this.\u00310AA0));
  168. this.add_KeyUp(new KeyEventHandler(this.\u00330AA0));
  169. this.add_Tick(new EventHandler(this.\u00322AAA));
  170. this.\u00385AAA = "Just Cause 3 mod v1.2 by JulioNIB";
  171. this.\u00395AA0 = "jc3";
  172. this.B5AAA = "xxxxxxxxxx";
  173. this.C5AA0 = "";
  174. this.\u00346AAA = false;
  175. this.\u00366AAA = Keys.Space;
  176. this.\u00376AA0 = Keys.Z;
  177. this.\u00386AAA = Keys.H;
  178. this.\u00396AA0 = Keys.N;
  179. this.B6AAA = Keys.LControlKey;
  180. this.C6AA0 = true;
  181. this.\u00307AAA = true;
  182. this.\u00347AAA = new List<Prop>();
  183. this.\u00357AA0 = DateAndTime.Now;
  184. this.\u00367AAA = "misstrevor2ig_9a";
  185. this.\u00377AA0 = "get_on_plane_ped";
  186. this.\u00387AAA = "oddjobs@bailbond_mountain";
  187. this.\u00397AA0 = "base_jump_spot";
  188. this.B7AAA = "misstrevor3";
  189. this.C7AA0 = "biker_exit_2";
  190. this.\u00308AAA = "rcmnigel3_trunk";
  191. this.\u00318AA0 = "out_trunk_trevor";
  192. this.\u00328AAA = "missfinale_b_ig_5";
  193. this.\u00338AA0 = "hold_michael_loop_mic";
  194. this.\u00348AAA = false;
  195. this.\u00378AA0 = (Vehicle) null;
  196. this.\u00388AAA = DateAndTime.Now;
  197. this.\u00398AA0 = "veh@boat@jetski@front@ds";
  198. this.B8AAA = "dead_fall_out";
  199. this.C8AA0 = "missfinale_b_ig_5";
  200. this.\u00309AAA = "hold_michael_headbut_mic";
  201. this.\u00319AA0 = "veh@truck@mixer@ds@enter_exit";
  202. this.\u00329AAA = "jack_dead_perp";
  203. this.\u00339AA0 = "veh@plane@shamal@front@ps@enter_exit";
  204. this.\u00349AAA = "jack_dead_perp";
  205. this.\u00359AA0 = false;
  206. this.\u00369AAA = Keys.E;
  207. this.\u00379AA0 = (object) false;
  208. this.\u00389AAA = 0.0;
  209. this.\u00399AA0 = (Entity) null;
  210. this.C9AA0 = (Entity) null;
  211. this.\u0032BAAA = DateAndTime.Now;
  212. this.\u0034BAAA = (Entity) null;
  213. this.\u0036BAAA = new List<Entity>();
  214. this.\u0037BAA0 = DateAndTime.Now;
  215. this.\u0038BAAA = DateAndTime.Now;
  216. this.\u0039BAA0 = new List<Entity>();
  217. this.BBAAA = (Prop) null;
  218. this.\u0030CAAA = "ng_proc_paintcan01a";
  219. this.\u0031CAA0 = false;
  220. this.\u0032CAAA = (Rope) null;
  221. this.\u0033CAA0 = false;
  222. this.\u0034CAAA = false;
  223. this.\u0035CAA0 = Vector3.get_Zero();
  224. this.\u0036CAAA = (Entity) null;
  225. this.\u0037CAA0 = 0.0;
  226. this.\u0038CAAA = (THelper.TAnimDict) null;
  227. this.\u0039CAA0 = (THelper.TAnimDict) null;
  228. this.\u0030DAAA = -1.0;
  229. this.\u0031DAA0 = false;
  230. this.\u0032DAAA = DateAndTime.Now;
  231. this.\u0033DAA0 = false;
  232. this.\u0034DAAA = 0.0;
  233. this.\u0035DAA0 = true;
  234. this.\u0036DAAA = false;
  235. this.\u0037DAA0 = -1;
  236. this.CDAA0 = 0.0;
  237. this.\u0030EAAA = 0;
  238. this.\u0031EAA0 = (Prop) null;
  239. this.\u0032EAAA = true;
  240. this.\u0033EAA0 = new List<Entity>();
  241. this.\u0034EAAA = DateAndTime.Now;
  242. this.\u0035EAA0 = new List<Entity>();
  243. this.\u0036EAAA = (Entity) null;
  244. this.\u0038EAAA = true;
  245. this.\u0039EAA0 = 0.0;
  246. this.BEAAA = Vector3.get_Zero();
  247. this.CEAA0 = -1;
  248. this.\u0030FAAA = DateAndTime.Now;
  249. this.\u0031FAA0 = false;
  250. this.\u0032FAAA = (Vector3) null;
  251. this.\u0033FAA0 = true;
  252. this.\u0039FAA0 = true;
  253. this.CFAA0 = (Prop) null;
  254. this.\u0030GAAA = new List<Prop>();
  255. this.\u0034GAAA = (Vehicle) null;
  256. this.\u0035GAA0 = false;
  257. this.\u0039GAA0 = false;
  258. this.BGAAA = (THelper.TAnimDict) null;
  259. this.CGAA0 = (THelper.TAnimDict) null;
  260. this.\u0030HAAA = (THelper.TAnimDict) null;
  261. this.\u0031HAA0 = (short) 1;
  262. this.\u0034HAAA = -1;
  263. this.\u0035HAA0 = -1.0;
  264. this.\u0038HAAA = 0.0;
  265. this.BHAAA = (Prop) null;
  266. this.\u0032A0AA = 0.0;
  267. this.\u0033A0A0 = 0.0;
  268. this.\u0034A0AA = 0.0;
  269. this.\u0035A0A0 = Vector3.get_Zero();
  270. this.\u0038A0AA = true;
  271. this.\u0039A0A0 = true;
  272. this.set_Interval(10);
  273. this.\u00336AA0 = DateAndTime.Now;
  274. }
  275.  
  276. [DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true)]
  277. private static extern short GetAsyncKeyState(int vkey);
  278.  
  279. private void \u0035AAA0()
  280. {
  281. if (DateAndTime.Now.Subtract(this.\u00336AA0).TotalMilliseconds <= 500.0)
  282. return;
  283. this.\u00346AAA = true;
  284. JC2.\u00306AAA = new Random(DateAndTime.Now.Millisecond);
  285. THelper.anim_requestDict(this.\u00367AAA);
  286. THelper.anim_requestDict(this.\u00387AAA);
  287. THelper.anim_requestDict(this.B7AAA);
  288. THelper.anim_requestDict(this.\u00308AAA);
  289. THelper.anim_requestDict(this.\u00328AAA);
  290. THelper.anim_requestDict(this.\u00398AA0);
  291. THelper.anim_requestDict(this.C8AA0);
  292. THelper.anim_requestDict(this.\u00319AA0);
  293. THelper.anim_requestDict(this.\u00339AA0);
  294. this.\u00316AA0 = new CustomIniFile("");
  295. this.C6AA0 = Operators.CompareString(this.\u00316AA0.settingsGetString("bEnabled", "general", "1", true), "1", false) == 0;
  296. this.\u0035DAA0 = Operators.CompareString(this.\u00316AA0.settingsGetString("v2_bUseRagdoll", "general", "0", true), "1", false) == 0;
  297. this.\u0036DAAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bDisableWindMill", "general", "0", true), "1", false) == 0;
  298. this.\u00307AAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bHookMode", "general", "1", true), "1", false) == 0;
  299. this.\u00386AAA = this.\u00316AA0.settingsGetKey("hkToggleHookMode", "hotkeys", this.\u00386AAA, true);
  300. this.\u00366AAA = this.\u00316AA0.settingsGetKey("hkParachute", "hotkeys", this.\u00366AAA, true);
  301. this.\u00376AA0 = this.\u00316AA0.settingsGetKey("hkReleaseHookInVeh", "hotkeys", this.\u00376AA0, true);
  302. StreamWriter streamWriter = new StreamWriter(".\\Scripts\\" + THelper.getScriptname() + ".nibmod");
  303. streamWriter.Write(this.\u00385AAA);
  304. streamWriter.Close();
  305. streamWriter.Dispose();
  306. this.\u00326AAA = new CustomIniFile(".\\scripts\\NIBScripts.ini");
  307. this.\u00396AA0 = this.\u00326AAA.settingsGetKey("hkShowMenu", "hotkeys", this.\u00396AA0, true);
  308. this.B6AAA = this.\u00326AAA.settingsGetKey("hkShowMenuKeyTwo", "hotkeys", this.B6AAA, true);
  309. this.\u00369AAA = this.\u00316AA0.settingsGetKey("hkTriggerBombs", "hotkeys", this.\u00369AAA, true);
  310. this.\u0038A0AA = Operators.CompareString(this.\u00316AA0.settingsGetString("bWingSuitEnabled", "general", "1", true), "1", false) == 0;
  311. this.\u0038EAAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bCrosshairEnabled", "general", "1", true), "1", false) == 0;
  312. this.\u00356AA0 = new TMenu(this.\u00385AAA);
  313. this.\u00356AA0.addItem("bEnabled", "Enabled: ", Conversions.ToString(this.C6AA0), -1);
  314. this.\u00356AA0.addItem("bHookMode", "Hook mode (Ctrl + " + this.\u00386AAA.ToString() + "): ", Conversions.ToString(this.\u00307AAA), -1);
  315. this.\u00356AA0.addItem("bUseRagdoll", "Use ragdoll when moving to target: ", Conversions.ToString(this.\u0035DAA0), -1);
  316. this.\u00356AA0.addItem("bDisableWindMill", "Disable windmill feature: ", Conversions.ToString(this.\u0036DAAA), -1);
  317. this.\u00356AA0.addItem("bWingSuitEnabled", "Enable Wingsuit feature: ", Conversions.ToString(this.\u0038A0AA), -1);
  318. this.\u00356AA0.addItem("bCrosshairEnabled", "Enable crosshair: ", Conversions.ToString(this.\u0038EAAA), -1);
  319. this.\u00356AA0.addItem("close", "Close", "", -1);
  320. Function.Call((Hash) -5184338789570016586L, new InputArgument[1]
  321. {
  322. InputArgument.op_Implicit("scr_exile2")
  323. });
  324. this.\u0036AAAA();
  325. // ISSUE: explicit reference operation
  326. ((Model) @this.\u0037EAA0).\u002Ector((PedHash) -1011537562);
  327. // ISSUE: explicit reference operation
  328. ((Model) @this.\u0037EAA0).Request();
  329. Script.Wait(200);
  330. Ped[] nearbyPeds1 = World.GetNearbyPeds(Game.get_Player().get_Character(), 200f);
  331. int index1 = 0;
  332. while (index1 < nearbyPeds1.Length)
  333. {
  334. Ped ped1 = nearbyPeds1[index1];
  335. try
  336. {
  337. int num1;
  338. if (THelper.Exists((Entity) ped1))
  339. {
  340. Model model = ((Entity) ped1).get_Model();
  341. // ISSUE: explicit reference operation
  342. if (Model.op_Equality(Model.op_Implicit(((Model) @model).get_Hash()), this.\u0037EAA0) && !((Entity) ped1).get_IsVisible())
  343. {
  344. num1 = 1;
  345. goto label_7;
  346. }
  347. }
  348. num1 = 0;
  349. label_7:
  350. if (num1 != 0)
  351. {
  352. Ped[] nearbyPeds2 = World.GetNearbyPeds(ped1, 200f);
  353. int index2 = 0;
  354. while (index2 < nearbyPeds2.Length)
  355. {
  356. Ped ped2 = nearbyPeds2[index2];
  357. try
  358. {
  359. int num2;
  360. if (THelper.Exists((Entity) ped2))
  361. {
  362. Model model = ((Entity) ped2).get_Model();
  363. // ISSUE: explicit reference operation
  364. if (Model.op_Equality(Model.op_Implicit(((Model) @model).get_Hash()), this.\u0037EAA0) && !((Entity) ped2).get_IsVisible())
  365. {
  366. num2 = 1;
  367. goto label_14;
  368. }
  369. }
  370. num2 = 0;
  371. label_14:
  372. if (num2 != 0)
  373. {
  374. ((Entity) ped2).Detach();
  375. ((Entity) ped2).MarkAsNoLongerNeeded();
  376. ((Entity) ped2).Delete();
  377. }
  378. }
  379. catch (Exception ex)
  380. {
  381. ProjectData.SetProjectError(ex);
  382. ProjectData.ClearProjectError();
  383. }
  384. checked { ++index2; }
  385. }
  386. ((Entity) ped1).Detach();
  387. ((Entity) ped1).MarkAsNoLongerNeeded();
  388. ((Entity) ped1).Delete();
  389. }
  390. }
  391. catch (Exception ex)
  392. {
  393. ProjectData.SetProjectError(ex);
  394. ProjectData.ClearProjectError();
  395. }
  396. checked { ++index1; }
  397. }
  398. // ISSUE: explicit reference operation
  399. ((Model) @JC2.\u00317AA0).\u002Ector("ng_proc_coffee_04b");
  400. // ISSUE: explicit reference operation
  401. ((Model) @JC2.\u00317AA0).Request();
  402. JC2.\u0037GAA0 = new THelper.TAnimDict("weapons@projectile@", true);
  403. this.\u0038CAAA = new THelper.TAnimDict("missmic2@meat_hook", true);
  404. this.\u0038CAAA.request();
  405. this.\u0039CAA0 = new THelper.TAnimDict("MISSRAPPEL", true);
  406. this.\u0039CAA0.request();
  407. // ISSUE: explicit reference operation
  408. ((Model) @this.\u00327AAA).\u002Ector("s_prop_hdphones_1");
  409. // ISSUE: explicit reference operation
  410. ((Model) @this.\u00327AAA).Request();
  411. // ISSUE: explicit reference operation
  412. ((Model) @this.\u00337AA0).\u002Ector("p_parachute_s");
  413. // ISSUE: explicit reference operation
  414. ((Model) @this.\u00337AA0).Request();
  415. this.BGAAA = new THelper.TAnimDict("swimming@base", true);
  416. this.BGAAA.request();
  417. this.CGAA0 = new THelper.TAnimDict("swimming@scuba", true);
  418. this.CGAA0.request();
  419. this.\u0030HAAA = new THelper.TAnimDict("skydive@freefall", true);
  420. this.\u0030HAAA.request();
  421. // ISSUE: explicit reference operation
  422. ((Model) @this.\u0039HAA0).\u002Ector("prop_riot_shield");
  423. // ISSUE: explicit reference operation
  424. ((Model) @this.\u0039HAA0).Request();
  425. }
  426.  
  427. private void \u0036AAAA()
  428. {
  429. DateTime now1 = DateAndTime.Now;
  430. // ISSUE: explicit reference operation
  431. ((Model) @JC2.\u0034FAAA).\u002Ector("prop_pipes_conc_01");
  432. // ISSUE: explicit reference operation
  433. ((Model) @JC2.\u0034FAAA).Request();
  434. // ISSUE: explicit reference operation
  435. while (!((Model) @JC2.\u0034FAAA).get_IsLoaded() & DateAndTime.Now.Subtract(now1).TotalMilliseconds < 1000.0)
  436. Script.Wait(100);
  437. try
  438. {
  439. // ISSUE: explicit reference operation
  440. JC2.\u0037FAA0 = ((Model) @JC2.\u0034FAAA).get_Hash();
  441. // ISSUE: explicit reference operation
  442. JC2.\u0038FAAA = ((Model) @JC2.\u0034FAAA).GetDimensions();
  443. }
  444. catch (Exception ex)
  445. {
  446. ProjectData.SetProjectError(ex);
  447. ProjectData.ClearProjectError();
  448. }
  449. // ISSUE: explicit reference operation
  450. ((Model) @JC2.\u0035FAA0).\u002Ector("prop_windmill_01");
  451. // ISSUE: explicit reference operation
  452. ((Model) @JC2.\u0035FAA0).Request();
  453. DateTime now2 = DateAndTime.Now;
  454. // ISSUE: explicit reference operation
  455. while (!((Model) @JC2.\u0035FAA0).get_IsLoaded() & DateAndTime.Now.Subtract(now2).TotalMilliseconds < 1000.0)
  456. Script.Wait(100);
  457. // ISSUE: explicit reference operation
  458. JC2.\u0036FAAA = ((Model) @JC2.\u0035FAA0).get_Hash();
  459. }
  460.  
  461. private void \u0037AAA0()
  462. {
  463. if (DateAndTime.Now.Subtract(this.\u00357AA0).TotalMilliseconds <= 1000.0)
  464. return;
  465. this.\u00357AA0 = DateAndTime.Now;
  466. if (Operators.CompareString(this.\u00326AAA.settingsGetString("menu", "display", "", true), THelper.getScriptname(), false) == 0)
  467. {
  468. this.\u00326AAA.WriteINI("menu", "display", "");
  469. this.\u00356AA0.closeMenu();
  470. this.\u00356AA0.showMenu();
  471. }
  472. }
  473.  
  474. public static Rope ADD_ROPE(double position_x, double position_y, double position_z, double angle_x, double angle_y, double angle_z, double length, int type, double max_length, double min_length, double p10, bool p11, bool p12, bool p13, double p14, bool breakable, ref InputArgument p16)
  475. {
  476. int num1 = type;
  477. Vector3 vector3_1;
  478. // ISSUE: explicit reference operation
  479. ((Vector3) @vector3_1).\u002Ector((float) position_x, (float) position_y, (float) position_z);
  480. Vector3 vector3_2 = vector3_1;
  481. Vector3 vector3_3;
  482. // ISSUE: explicit reference operation
  483. ((Vector3) @vector3_3).\u002Ector((float) angle_x, (float) angle_y, (float) angle_z);
  484. Vector3 vector3_4 = vector3_3;
  485. double num2 = length;
  486. double num3 = min_length;
  487. int num4 = breakable ? 1 : 0;
  488. return World.AddRope((RopeType) num1, vector3_2, vector3_4, (float) num2, (float) num3, num4 != 0);
  489. }
  490.  
  491. public static Rope createRope(Entity ent1, Entity ent2, double distanceCoef = 1.0, double forcedDist = 0.0, Bone bActivatePhysics = -1)
  492. {
  493. if (THelper.isPed(ent1) && !THelper.Exists(ent2))
  494. {
  495. distanceCoef = 1.0;
  496. forcedDist = (double) World.GetDistance(ent1.get_Position(), ent2.get_Position());
  497. }
  498. return JC2.createRope(ent1.get_Position(), ent2.get_Position(), distanceCoef, forcedDist, (Bone) -1);
  499. }
  500.  
  501. public static Rope createRope(Vector3 pos1, Vector3 pos2, double distanceCoef = 1.0, double forcedDist = 0.0, Bone bActivatePhysics = -1)
  502. {
  503. Vector3 vector3 = pos1;
  504. double num = (double) World.GetDistance(pos1, pos2) * distanceCoef;
  505. if (forcedDist > 0.0)
  506. num = forcedDist;
  507. else if (num <= 0.0)
  508. num = 1.0;
  509. InputArgument p16 = new InputArgument(0);
  510. Function.Call((Hash) -7237220984349894463L, new InputArgument[0]);
  511. Vector3 rotation = THelper.directionToRotation(Vector3.Normalize(Vector3.op_Subtraction(pos2, pos1)), 0.0);
  512. Rope rope = JC2.ADD_ROPE((double) vector3.X, (double) vector3.Y, (double) vector3.Z, (double) rotation.X, (double) rotation.Y, (double) rotation.Z, num, 4, num, 1.0, 0.0, false, false, false, 10.0, false, ref p16);
  513. Script.Wait(10);
  514. if (bActivatePhysics > 0)
  515. Function.Call((Hash) 8143371989984347952L, new InputArgument[1]
  516. {
  517. InputArgument.op_Implicit(rope.get_Handle())
  518. });
  519. return rope;
  520. }
  521.  
  522. private void \u0038AAAA(Rope ᙂ, Entity \u0031AAAA, Vector3 ᙄ = null)
  523. {
  524. Vector3 boneCoord = Game.get_Player().get_Character().GetBoneCoord((Bone) 57005);
  525. Function.Call((Hash) 5424878668781820517L, new InputArgument[6]
  526. {
  527. InputArgument.op_Implicit(ᙂ.get_Handle()),
  528. InputArgument.op_Implicit(param1),
  529. InputArgument.op_Implicit((float) boneCoord.X),
  530. InputArgument.op_Implicit((float) boneCoord.Y),
  531. InputArgument.op_Implicit((float) boneCoord.Z),
  532. InputArgument.op_Implicit(false)
  533. });
  534. Function.Call((Hash) 6020487492214106537L, new InputArgument[1]
  535. {
  536. InputArgument.op_Implicit(ᙂ.get_Handle())
  537. });
  538. }
  539.  
  540. private Rope \u0039AAA0(Vector3 ᙂ, Entity \u0031AAAA, Entity ᙄ = null, short \u0033AAAA = 0, Vector3 \u0034AAAA = null)
  541. {
  542. DateTime now1 = DateAndTime.Now;
  543. if (THelper.Exists(ᙄ))
  544. ᙂ = ᙄ.get_Position();
  545. Entity prop = (Entity) World.CreateProp(JC2.CBAA0, Vector3.op_Addition(param1.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 100f)), true, false);
  546. Script.Wait(50);
  547. Rope r = (Rope) null;
  548. if (THelper.Exists(prop))
  549. {
  550. prop.set_IsVisible(false);
  551. Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
  552. {
  553. InputArgument.op_Implicit(prop),
  554. InputArgument.op_Implicit(false),
  555. InputArgument.op_Implicit(false)
  556. });
  557. prop.set_FreezePosition(true);
  558. prop.set_Health(-1);
  559. if (!THelper.Exists(ᙄ))
  560. Function.Call((Hash) 469568048723526251L, new InputArgument[8]
  561. {
  562. InputArgument.op_Implicit(prop),
  563. InputArgument.op_Implicit((float) ᙂ.X),
  564. InputArgument.op_Implicit((float) ᙂ.Y),
  565. InputArgument.op_Implicit((double) ᙂ.Z - 1.2),
  566. InputArgument.op_Implicit(1),
  567. InputArgument.op_Implicit(1),
  568. InputArgument.op_Implicit(1),
  569. InputArgument.op_Implicit(1)
  570. });
  571. else
  572. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  573. {
  574. InputArgument.op_Implicit(prop),
  575. InputArgument.op_Implicit(ᙄ),
  576. InputArgument.op_Implicit(0),
  577. InputArgument.op_Implicit((int) param3),
  578. InputArgument.op_Implicit((float) param4.X),
  579. InputArgument.op_Implicit((float) param4.Y),
  580. InputArgument.op_Implicit((float) param4.Z),
  581. InputArgument.op_Implicit(0),
  582. InputArgument.op_Implicit(0),
  583. InputArgument.op_Implicit(0),
  584. InputArgument.op_Implicit(0),
  585. InputArgument.op_Implicit(0),
  586. InputArgument.op_Implicit(0),
  587. InputArgument.op_Implicit(0),
  588. InputArgument.op_Implicit(false),
  589. InputArgument.op_Implicit(false),
  590. InputArgument.op_Implicit(false),
  591. InputArgument.op_Implicit(false),
  592. InputArgument.op_Implicit(0)
  593. });
  594. if (THelper.isPed(param1))
  595. {
  596. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  597. {
  598. InputArgument.op_Implicit(param1),
  599. InputArgument.op_Implicit(false)
  600. });
  601. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  602. {
  603. InputArgument.op_Implicit(param1),
  604. InputArgument.op_Implicit(true)
  605. });
  606. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  607. {
  608. InputArgument.op_Implicit(param1),
  609. InputArgument.op_Implicit(10000),
  610. InputArgument.op_Implicit(10000),
  611. InputArgument.op_Implicit(0),
  612. InputArgument.op_Implicit(0),
  613. InputArgument.op_Implicit(0)
  614. });
  615. }
  616. double distance1 = (double) World.GetDistance(param1.get_Position(), ᙂ);
  617. if (THelper.isPed(param1))
  618. {
  619. DateTime now2 = DateAndTime.Now;
  620. double distance2 = (double) World.GetDistance(param1.get_Position(), ᙂ);
  621. param1.ApplyForce(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ, param1.get_Position()), 2f));
  622. while ((double) World.GetDistance(param1.get_Position(), ᙂ) > distance2 * 0.3 && DateAndTime.Now.Subtract(now2).TotalMilliseconds < 2000.0)
  623. Script.Wait(10);
  624. distance1 = (double) World.GetDistance(param1.get_Position(), ᙂ);
  625. r = JC2.createRope(param1.get_Position(), ᙂ, 1.0, 0.0, (Bone) -1);
  626. Rope rope = r;
  627. Entity e1 = prop;
  628. Entity e2 = param1;
  629. double distCoef = 1.0;
  630. double forcedDist = distance1;
  631. Vector3 vector3;
  632. // ISSUE: explicit reference operation
  633. ((Vector3) @vector3).\u002Ector(0.0f, 0.0f, (float) (double) (ᙂ.Z - prop.get_Position().Z) * 0.5f);
  634. Vector3 offset_E1 = vector3;
  635. Vector3 b9Aaa = this.B9AAA;
  636. JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
  637. }
  638. else
  639. {
  640. r = JC2.createRope(param1.get_Position(), ᙂ, 1.0, 0.0, (Bone) -1);
  641. this.B9AAA = Vector3.get_Zero();
  642. Vector3 velocity;
  643. Vector3 vector3_1;
  644. if (this.\u00348AAA)
  645. {
  646. Rope rope = r;
  647. Entity e1 = prop;
  648. Entity e2 = param1;
  649. double distCoef = 1.0;
  650. double forcedDist = 0.0;
  651. // ISSUE: explicit reference operation
  652. // ISSUE: variable of a reference type
  653. Vector3& local = @velocity;
  654. double num1 = 0.0;
  655. double num2 = 0.0;
  656. // ISSUE: variable of the null type
  657. __Null z1 = ᙂ.Z;
  658. vector3_1 = prop.get_Position();
  659. // ISSUE: variable of the null type
  660. __Null z2 = vector3_1.Z;
  661. double num3 = (double) ((float) (double) (z1 - z2) * 0.2f);
  662. ((Vector3) local).\u002Ector((float) num1, (float) num2, (float) num3);
  663. Vector3 offset_E1 = velocity;
  664. Vector3 b9Aaa = this.B9AAA;
  665. JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
  666. }
  667. else
  668. {
  669. Rope rope = r;
  670. Entity e1 = prop;
  671. Entity e2 = param1;
  672. double distCoef = 1.0;
  673. double forcedDist = 0.0;
  674. // ISSUE: explicit reference operation
  675. ((Vector3) @velocity).\u002Ector(0.0f, 0.0f, (float) (double) (ᙂ.Z - prop.get_Position().Z) * 0.5f);
  676. Vector3 offset_E1 = velocity;
  677. Vector3 b9Aaa = this.B9AAA;
  678. JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
  679. }
  680. Vector3 vector3_2 = Vector3.Normalize(Vector3.op_Subtraction(ᙂ, param1.get_Position()));
  681. vector3_1 = Vector3.op_Subtraction(vector3_2, Vector3.Normalize(param1.get_Velocity()));
  682. int num4;
  683. // ISSUE: explicit reference operation
  684. if ((double) ((Vector3) @vector3_1).Length() > 0.3)
  685. {
  686. velocity = param1.get_Velocity();
  687. // ISSUE: explicit reference operation
  688. if ((double) ((Vector3) @velocity).Length() > 5.0)
  689. {
  690. Model model1 = param1.get_Model();
  691. // ISSUE: explicit reference operation
  692. if (!((Model) @model1).get_IsBike())
  693. {
  694. Model model2 = param1.get_Model();
  695. // ISSUE: explicit reference operation
  696. if (!((Model) @model2).get_IsBicycle())
  697. goto label_20;
  698. }
  699. num4 = 1;
  700. goto label_22;
  701. }
  702. }
  703. label_20:
  704. num4 = 0;
  705. label_22:
  706. if (num4 != 0)
  707. this.\u00360AAA((Vehicle) param1);
  708. Entity entity = param1;
  709. Vector3 vector3_3 = Vector3.op_Subtraction(vector3_2, Vector3.Normalize(param1.get_Velocity()));
  710. vector3_1 = param1.get_Velocity();
  711. // ISSUE: explicit reference operation
  712. double num5 = (double) ((Vector3) @vector3_1).Length();
  713. Vector3 vector3_4 = Vector3.op_Addition(Vector3.op_Multiply(Vector3.op_Multiply(vector3_3, (float) num5), 0.5f), Vector3.get_WorldUp());
  714. // ISSUE: explicit reference operation
  715. ((Vector3) @velocity).\u002Ector(1f, 1f, 1f);
  716. Vector3 vector3_5 = velocity;
  717. entity.ApplyForce(vector3_4, vector3_5);
  718. }
  719. this.\u00348AAA = false;
  720. this.\u0036BAAA.Add(prop);
  721. new JC2.TEntityInRope(param1, prop, r, distance1, this.B9AAA, ᙂ).pinCoord = ᙂ;
  722. }
  723. this.\u00348AAA = false;
  724. return r;
  725. }
  726.  
  727. private bool BAAAA(Entity ᙂ, Entity \u0031AAAA)
  728. {
  729. List<JC2.TEntityInRope>.Enumerator enumerator;
  730. try
  731. {
  732. enumerator = JC2.\u0035BAA0.GetEnumerator();
  733. while (enumerator.MoveNext())
  734. {
  735. JC2.TEntityInRope current = enumerator.Current;
  736. if (THelper.Exists(current.p1) && THelper.Exists(current.p2) && (Entity.op_Equality(current.p1, ᙂ) && Entity.op_Equality(current.p2, param1) || Entity.op_Equality(current.p1, param1) && Entity.op_Equality(current.p2, ᙂ)))
  737. return true;
  738. }
  739. }
  740. finally
  741. {
  742. enumerator.Dispose();
  743. }
  744. return false;
  745. }
  746.  
  747. public static Rope attachEntitiesToRope(Rope rope, Entity e1, Entity e2, double distCoef = 1.0, double forcedDist = 0.0, Vector3 offset_E1 = null, Vector3 offset_E2 = null)
  748. {
  749. Vector3 vector3_1 = e1.get_Position();
  750. Vector3 vector3_2 = e2.get_Position();
  751. offset_E1 = Vector3.get_Zero();
  752. offset_E2 = Vector3.get_Zero();
  753. if (JC2.\u00320AAA(e1, e2) == null)
  754. {
  755. JC2.ᙅ ᙅ = new JC2.ᙅ(e1, e2);
  756. }
  757. if (THelper.isPed(e1))
  758. {
  759. vector3_1 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  760. {
  761. InputArgument.op_Implicit(e1),
  762. InputArgument.op_Implicit(0),
  763. InputArgument.op_Implicit(0),
  764. InputArgument.op_Implicit(0),
  765. InputArgument.op_Implicit(0)
  766. });
  767. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  768. {
  769. InputArgument.op_Implicit(e1),
  770. InputArgument.op_Implicit(-1),
  771. InputArgument.op_Implicit(-1),
  772. InputArgument.op_Implicit(0),
  773. InputArgument.op_Implicit(0),
  774. InputArgument.op_Implicit(0)
  775. });
  776. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  777. {
  778. InputArgument.op_Implicit(e1),
  779. InputArgument.op_Implicit(false)
  780. });
  781. Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
  782. {
  783. InputArgument.op_Implicit(e1),
  784. InputArgument.op_Implicit(false)
  785. });
  786. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  787. {
  788. InputArgument.op_Implicit(e1),
  789. InputArgument.op_Implicit(true),
  790. InputArgument.op_Implicit(true)
  791. });
  792. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  793. {
  794. InputArgument.op_Implicit(e1),
  795. InputArgument.op_Implicit(false)
  796. });
  797. if (e1.get_Health() < 0)
  798. {
  799. Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
  800. {
  801. InputArgument.op_Implicit(e1)
  802. });
  803. e1.set_Health(100);
  804. }
  805. }
  806. if (THelper.isPed(e2))
  807. {
  808. vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  809. {
  810. InputArgument.op_Implicit(e2),
  811. InputArgument.op_Implicit(0),
  812. InputArgument.op_Implicit(0),
  813. InputArgument.op_Implicit(0),
  814. InputArgument.op_Implicit(0)
  815. });
  816. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  817. {
  818. InputArgument.op_Implicit(e2),
  819. InputArgument.op_Implicit(-1),
  820. InputArgument.op_Implicit(-1),
  821. InputArgument.op_Implicit(0),
  822. InputArgument.op_Implicit(0),
  823. InputArgument.op_Implicit(0)
  824. });
  825. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  826. {
  827. InputArgument.op_Implicit(e2),
  828. InputArgument.op_Implicit(false)
  829. });
  830. Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
  831. {
  832. InputArgument.op_Implicit(e2),
  833. InputArgument.op_Implicit(false)
  834. });
  835. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  836. {
  837. InputArgument.op_Implicit(e2),
  838. InputArgument.op_Implicit(true),
  839. InputArgument.op_Implicit(true)
  840. });
  841. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  842. {
  843. InputArgument.op_Implicit(e2),
  844. InputArgument.op_Implicit(false)
  845. });
  846. if (e2.get_Health() < 0)
  847. {
  848. Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
  849. {
  850. InputArgument.op_Implicit(e2)
  851. });
  852. e2.set_Health(100);
  853. }
  854. }
  855. InputArgument inputArgument1 = new InputArgument(0);
  856. InputArgument inputArgument2 = new InputArgument(0);
  857. double num = (double) World.GetDistance(vector3_1, vector3_2) * distCoef;
  858. if (forcedDist > 0.0)
  859. num = forcedDist;
  860. else if (num <= 10.0)
  861. num = 10.0;
  862. Vector3 vector3_3;
  863. if (Vector3.op_Inequality(offset_E1, vector3_3))
  864. vector3_1 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
  865. {
  866. InputArgument.op_Implicit(e1),
  867. InputArgument.op_Implicit((float) offset_E1.X),
  868. InputArgument.op_Implicit((float) offset_E1.Y),
  869. InputArgument.op_Implicit((float) offset_E1.Z)
  870. });
  871. if (Vector3.op_Inequality(offset_E2, vector3_3))
  872. vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
  873. {
  874. InputArgument.op_Implicit(e2),
  875. InputArgument.op_Implicit((float) offset_E2.X),
  876. InputArgument.op_Implicit((float) offset_E2.Y),
  877. InputArgument.op_Implicit((float) offset_E2.Z)
  878. });
  879. if (!THelper.isPed(e1))
  880. ;
  881. if (!THelper.isPed(e2))
  882. ;
  883. Function.Call((Hash) 4437713091426519747L, new InputArgument[14]
  884. {
  885. InputArgument.op_Implicit(rope.get_Handle()),
  886. InputArgument.op_Implicit(e1),
  887. InputArgument.op_Implicit(e2),
  888. InputArgument.op_Implicit((float) vector3_1.X),
  889. InputArgument.op_Implicit((float) vector3_1.Y),
  890. InputArgument.op_Implicit((float) vector3_1.Z),
  891. InputArgument.op_Implicit((float) vector3_2.X),
  892. InputArgument.op_Implicit((float) vector3_2.Y),
  893. InputArgument.op_Implicit((float) vector3_2.Z),
  894. InputArgument.op_Implicit(num),
  895. InputArgument.op_Implicit(false),
  896. InputArgument.op_Implicit(false),
  897. inputArgument1,
  898. inputArgument2
  899. });
  900. JC2.gasObject(e1, e2);
  901. JC2.gasObject(e2, e1);
  902. THelper.missionEntity(e1, true, true);
  903. THelper.missionEntity(e2, true, true);
  904. return rope;
  905. }
  906.  
  907. public static void gasObject(Entity ent, Entity er)
  908. {
  909. if (!THelper.isObject(ent))
  910. return;
  911. JC2.checkGasModelHash(ent, er, -1779825653);
  912. JC2.checkGasModelHash(ent, er, -1738103333);
  913. JC2.checkGasModelHash(ent, er, -1348598835);
  914. JC2.checkGasModelHash(ent, er, 1270590574);
  915. JC2.checkGasModelHash(ent, er, -921781850);
  916. JC2.checkGasModelHash(ent, er, -925511118);
  917. JC2.checkGasModelHash(ent, er, 2013608974);
  918. JC2.checkGasModelHash(ent, er, 1246158990);
  919. JC2.checkGasModelHash(ent, er, 782665360);
  920. JC2.checkGasModelHash(ent, er, 282166596);
  921. JC2.checkGasModelHash(ent, er, -260208501);
  922. JC2.checkGasModelHash(ent, er, 1652026494);
  923. JC2.checkGasModelHash(ent, er, 631304913);
  924. JC2.checkGasModelHash(ent, er, 344662182);
  925. JC2.checkGasModelHash(ent, er, -1920001264);
  926. JC2.checkGasModelHash(ent, er, 936543891);
  927. JC2.checkGasModelHash(ent, er, 1242409737);
  928. }
  929.  
  930. public static void checkGasModelHash(Entity ent, Entity er, int hash)
  931. {
  932. Model model = ent.get_Model();
  933. // ISSUE: explicit reference operation
  934. if (((Model) @model).get_Hash() != hash)
  935. return;
  936. JC2.TGasObjects tgasObjects = new JC2.TGasObjects(ent, er);
  937. }
  938.  
  939. private void CAAA0()
  940. {
  941. if (!this.\u00359AA0 && !this.\u0033CAA0)
  942. return;
  943. try
  944. {
  945. if (THelper.Exists((Entity) this.\u00378AA0))
  946. {
  947. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  948. Ped pedOnSeat1 = this.\u00378AA0.GetPedOnSeat((VehicleSeat) -1);
  949. Model model = ((Entity) this.\u00378AA0).get_Model();
  950. // ISSUE: explicit reference operation
  951. if (((Model) @model).get_IsPlane())
  952. {
  953. if (THelper.Exists((Entity) pedOnSeat1))
  954. {
  955. pedOnSeat1.get_Task().ClearAll();
  956. pedOnSeat1.get_Task().ClearSecondary();
  957. pedOnSeat1.set_AlwaysKeepTask(false);
  958. pedOnSeat1.set_AlwaysKeepTask(true);
  959. Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
  960. {
  961. InputArgument.op_Implicit(pedOnSeat1),
  962. InputArgument.op_Implicit(this.\u00378AA0),
  963. InputArgument.op_Implicit(4096)
  964. });
  965. pedOnSeat1.set_CanRagdoll(true);
  966. if (((Entity) pedOnSeat1).get_Health() < 0)
  967. pedOnSeat1.get_Task().ClearAllImmediately();
  968. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  969. {
  970. InputArgument.op_Implicit(pedOnSeat1),
  971. InputArgument.op_Implicit(3000),
  972. InputArgument.op_Implicit(3000),
  973. InputArgument.op_Implicit(0),
  974. InputArgument.op_Implicit(0),
  975. InputArgument.op_Implicit(0)
  976. });
  977. }
  978. Game.get_Player().get_Character().get_Task().WarpIntoVehicle(this.\u00378AA0, (VehicleSeat) -1);
  979. this.\u00378AA0 = (Vehicle) null;
  980. return;
  981. }
  982. Vector3.get_Zero();
  983. Vector3 vector3_1;
  984. if (THelper.Exists((Entity) pedOnSeat1))
  985. {
  986. vector3_1 = ((Entity) pedOnSeat1).GetOffsetInWorldCoords(Vector3.get_Zero());
  987. }
  988. else
  989. {
  990. vector3_1 = THelper.getEntityBoneCoord((Entity) this.\u00378AA0, THelper.getEntityBoneIndexByName((Entity) this.\u00378AA0, "seat_dside_f"));
  991. if (Vector3.op_Equality(vector3_1, Vector3.get_Zero()))
  992. vector3_1 = THelper.getEntityBoneCoord((Entity) this.\u00378AA0, THelper.getEntityBoneIndexByName((Entity) this.\u00378AA0, "seat_f"));
  993. }
  994. Vector3 vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
  995. {
  996. InputArgument.op_Implicit(this.\u00378AA0),
  997. InputArgument.op_Implicit((float) vector3_1.X),
  998. InputArgument.op_Implicit((float) vector3_1.Y),
  999. InputArgument.op_Implicit((float) vector3_1.Z)
  1000. });
  1001. model = ((Entity) this.\u00378AA0).get_Model();
  1002. // ISSUE: explicit reference operation
  1003. if (((Model) @model).get_IsHelicopter())
  1004. {
  1005. if (THelper.anim_requestDict(this.C8AA0))
  1006. {
  1007. Game.get_Player().get_Character().set_CanRagdoll(false);
  1008. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  1009. Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
  1010. Vector3 vector3_3 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
  1011. {
  1012. InputArgument.op_Implicit(this.\u00378AA0),
  1013. InputArgument.op_Implicit((float) position.X),
  1014. InputArgument.op_Implicit((float) position.Y),
  1015. InputArgument.op_Implicit((float) position.Z)
  1016. });
  1017. double num1 = (double) (vector3_3.Z - vector3_2.Z);
  1018. double num2 = num1 * 0.02;
  1019. vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X - 0.7f);
  1020. vector3_2.Y = (__Null) (double) ((float) (double) vector3_2.Y - 0.05f);
  1021. vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z + 0.3f);
  1022. vector3_3.X = vector3_2.X;
  1023. vector3_3.Y = vector3_2.Y;
  1024. ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
  1025. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 8.0, THelper.animFlags.normal, false);
  1026. Script.Wait(50);
  1027. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 0.1))
  1028. {
  1029. Script.Wait(10);
  1030. Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
  1031. {
  1032. InputArgument.op_Implicit(Game.get_Player().get_Character())
  1033. });
  1034. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 4.0);
  1035. }
  1036. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 0.4))
  1037. {
  1038. Script.Wait(10);
  1039. Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
  1040. {
  1041. InputArgument.op_Implicit(Game.get_Player().get_Character())
  1042. });
  1043. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 4.0);
  1044. if (num1 < -1.5)
  1045. {
  1046. num1 -= num2 * 1.2;
  1047. vector3_3.Z = (__Null) num1;
  1048. vector3_3.X = (__Null) (double) ((float) (double) vector3_3.X - 0.005f);
  1049. Ped character = Game.get_Player().get_Character();
  1050. Vehicle vehicle = this.\u00378AA0;
  1051. int num3 = 0;
  1052. Vector3 vector3_4 = vector3_3;
  1053. Vector3 vector3_5;
  1054. // ISSUE: explicit reference operation
  1055. ((Vector3) @vector3_5).\u002Ector(0.0f, 0.0f, 0.0f);
  1056. Vector3 vector3_6 = vector3_5;
  1057. ((Entity) character).AttachTo((Entity) vehicle, num3, vector3_4, vector3_6);
  1058. }
  1059. }
  1060. Game.get_Player().get_Character().get_Task().ClearAnimation(this.C8AA0, this.\u00309AAA);
  1061. }
  1062. }
  1063. else if (THelper.anim_requestDict(this.\u00398AA0))
  1064. {
  1065. Game.get_Player().get_Character().set_CanRagdoll(false);
  1066. Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
  1067. Vector3 vector3_3 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
  1068. {
  1069. InputArgument.op_Implicit(this.\u00378AA0),
  1070. InputArgument.op_Implicit((float) position.X),
  1071. InputArgument.op_Implicit((float) position.Y),
  1072. InputArgument.op_Implicit((float) position.Z)
  1073. });
  1074. double num1 = (double) (vector3_3.Z - vector3_2.Z);
  1075. double num2 = num1 * 0.02;
  1076. vector3_3.X = vector3_2.X;
  1077. vector3_3.Y = vector3_2.Y;
  1078. vector3_3.Z = (__Null) (double) ((float) (double) vector3_3.Z - 0.5f);
  1079. vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X - 0.7f);
  1080. vector3_2.Y = (__Null) (double) ((float) (double) vector3_2.Y - 0.05f);
  1081. vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z + 0.3f);
  1082. ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
  1083. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 8.0, THelper.animFlags.normal, false);
  1084. Script.Wait(50);
  1085. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 0.22))
  1086. {
  1087. Script.Wait(10);
  1088. Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
  1089. {
  1090. InputArgument.op_Implicit(Game.get_Player().get_Character())
  1091. });
  1092. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 2.0);
  1093. if (num1 > 0.05)
  1094. {
  1095. ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
  1096. num1 -= num2;
  1097. vector3_3.Z = (__Null) num1;
  1098. vector3_3.X = (__Null) (double) ((float) (double) vector3_3.X - 0.01f);
  1099. }
  1100. }
  1101. Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00398AA0, this.B8AAA);
  1102. }
  1103. Function.Call((Hash) 8963811182594345058L, new InputArgument[4]
  1104. {
  1105. InputArgument.op_Implicit(this.\u00378AA0),
  1106. InputArgument.op_Implicit(0),
  1107. InputArgument.op_Implicit(0),
  1108. InputArgument.op_Implicit(0)
  1109. });
  1110. ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_2, Vector3.get_Zero());
  1111. string str = this.\u00329AAA;
  1112. model = ((Entity) this.\u00378AA0).get_Model();
  1113. // ISSUE: explicit reference operation
  1114. if (((Model) @model).GetDimensions().Z > 2.0)
  1115. {
  1116. str = this.\u00349AAA;
  1117. vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z - 0.2f);
  1118. }
  1119. if (THelper.anim_requestDict(this.\u00319AA0))
  1120. {
  1121. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 8.0, THelper.animFlags.normal, true);
  1122. Script.Wait(50);
  1123. this.\u00378AA0.SmashWindow((VehicleWindow) 0);
  1124. if (!THelper.Exists((Entity) pedOnSeat1))
  1125. THelper.anim_setAnimTime((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.45);
  1126. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.2))
  1127. {
  1128. Script.Wait(10);
  1129. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 2.0);
  1130. }
  1131. model = ((Entity) this.\u00378AA0).get_Model();
  1132. // ISSUE: explicit reference operation
  1133. if (!((Model) @model).get_IsHelicopter())
  1134. {
  1135. if (THelper.Exists((Entity) pedOnSeat1))
  1136. {
  1137. pedOnSeat1.get_Task().ClearAll();
  1138. pedOnSeat1.get_Task().ClearSecondary();
  1139. pedOnSeat1.set_AlwaysKeepTask(false);
  1140. pedOnSeat1.set_AlwaysKeepTask(true);
  1141. Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
  1142. {
  1143. InputArgument.op_Implicit(pedOnSeat1),
  1144. InputArgument.op_Implicit(this.\u00378AA0),
  1145. InputArgument.op_Implicit(4096)
  1146. });
  1147. pedOnSeat1.set_CanRagdoll(true);
  1148. if (((Entity) pedOnSeat1).get_Health() < 0)
  1149. pedOnSeat1.get_Task().ClearAllImmediately();
  1150. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  1151. {
  1152. InputArgument.op_Implicit(pedOnSeat1),
  1153. InputArgument.op_Implicit(3000),
  1154. InputArgument.op_Implicit(3000),
  1155. InputArgument.op_Implicit(0),
  1156. InputArgument.op_Implicit(0),
  1157. InputArgument.op_Implicit(0)
  1158. });
  1159. }
  1160. }
  1161. else
  1162. {
  1163. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.35))
  1164. {
  1165. Script.Wait(10);
  1166. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 2.0);
  1167. }
  1168. if (THelper.Exists((Entity) pedOnSeat1))
  1169. {
  1170. pedOnSeat1.get_Task().ClearAllImmediately();
  1171. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  1172. {
  1173. InputArgument.op_Implicit(pedOnSeat1),
  1174. InputArgument.op_Implicit(3000),
  1175. InputArgument.op_Implicit(3000),
  1176. InputArgument.op_Implicit(0),
  1177. InputArgument.op_Implicit(0),
  1178. InputArgument.op_Implicit(0)
  1179. });
  1180. }
  1181. }
  1182. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.65))
  1183. {
  1184. Script.Wait(10);
  1185. vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X + 0.01f);
  1186. ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_2, Vector3.get_Zero());
  1187. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 1.5);
  1188. }
  1189. }
  1190. Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
  1191. {
  1192. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  1193. InputArgument.op_Implicit(this.\u00378AA0),
  1194. InputArgument.op_Implicit(-1)
  1195. });
  1196. Script.Wait(200);
  1197. DateTime now = DateAndTime.Now;
  1198. while (!Entity.op_Equality((Entity) Game.get_Player().get_Character().get_CurrentVehicle(), (Entity) this.\u00378AA0) & DateAndTime.Now.Subtract(now).TotalMilliseconds < 1000.0)
  1199. {
  1200. Game.get_Player().get_Character().get_Task().WarpIntoVehicle(this.\u00378AA0, (VehicleSeat) -1);
  1201. Script.Wait(100);
  1202. }
  1203. Script.Wait(100);
  1204. if (THelper.Exists((Entity) pedOnSeat1) && Entity.op_Equality((Entity) pedOnSeat1.get_CurrentVehicle(), (Entity) this.\u00378AA0))
  1205. pedOnSeat1.get_Task().ClearAllImmediately();
  1206. model = ((Entity) this.\u00378AA0).get_Model();
  1207. // ISSUE: explicit reference operation
  1208. if (((Model) @model).get_IsHelicopter())
  1209. {
  1210. short num = 0;
  1211. do
  1212. {
  1213. Ped pedOnSeat2 = this.\u00378AA0.GetPedOnSeat((VehicleSeat) (int) num);
  1214. if (THelper.Exists((Entity) pedOnSeat2) && ((Entity) pedOnSeat2).get_Health() >= 0)
  1215. {
  1216. pedOnSeat2.get_Task().ClearAll();
  1217. pedOnSeat2.get_Task().ClearSecondary();
  1218. pedOnSeat2.set_AlwaysKeepTask(false);
  1219. pedOnSeat2.set_AlwaysKeepTask(true);
  1220. Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
  1221. {
  1222. InputArgument.op_Implicit(pedOnSeat2),
  1223. InputArgument.op_Implicit(this.\u00378AA0),
  1224. InputArgument.op_Implicit(4096)
  1225. });
  1226. pedOnSeat2.set_CanRagdoll(true);
  1227. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  1228. {
  1229. InputArgument.op_Implicit(pedOnSeat2),
  1230. InputArgument.op_Implicit(3000),
  1231. InputArgument.op_Implicit(3000),
  1232. InputArgument.op_Implicit(0),
  1233. InputArgument.op_Implicit(0),
  1234. InputArgument.op_Implicit(0)
  1235. });
  1236. }
  1237. ++num;
  1238. }
  1239. while ((int) num <= 10);
  1240. }
  1241. Game.get_Player().get_Character().set_CanRagdoll(true);
  1242. this.\u00378AA0 = (Vehicle) null;
  1243. }
  1244. }
  1245. catch (Exception ex1)
  1246. {
  1247. ProjectData.SetProjectError(ex1);
  1248. try
  1249. {
  1250. Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
  1251. {
  1252. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  1253. InputArgument.op_Implicit(this.\u00378AA0),
  1254. InputArgument.op_Implicit(-1)
  1255. });
  1256. }
  1257. catch (Exception ex2)
  1258. {
  1259. ProjectData.SetProjectError(ex2);
  1260. ProjectData.ClearProjectError();
  1261. }
  1262. ProjectData.ClearProjectError();
  1263. }
  1264. this.\u00371AA0();
  1265. }
  1266.  
  1267. private void \u00300AAA()
  1268. {
  1269. List<JC2.ᙄ>.Enumerator enumerator;
  1270. try
  1271. {
  1272. enumerator = JC2.\u0038GAAA.GetEnumerator();
  1273. while (enumerator.MoveNext())
  1274. enumerator.Current.trigger();
  1275. }
  1276. finally
  1277. {
  1278. enumerator.Dispose();
  1279. }
  1280. }
  1281.  
  1282. private void \u00310AA0(object ᙂ, KeyEventArgs \u0031AAAA)
  1283. {
  1284. if (param1.KeyCode == Keys.None)
  1285. return;
  1286. if (param1.KeyCode == this.\u00396AA0 && (this.B6AAA == Keys.None || THelper._iskeyPressed(this.B6AAA)))
  1287. this.\u00356AA0.closeMenu();
  1288. if (param1.KeyCode == this.\u00369AAA)
  1289. this.\u00300AAA();
  1290. if (this.\u00356AA0.keyDown(param1.KeyCode) == TMenu.menuResult.selectItem)
  1291. {
  1292. if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bEnabled", false) == 0)
  1293. this.\u00381AAA();
  1294. else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bHookMode", false) == 0)
  1295. this.\u00391AA0();
  1296. else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bUseRagdoll", false) == 0)
  1297. {
  1298. this.\u0035DAA0 = !this.\u0035DAA0;
  1299. this.\u00316AA0.WriteINIBool("v2_bUseRagdoll", "general", this.\u0035DAA0);
  1300. this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0035DAA0);
  1301. }
  1302. else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bDisableWindMill", false) == 0)
  1303. {
  1304. this.\u0036DAAA = !this.\u0036DAAA;
  1305. this.\u00316AA0.WriteINIBool("bDisableWindMill", "general", this.\u0036DAAA);
  1306. this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0036DAAA);
  1307. }
  1308. else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bWingSuitEnabled", false) == 0)
  1309. {
  1310. this.\u0038A0AA = !this.\u0038A0AA;
  1311. this.\u00316AA0.WriteINIBool("bWingSuitEnabled", "general", this.\u0038A0AA);
  1312. this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0038A0AA);
  1313. }
  1314. else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bCrosshairEnabled", false) == 0)
  1315. {
  1316. this.\u0038EAAA = !this.\u0038EAAA;
  1317. this.\u00316AA0.WriteINIBool("bCrosshairEnabled", "general", this.\u0038EAAA);
  1318. this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0038EAAA);
  1319. }
  1320. }
  1321. if (this.C6AA0)
  1322. {
  1323. if (param1.KeyCode == this.\u00386AAA && THelper._iskeyPressed(Keys.ControlKey))
  1324. this.\u00391AA0();
  1325. if (param1.KeyCode == this.\u00376AA0 && JC2.\u0035BAA0.Count > 0)
  1326. {
  1327. JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)];
  1328. try
  1329. {
  1330. JC2.ᙅ ᙅ = JC2.\u00320AAA(tentityInRope.p1, tentityInRope.p2);
  1331. if (ᙅ != null)
  1332. ᙅ.remove();
  1333. try
  1334. {
  1335. if (Entity.op_Inequality(tentityInRope.p1, (Entity) Game.get_Player().get_Character()) && Entity.op_Inequality(tentityInRope.p1, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  1336. tentityInRope.p1.MarkAsNoLongerNeeded();
  1337. }
  1338. catch (Exception ex)
  1339. {
  1340. ProjectData.SetProjectError(ex);
  1341. ProjectData.ClearProjectError();
  1342. }
  1343. try
  1344. {
  1345. if (Entity.op_Inequality(tentityInRope.p2, (Entity) Game.get_Player().get_Character()) && Entity.op_Inequality(tentityInRope.p2, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  1346. tentityInRope.p2.MarkAsNoLongerNeeded();
  1347. }
  1348. catch (Exception ex)
  1349. {
  1350. ProjectData.SetProjectError(ex);
  1351. ProjectData.ClearProjectError();
  1352. }
  1353. JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)].rope.Delete();
  1354. JC2.finishEntityInRope(JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)]);
  1355. }
  1356. catch (Exception ex)
  1357. {
  1358. ProjectData.SetProjectError(ex);
  1359. ProjectData.ClearProjectError();
  1360. }
  1361. }
  1362. }
  1363. }
  1364.  
  1365. private static JC2.ᙅ \u00320AAA(Entity ᙂ, Entity \u0031AAAA)
  1366. {
  1367. List<JC2.ᙅ>.Enumerator enumerator;
  1368. try
  1369. {
  1370. enumerator = JC2.CA0A0.GetEnumerator();
  1371. while (enumerator.MoveNext())
  1372. {
  1373. JC2.ᙅ current = enumerator.Current;
  1374. try
  1375. {
  1376. if (current.ent1.get_Handle() == ᙂ.get_Handle() && current.ent2.get_Handle() == param1.get_Handle() || current.ent2.get_Handle() == ᙂ.get_Handle() && current.ent1.get_Handle() == param1.get_Handle())
  1377. return current;
  1378. }
  1379. catch (Exception ex)
  1380. {
  1381. ProjectData.SetProjectError(ex);
  1382. ProjectData.ClearProjectError();
  1383. }
  1384. }
  1385. }
  1386. finally
  1387. {
  1388. enumerator.Dispose();
  1389. }
  1390. return (JC2.ᙅ) null;
  1391. }
  1392.  
  1393. private void \u00330AA0(object ᙂ, KeyEventArgs \u0031AAAA)
  1394. {
  1395. }
  1396.  
  1397. private void \u00340AAA()
  1398. {
  1399. int index = checked (JC2.\u0035BAA0.Count - 1);
  1400. while (index >= 0)
  1401. {
  1402. JC2.TEntityInRope ᙂ = JC2.\u0035BAA0[index];
  1403. try
  1404. {
  1405. ᙂ.pedTick();
  1406. if ((!THelper.Exists(ᙂ.p1) || !THelper.Exists(ᙂ.p2)) && !false)
  1407. throw new Exception("not exists " + Conversions.ToString(THelper.Exists(ᙂ.p1)) + " " + Conversions.ToString(THelper.Exists(ᙂ.p2)));
  1408. int num1;
  1409. if (!ᙂ.p1.IsAttached() && (!ᙂ.isVehicle_p1 || ᙂ.isVehicle_p2 && Entity.op_Equality(ᙂ.p2, (Entity) Game.get_Player().get_Character().get_CurrentVehicle())))
  1410. {
  1411. Vector3 velocity1 = ᙂ.p2.get_Velocity();
  1412. // ISSUE: explicit reference operation
  1413. double num2 = (double) ((Vector3) @velocity1).Length();
  1414. Vector3 velocity2 = ᙂ.p1.get_Velocity();
  1415. // ISSUE: explicit reference operation
  1416. double num3 = (double) System.Math.Max(((Vector3) @velocity2).Length(), 1f);
  1417. if (num2 > num3)
  1418. {
  1419. Vector3 position = ᙂ.p2.get_Position();
  1420. // ISSUE: explicit reference operation
  1421. if ((double) ((Vector3) @position).DistanceTo(ᙂ.p1.get_Position()) > ᙂ.dist * 0.98)
  1422. {
  1423. if (ᙂ.isObject_p2)
  1424. {
  1425. Vector3 velocity3 = ᙂ.p2.get_Velocity();
  1426. // ISSUE: explicit reference operation
  1427. if ((double) ((Vector3) @velocity3).Length() <= 0.02)
  1428. goto label_8;
  1429. }
  1430. num1 = 1;
  1431. goto label_10;
  1432. }
  1433. }
  1434. }
  1435. label_8:
  1436. num1 = 0;
  1437. label_10:
  1438. if (num1 != 0)
  1439. {
  1440. ᙂ.p1.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ.p2.get_Position(), ᙂ.p1.get_Position()), 0.2f), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p1))));
  1441. }
  1442. else
  1443. {
  1444. int num2;
  1445. if (!ᙂ.p2.IsAttached() && (!ᙂ.isVehicle_p2 || ᙂ.isVehicle_p1 && Entity.op_Equality(ᙂ.p1, (Entity) Game.get_Player().get_Character().get_CurrentVehicle())))
  1446. {
  1447. Vector3 velocity1 = ᙂ.p1.get_Velocity();
  1448. // ISSUE: explicit reference operation
  1449. double num3 = (double) ((Vector3) @velocity1).Length();
  1450. Vector3 velocity2 = ᙂ.p2.get_Velocity();
  1451. // ISSUE: explicit reference operation
  1452. double num4 = (double) System.Math.Max(((Vector3) @velocity2).Length(), 1f);
  1453. if (num3 > num4)
  1454. {
  1455. Vector3 position = ᙂ.p2.get_Position();
  1456. // ISSUE: explicit reference operation
  1457. if ((double) ((Vector3) @position).DistanceTo(ᙂ.p1.get_Position()) > ᙂ.dist * 0.98)
  1458. {
  1459. if (ᙂ.isObject_p1)
  1460. {
  1461. Vector3 velocity3 = ᙂ.p1.get_Velocity();
  1462. // ISSUE: explicit reference operation
  1463. if ((double) ((Vector3) @velocity3).Length() <= 0.02)
  1464. goto label_17;
  1465. }
  1466. num2 = 1;
  1467. goto label_19;
  1468. }
  1469. }
  1470. }
  1471. label_17:
  1472. num2 = 0;
  1473. label_19:
  1474. if (num2 != 0)
  1475. ᙂ.p2.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ.p1.get_Position(), ᙂ.p2.get_Position()), 0.2f), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p2))));
  1476. }
  1477. try
  1478. {
  1479. if (THelper.Exists(ᙂ.p1))
  1480. {
  1481. if (DateAndTime.Now.Subtract(this.\u0030FAAA).TotalMilliseconds > 25000.0 && (double) World.GetDistance(ᙂ.p1.get_Position(), GameplayCamera.get_Position()) > System.Math.Max(200.0, ᙂ.dist * 1.5) && !ᙂ.p1.get_IsOnScreen())
  1482. {
  1483. ᙂ.p1.MarkAsNoLongerNeeded();
  1484. ᙂ.p1 = (Entity) null;
  1485. try
  1486. {
  1487. if (THelper.Exists(ᙂ.p2))
  1488. ᙂ.p2.MarkAsNoLongerNeeded();
  1489. ᙂ.p2 = (Entity) null;
  1490. }
  1491. catch (Exception ex)
  1492. {
  1493. ProjectData.SetProjectError(ex);
  1494. ProjectData.ClearProjectError();
  1495. }
  1496. throw new Exception("away " + Conversions.ToString(World.GetDistance(ᙂ.p1.get_Position(), GameplayCamera.get_Position())));
  1497. }
  1498. if (this.\u0030EAAA % 100 == 0 && THelper.Exists(ᙂ.p2))
  1499. {
  1500. double distance = (double) World.GetDistance(ᙂ.p1.get_Position(), ᙂ.p2.get_Position());
  1501. Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
  1502. {
  1503. InputArgument.op_Implicit(ᙂ.rope.get_Handle()),
  1504. InputArgument.op_Implicit(distance * 0.8)
  1505. });
  1506. }
  1507. int num2;
  1508. if (THelper.Exists(ᙂ.p2) && ᙂ.isObject_p2 && ᙂ.p2.IsAttached())
  1509. {
  1510. Model model = ᙂ.p2.get_Model();
  1511. // ISSUE: explicit reference operation
  1512. if (((Model) @model).get_Hash() == JC2.\u0037FAA0)
  1513. {
  1514. Vector3 position = ᙂ.p1.get_Position();
  1515. // ISSUE: explicit reference operation
  1516. if ((double) ((Vector3) @position).DistanceTo(ᙂ.p2.get_Position()) >= ᙂ.dist * 0.9)
  1517. {
  1518. num2 = 1;
  1519. goto label_38;
  1520. }
  1521. }
  1522. }
  1523. num2 = 0;
  1524. label_38:
  1525. if (num2 != 0)
  1526. {
  1527. ᙂ.p1.ApplyForce(Vector3.op_Multiply(Vector3.Normalize(Vector3.op_Subtraction(ᙂ.p2.get_Position(), ᙂ.p1.get_Position())), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p1))), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
  1528. Model model1 = ᙂ.p1.get_Model();
  1529. int num3;
  1530. // ISSUE: explicit reference operation
  1531. if (!((Model) @model1).get_IsBicycle())
  1532. {
  1533. Model model2 = ᙂ.p1.get_Model();
  1534. // ISSUE: explicit reference operation
  1535. if (!((Model) @model2).get_IsBike())
  1536. {
  1537. num3 = 0;
  1538. goto label_43;
  1539. }
  1540. }
  1541. num3 = 1;
  1542. label_43:
  1543. if (num3 != 0)
  1544. {
  1545. this.\u00360AAA((Vehicle) ᙂ.p1);
  1546. }
  1547. else
  1548. {
  1549. Model model2 = ᙂ.p1.get_Model();
  1550. int num4;
  1551. // ISSUE: explicit reference operation
  1552. if (!((Model) @model2).get_IsHelicopter())
  1553. {
  1554. model1 = ᙂ.p1.get_Model();
  1555. // ISSUE: explicit reference operation
  1556. if (!((Model) @model1).get_IsPlane())
  1557. {
  1558. num4 = 0;
  1559. goto label_49;
  1560. }
  1561. }
  1562. num4 = 1;
  1563. label_49:
  1564. if (num4 != 0)
  1565. Function.Call((Hash) 5041455353683427057L, new InputArgument[2]
  1566. {
  1567. InputArgument.op_Implicit(ᙂ.p1),
  1568. InputArgument.op_Implicit(-1.0)
  1569. });
  1570. }
  1571. }
  1572. int num5;
  1573. if (THelper.Exists(ᙂ.p1) && THelper.Exists(ᙂ.p2) && (ᙂ.isObject_p1 && ᙂ.p1.IsAttached()))
  1574. {
  1575. Model model = ᙂ.p1.get_Model();
  1576. // ISSUE: explicit reference operation
  1577. if (((Model) @model).get_Hash() == JC2.\u0037FAA0)
  1578. {
  1579. Vector3 position = ᙂ.p1.get_Position();
  1580. // ISSUE: explicit reference operation
  1581. if ((double) ((Vector3) @position).DistanceTo(ᙂ.p2.get_Position()) >= ᙂ.dist * 0.9)
  1582. {
  1583. num5 = 1;
  1584. goto label_57;
  1585. }
  1586. }
  1587. }
  1588. num5 = 0;
  1589. label_57:
  1590. if (num5 != 0)
  1591. {
  1592. ᙂ.p2.ApplyForce(Vector3.op_Multiply(Vector3.Normalize(Vector3.op_Subtraction(ᙂ.p1.get_Position(), ᙂ.p2.get_Position())), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p2))), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
  1593. Model model1 = ᙂ.p2.get_Model();
  1594. int num3;
  1595. // ISSUE: explicit reference operation
  1596. if (!((Model) @model1).get_IsBicycle())
  1597. {
  1598. Model model2 = ᙂ.p2.get_Model();
  1599. // ISSUE: explicit reference operation
  1600. if (!((Model) @model2).get_IsBike())
  1601. {
  1602. num3 = 0;
  1603. goto label_62;
  1604. }
  1605. }
  1606. num3 = 1;
  1607. label_62:
  1608. if (num3 != 0)
  1609. {
  1610. this.\u00360AAA((Vehicle) ᙂ.p2);
  1611. }
  1612. else
  1613. {
  1614. model1 = ᙂ.p2.get_Model();
  1615. int num4;
  1616. // ISSUE: explicit reference operation
  1617. if (!((Model) @model1).get_IsHelicopter())
  1618. {
  1619. Model model2 = ᙂ.p2.get_Model();
  1620. // ISSUE: explicit reference operation
  1621. if (!((Model) @model2).get_IsPlane())
  1622. {
  1623. num4 = 0;
  1624. goto label_68;
  1625. }
  1626. }
  1627. num4 = 1;
  1628. label_68:
  1629. if (num4 != 0)
  1630. Function.Call((Hash) 5041455353683427057L, new InputArgument[2]
  1631. {
  1632. InputArgument.op_Implicit(ᙂ.p2),
  1633. InputArgument.op_Implicit(-1.0)
  1634. });
  1635. }
  1636. }
  1637. this.\u00350AA0(ᙂ, ᙂ.p1, ᙂ.p2, ᙂ.isObject_p1, ᙂ.isObject_p2, ᙂ.isVehicle_p1, ᙂ.isVehicle_p2);
  1638. this.\u00350AA0(ᙂ, ᙂ.p2, ᙂ.p1, ᙂ.isObject_p2, ᙂ.isObject_p1, ᙂ.isVehicle_p2, ᙂ.isVehicle_p1);
  1639. }
  1640. }
  1641. catch (Exception ex)
  1642. {
  1643. ProjectData.SetProjectError(ex);
  1644. throw new Exception("error: " + ex.Message);
  1645. }
  1646. }
  1647. catch (Exception ex)
  1648. {
  1649. ProjectData.SetProjectError(ex);
  1650. ᙂ.remove();
  1651. ProjectData.ClearProjectError();
  1652. }
  1653. checked { index += -1; }
  1654. }
  1655. }
  1656.  
  1657. public static void finishEntityInRope(JC2.TEntityInRope er)
  1658. {
  1659. JC2.\u0035BAA0.Remove(er);
  1660. }
  1661.  
  1662. private void \u00350AA0(JC2.TEntityInRope ᙂ, Entity \u0031AAAA, Entity ᙄ, bool \u0033AAAA, bool \u0034AAAA, bool \u0035AAAA, bool \u0036AAAA)
  1663. {
  1664. try
  1665. {
  1666. Vector3 vector3_1;
  1667. int num1;
  1668. if (DateAndTime.Now.Subtract(ᙂ.timerSinceAttach).TotalMilliseconds > 1000.0 && param4)
  1669. {
  1670. vector3_1 = ᙄ.get_Velocity();
  1671. // ISSUE: explicit reference operation
  1672. if ((double) ((Vector3) @vector3_1).Length() <= 0.01 && param5)
  1673. {
  1674. num1 = 1;
  1675. goto label_5;
  1676. }
  1677. }
  1678. num1 = 0;
  1679. label_5:
  1680. if (num1 == 0)
  1681. return;
  1682. Vehicle vehicle = (Vehicle) param1;
  1683. vector3_1 = param1.get_Velocity();
  1684. // ISSUE: explicit reference operation
  1685. double num2 = (double) ((Vector3) @vector3_1).Length();
  1686. Model model1 = ((Entity) vehicle).get_Model();
  1687. Model model2;
  1688. int num3;
  1689. // ISSUE: explicit reference operation
  1690. if (!((Model) @model1).get_IsHelicopter())
  1691. {
  1692. model2 = ((Entity) vehicle).get_Model();
  1693. // ISSUE: explicit reference operation
  1694. if (!((Model) @model2).get_IsPlane())
  1695. {
  1696. num3 = 0;
  1697. goto label_10;
  1698. }
  1699. }
  1700. num3 = 1;
  1701. label_10:
  1702. bool flag = num3 != 0;
  1703. Vector3 vector3_2;
  1704. if (Entity.op_Inequality(param1, ᙂ.p1))
  1705. vector3_2 = (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
  1706. {
  1707. InputArgument.op_Implicit(ᙂ.rope.get_Handle()),
  1708. InputArgument.op_Implicit(0)
  1709. });
  1710. else
  1711. vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
  1712. {
  1713. InputArgument.op_Implicit(ᙂ.rope.get_Handle())
  1714. });
  1715. if ((double) World.GetDistance(ᙄ.get_Position(), vector3_2) >= ᙂ.dist * 0.95 && num2 > 5.0 && (vehicle.get_IsOnAllWheels() || flag))
  1716. {
  1717. Vector3 vector3_3 = Vector3.Normalize(Vector3.op_Subtraction(vector3_2, param1.get_Position()));
  1718. Vector3 worldUp = Vector3.get_WorldUp();
  1719. if (flag && num2 > 30.0 && (double) vehicle.get_EngineHealth() > 10.0)
  1720. {
  1721. vehicle.set_EngineHealth(0.0f);
  1722. throw new Exception("done");
  1723. }
  1724. vector3_3.Z = (__Null) 0.0;
  1725. if (param5)
  1726. {
  1727. vector3_1 = Vector3.op_Subtraction(vector3_3, Vector3.Normalize(param1.get_Velocity()));
  1728. // ISSUE: explicit reference operation
  1729. if ((double) ((Vector3) @vector3_1).Length() > 0.3 && num2 > 10.0)
  1730. {
  1731. model2 = param1.get_Model();
  1732. // ISSUE: explicit reference operation
  1733. if (((Model) @model2).get_IsBike())
  1734. goto label_22;
  1735. }
  1736. Model model3 = param1.get_Model();
  1737. int num4;
  1738. // ISSUE: explicit reference operation
  1739. if (!((Model) @model3).get_IsBicycle())
  1740. {
  1741. num4 = 0;
  1742. goto label_23;
  1743. }
  1744. label_22:
  1745. num4 = 1;
  1746. label_23:
  1747. if (num4 != 0)
  1748. this.\u00360AAA((Vehicle) param1);
  1749. if (num2 > 25.0)
  1750. {
  1751. short num5 = 0;
  1752. do
  1753. {
  1754. Function.Call((Hash) -6509560484236316856L, new InputArgument[2]
  1755. {
  1756. InputArgument.op_Implicit(param1),
  1757. InputArgument.op_Implicit((int) num5)
  1758. });
  1759. ++num5;
  1760. }
  1761. while ((int) num5 <= 6);
  1762. short num6 = 0;
  1763. do
  1764. {
  1765. Function.Call((Hash) -7035926307279134119L, new InputArgument[2]
  1766. {
  1767. InputArgument.op_Implicit(param1),
  1768. InputArgument.op_Implicit((int) num6)
  1769. });
  1770. ++num6;
  1771. }
  1772. while ((int) num6 <= 7);
  1773. Function.Call((Hash) 7882527888856013523L, new InputArgument[1]
  1774. {
  1775. InputArgument.op_Implicit(param1)
  1776. });
  1777. }
  1778. }
  1779. Entity entity = param1;
  1780. Vector3 vector3_4 = Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(Vector3.op_Addition(vector3_3, worldUp), Vector3.Normalize(param1.get_Velocity())), (float) num2), 0.5f);
  1781. // ISSUE: explicit reference operation
  1782. ((Vector3) @vector3_1).\u002Ector(1f, 1f, 1f);
  1783. Vector3 vector3_5 = vector3_1;
  1784. entity.ApplyForce(vector3_4, vector3_5);
  1785. }
  1786. }
  1787. catch (Exception ex)
  1788. {
  1789. ProjectData.SetProjectError(ex);
  1790. ProjectData.ClearProjectError();
  1791. }
  1792. }
  1793.  
  1794. private void \u00360AAA(Vehicle ᙂ)
  1795. {
  1796. short num = -1;
  1797. do
  1798. {
  1799. Ped pedOnSeat = ᙂ.GetPedOnSeat((VehicleSeat) (int) num);
  1800. if (THelper.Exists((Entity) pedOnSeat))
  1801. {
  1802. pedOnSeat.get_Task().ClearAll();
  1803. Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
  1804. {
  1805. InputArgument.op_Implicit(pedOnSeat),
  1806. InputArgument.op_Implicit(ᙂ),
  1807. InputArgument.op_Implicit(4096)
  1808. });
  1809. pedOnSeat.set_CanRagdoll(true);
  1810. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  1811. {
  1812. InputArgument.op_Implicit(pedOnSeat),
  1813. InputArgument.op_Implicit(3000),
  1814. InputArgument.op_Implicit(3000),
  1815. InputArgument.op_Implicit(0),
  1816. InputArgument.op_Implicit(0),
  1817. InputArgument.op_Implicit(0)
  1818. });
  1819. ((Entity) pedOnSeat).ApplyForce(Vector3.op_Addition(Vector3.op_Multiply(((Entity) ᙂ).get_Velocity(), 0.8f), Vector3.op_Multiply(Vector3.get_WorldUp(), 2f)), Vector3.get_WorldNorth());
  1820. }
  1821. ++num;
  1822. }
  1823. while ((int) num <= 7);
  1824. }
  1825.  
  1826. private void \u00370AA0()
  1827. {
  1828. if (DateAndTime.Now.Subtract(this.\u0037BAA0).TotalMilliseconds <= 1000.0)
  1829. return;
  1830. this.\u0037BAA0 = DateAndTime.Now;
  1831. int index = checked (this.\u0036BAAA.Count - 1);
  1832. while (index >= 0)
  1833. {
  1834. try
  1835. {
  1836. if (THelper.Exists(this.\u0036BAAA[index]))
  1837. {
  1838. if ((double) World.GetDistance(this.\u0036BAAA[index].get_Position(), GameplayCamera.get_Position()) > 1000.0)
  1839. this.\u0036BAAA[index].MarkAsNoLongerNeeded();
  1840. }
  1841. }
  1842. catch (Exception ex)
  1843. {
  1844. ProjectData.SetProjectError(ex);
  1845. ProjectData.ClearProjectError();
  1846. }
  1847. checked { index += -1; }
  1848. }
  1849. }
  1850.  
  1851. private void \u00380AAA()
  1852. {
  1853. if (this.\u0036BAAA.Count > 0)
  1854. {
  1855. int index = checked (this.\u0036BAAA.Count - 1);
  1856. while (index >= 0)
  1857. {
  1858. try
  1859. {
  1860. this.\u0036BAAA[index].MarkAsNoLongerNeeded();
  1861. }
  1862. catch (Exception ex)
  1863. {
  1864. ProjectData.SetProjectError(ex);
  1865. ProjectData.ClearProjectError();
  1866. }
  1867. checked { index += -1; }
  1868. }
  1869. this.\u0036BAAA.Clear();
  1870. }
  1871. if (JC2.\u0035BAA0.Count > 0)
  1872. {
  1873. int index = checked (JC2.\u0035BAA0.Count - 1);
  1874. while (index >= 0)
  1875. {
  1876. try
  1877. {
  1878. if (THelper.Exists(JC2.\u0035BAA0[index].p1))
  1879. JC2.\u0035BAA0[index].p1.MarkAsNoLongerNeeded();
  1880. }
  1881. catch (Exception ex)
  1882. {
  1883. ProjectData.SetProjectError(ex);
  1884. ProjectData.ClearProjectError();
  1885. }
  1886. try
  1887. {
  1888. if (THelper.Exists(JC2.\u0035BAA0[index].p2))
  1889. JC2.\u0035BAA0[index].p2.MarkAsNoLongerNeeded();
  1890. }
  1891. catch (Exception ex)
  1892. {
  1893. ProjectData.SetProjectError(ex);
  1894. ProjectData.ClearProjectError();
  1895. }
  1896. checked { index += -1; }
  1897. }
  1898. JC2.\u0035BAA0.Clear();
  1899. }
  1900. if (JC2.CA0A0.Count <= 0)
  1901. return;
  1902. int index1 = checked (JC2.CA0A0.Count - 1);
  1903. while (index1 >= 0)
  1904. {
  1905. JC2.CA0A0[index1].remove();
  1906. checked { index1 += -1; }
  1907. }
  1908. }
  1909.  
  1910. private Entity \u00390AA0(Vector3 ᙂ, ref Vector3 \u0031AAAA)
  1911. {
  1912. bool flag1 = false;
  1913. Entity e1 = (Entity) null;
  1914. param1 = Vector3.get_Zero();
  1915. this.\u0039BAA0.Clear();
  1916. try
  1917. {
  1918. foreach (Entity e2 in this.\u0033EAA0)
  1919. {
  1920. try
  1921. {
  1922. if (THelper.Exists(e2))
  1923. {
  1924. Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
  1925. {
  1926. InputArgument.op_Implicit(e2),
  1927. InputArgument.op_Implicit(true)
  1928. });
  1929. if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
  1930. {
  1931. InputArgument.op_Implicit(e2),
  1932. InputArgument.op_Implicit(Game.get_Player().get_Character())
  1933. }))
  1934. {
  1935. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  1936. {
  1937. InputArgument.op_Implicit(e2)
  1938. });
  1939. int num;
  1940. if (!flag1)
  1941. {
  1942. if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
  1943. {
  1944. InputArgument.op_Implicit(e2)
  1945. }) != null)
  1946. {
  1947. num = 1;
  1948. goto label_9;
  1949. }
  1950. }
  1951. num = 0;
  1952. label_9:
  1953. if (num != 0)
  1954. {
  1955. Model model = e2.get_Model();
  1956. // ISSUE: explicit reference operation
  1957. if (((Model) @model).get_IsVehicle() && Entity.op_Inequality(e2, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  1958. {
  1959. e1 = e2;
  1960. break;
  1961. }
  1962. }
  1963. }
  1964. }
  1965. }
  1966. catch (Exception ex)
  1967. {
  1968. ProjectData.SetProjectError(ex);
  1969. ProjectData.ClearProjectError();
  1970. }
  1971. }
  1972. }
  1973. finally
  1974. {
  1975. List<Entity>.Enumerator enumerator;
  1976. enumerator.Dispose();
  1977. }
  1978. if (!THelper.Exists(e1))
  1979. {
  1980. Vehicle[] nearbyVehicles = World.GetNearbyVehicles(Game.get_Player().get_Character(), 100f);
  1981. int index = 0;
  1982. while (index < nearbyVehicles.Length)
  1983. {
  1984. Vehicle vehicle = nearbyVehicles[index];
  1985. try
  1986. {
  1987. if (THelper.Exists((Entity) vehicle))
  1988. {
  1989. Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
  1990. {
  1991. InputArgument.op_Implicit(vehicle),
  1992. InputArgument.op_Implicit(true)
  1993. });
  1994. if (!this.\u0039BAA0.Contains((Entity) vehicle))
  1995. this.\u0039BAA0.Add((Entity) vehicle);
  1996. if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
  1997. {
  1998. InputArgument.op_Implicit(vehicle),
  1999. InputArgument.op_Implicit(Game.get_Player().get_Character())
  2000. }))
  2001. {
  2002. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  2003. {
  2004. InputArgument.op_Implicit(vehicle)
  2005. });
  2006. int num1;
  2007. if (!flag1)
  2008. {
  2009. if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
  2010. {
  2011. InputArgument.op_Implicit(vehicle)
  2012. }) != null)
  2013. {
  2014. double distance = (double) World.GetDistance(((Entity) vehicle).get_Position(), ᙂ);
  2015. Model model = ((Entity) vehicle).get_Model();
  2016. // ISSUE: explicit reference operation
  2017. Vector3 dimensions = ((Model) @model).GetDimensions();
  2018. // ISSUE: explicit reference operation
  2019. double num2 = (double) ((Vector3) @dimensions).Length() * 0.5;
  2020. if (distance < num2)
  2021. {
  2022. num1 = 1;
  2023. goto label_30;
  2024. }
  2025. }
  2026. }
  2027. num1 = 0;
  2028. label_30:
  2029. if (num1 != 0 && Entity.op_Inequality((Entity) vehicle, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  2030. {
  2031. e1 = (Entity) vehicle;
  2032. param1 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
  2033. {
  2034. InputArgument.op_Implicit(vehicle),
  2035. InputArgument.op_Implicit((float) ᙂ.X),
  2036. InputArgument.op_Implicit((float) ᙂ.Y),
  2037. InputArgument.op_Implicit((float) ᙂ.Z)
  2038. });
  2039. flag1 = true;
  2040. }
  2041. }
  2042. }
  2043. }
  2044. catch (Exception ex)
  2045. {
  2046. ProjectData.SetProjectError(ex);
  2047. ProjectData.ClearProjectError();
  2048. }
  2049. checked { ++index; }
  2050. }
  2051. }
  2052. if (!THelper.Exists(e1))
  2053. {
  2054. bool flag2 = false;
  2055. Ped[] nearbyPeds = World.GetNearbyPeds(Game.get_Player().get_Character(), 100f);
  2056. int index = 0;
  2057. while (index < nearbyPeds.Length)
  2058. {
  2059. Ped ped = nearbyPeds[index];
  2060. try
  2061. {
  2062. if (THelper.Exists((Entity) ped) && ((Entity) ped).get_Health() >= 0)
  2063. {
  2064. Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
  2065. {
  2066. InputArgument.op_Implicit(ped),
  2067. InputArgument.op_Implicit(true)
  2068. });
  2069. if (!this.\u0039BAA0.Contains((Entity) ped))
  2070. this.\u0039BAA0.Add((Entity) ped);
  2071. if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
  2072. {
  2073. InputArgument.op_Implicit(ped),
  2074. InputArgument.op_Implicit(Game.get_Player().get_Character())
  2075. }))
  2076. {
  2077. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  2078. {
  2079. InputArgument.op_Implicit(ped)
  2080. });
  2081. int num;
  2082. if (!flag2)
  2083. {
  2084. if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
  2085. {
  2086. InputArgument.op_Implicit(ped)
  2087. }) != null && (double) World.GetDistance(((Entity) ped).get_Position(), ᙂ) < 2.0)
  2088. {
  2089. num = 1;
  2090. goto label_48;
  2091. }
  2092. }
  2093. num = 0;
  2094. label_48:
  2095. if (num != 0 && !THelper.Exists((Entity) ped.get_CurrentVehicle()))
  2096. {
  2097. e1 = (Entity) ped;
  2098. // ISSUE: explicit reference operation
  2099. ((Vector3) @param1).\u002Ector(0.0f, 0.0f, -0.25f);
  2100. flag2 = true;
  2101. }
  2102. }
  2103. }
  2104. }
  2105. catch (Exception ex)
  2106. {
  2107. ProjectData.SetProjectError(ex);
  2108. ProjectData.ClearProjectError();
  2109. }
  2110. checked { ++index; }
  2111. }
  2112. }
  2113. if (!THelper.Exists(e1))
  2114. e1 = Game.get_Player().GetTargetedEntity();
  2115. if (Entity.op_Equality(e1, (Entity) Game.get_Player().get_Character()) || Entity.op_Equality(e1, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  2116. e1 = (Entity) null;
  2117. return e1;
  2118. }
  2119.  
  2120. private Rope B0AAA(Entity ᙂ, Prop \u0031AAAA, Vector3 ᙄ = null, Vector3 \u0033AAAA = null)
  2121. {
  2122. Rope ᙂ1 = (Rope) null;
  2123. Vector3 ᙄ1;
  2124. if (THelper.Exists(ᙂ))
  2125. {
  2126. ᙂ.get_Position();
  2127. ᙂ1 = JC2.createRope((Entity) Game.get_Player().get_Character(), ᙂ, 0.4, 0.0, (Bone) -1);
  2128. if (THelper.Exists((Entity) param1))
  2129. {
  2130. this.\u0038AAAA(ᙂ1, (Entity) param1, param3);
  2131. }
  2132. else
  2133. {
  2134. Vector3 vector3 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2135. {
  2136. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2137. InputArgument.op_Implicit(28422),
  2138. InputArgument.op_Implicit(0),
  2139. InputArgument.op_Implicit(0),
  2140. InputArgument.op_Implicit(0)
  2141. });
  2142. vector3.Z = (__Null) (double) ((float) (double) vector3.Z + 0.01f);
  2143. this.\u0038AAAA(ᙂ1, (Entity) Game.get_Player().get_Character(), ᙄ1);
  2144. }
  2145. }
  2146. else if (Vector3.op_Inequality(ᙄ, ᙄ1))
  2147. {
  2148. Vector3 pos2 = ᙄ;
  2149. ᙂ1 = JC2.createRope(((Entity) Game.get_Player().get_Character()).get_Position(), pos2, 0.4, 0.0, (Bone) -1);
  2150. int num = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
  2151. {
  2152. InputArgument.op_Implicit(ᙂ1.get_Handle())
  2153. }) - 1);
  2154. if (THelper.Exists((Entity) param1))
  2155. {
  2156. this.\u0038AAAA(ᙂ1, (Entity) param1, param3);
  2157. }
  2158. else
  2159. {
  2160. Vector3 vector3 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2161. {
  2162. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2163. InputArgument.op_Implicit(28422),
  2164. InputArgument.op_Implicit(0),
  2165. InputArgument.op_Implicit(0),
  2166. InputArgument.op_Implicit(0)
  2167. });
  2168. vector3.Z = (__Null) (double) ((float) (double) vector3.Z + 0.01f);
  2169. this.\u0038AAAA(ᙂ1, (Entity) Game.get_Player().get_Character(), ᙄ1);
  2170. }
  2171. Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
  2172. {
  2173. InputArgument.op_Implicit(ᙂ1.get_Handle()),
  2174. InputArgument.op_Implicit(num),
  2175. InputArgument.op_Implicit((float) pos2.X),
  2176. InputArgument.op_Implicit((float) pos2.Y),
  2177. InputArgument.op_Implicit((float) pos2.Z)
  2178. });
  2179. }
  2180. return ᙂ1;
  2181. }
  2182.  
  2183. private bool C0AA0()
  2184. {
  2185. if (!THelper.Exists((Entity) this.BBAAA))
  2186. {
  2187. // ISSUE: explicit reference operation
  2188. ((Model) @JC2.CBAA0).\u002Ector((int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
  2189. {
  2190. InputArgument.op_Implicit(this.\u0030CAAA)
  2191. }));
  2192. // ISSUE: explicit reference operation
  2193. ((Model) @JC2.CBAA0).Request();
  2194. DateTime now = DateAndTime.Now;
  2195. // ISSUE: explicit reference operation
  2196. while (!((Model) @JC2.CBAA0).get_IsLoaded() & DateAndTime.Now.Subtract(now).TotalMilliseconds < 500.0)
  2197. Script.Wait(50);
  2198. this.BBAAA = World.CreateProp(JC2.CBAA0, Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 49f)), true, false);
  2199. }
  2200. return THelper.Exists((Entity) this.BBAAA);
  2201. }
  2202.  
  2203. private void \u00301AAA()
  2204. {
  2205. if (!THelper.Exists((Entity) this.BBAAA))
  2206. return;
  2207. ((Entity) this.BBAAA).set_IsVisible(false);
  2208. Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
  2209. {
  2210. InputArgument.op_Implicit(this.BBAAA),
  2211. InputArgument.op_Implicit(false),
  2212. InputArgument.op_Implicit(false)
  2213. });
  2214. Function.Call((Hash) 7753999234533660383L, new InputArgument[15]
  2215. {
  2216. InputArgument.op_Implicit(this.BBAAA),
  2217. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2218. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
  2219. InputArgument.op_Implicit(0),
  2220. InputArgument.op_Implicit(0.05),
  2221. InputArgument.op_Implicit(-1.075),
  2222. InputArgument.op_Implicit(0),
  2223. InputArgument.op_Implicit(0),
  2224. InputArgument.op_Implicit(0),
  2225. InputArgument.op_Implicit(false),
  2226. InputArgument.op_Implicit(false),
  2227. InputArgument.op_Implicit(false),
  2228. InputArgument.op_Implicit(false),
  2229. InputArgument.op_Implicit(0),
  2230. InputArgument.op_Implicit(false)
  2231. });
  2232. }
  2233.  
  2234. private void \u00311AA0()
  2235. {
  2236. if (!THelper.Exists((Entity) this.BBAAA))
  2237. return;
  2238. ((Entity) this.BBAAA).Detach();
  2239. ((Entity) this.BBAAA).Delete();
  2240. this.BBAAA = (Prop) null;
  2241. }
  2242.  
  2243. private void \u00321AAA(Entity ᙂ, ref Vector3 \u0031AAAA = null, Vector3 ᙄ = null)
  2244. {
  2245. Vector3 vector3_1;
  2246. if (!THelper.Exists(ᙂ) && Vector3.op_Equality(param1, vector3_1))
  2247. return;
  2248. this.C0AA0();
  2249. Script.Wait(50);
  2250. this.\u00301AAA();
  2251. if (Vector3.op_Inequality(param1, vector3_1))
  2252. {
  2253. Vector3 vector3_2 = param1;
  2254. Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  2255. double num = 0.05;
  2256. Vector3 pos1 = Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction, (float) num));
  2257. Vector3 vector3_3;
  2258. while (true)
  2259. {
  2260. // ISSUE: explicit reference operation
  2261. // ISSUE: variable of a reference type
  2262. Vector3& local = @vector3_2;
  2263. vector3_3 = THelper.getGroundPos(Vector3.op_Addition(pos1, Vector3.op_Multiply(Vector3.get_WorldUp(), 100f)));
  2264. // ISSUE: variable of the null type
  2265. __Null z = vector3_3.Z;
  2266. // ISSUE: explicit reference operation
  2267. (^local).Z = z;
  2268. // ISSUE: explicit reference operation
  2269. if (vector3_2.Z >= param1.Z && (double) ((Vector3) @vector3_2).DistanceTo(param1) < 2.0)
  2270. {
  2271. param1 = vector3_2;
  2272. break;
  2273. }
  2274. vector3_2 = param1;
  2275. pos1 = Vector3.op_Addition(pos1, Vector3.op_Multiply(direction, (float) num));
  2276. if (THelper.getDistance2D(pos1, param1) > 3.0)
  2277. break;
  2278. }
  2279. param1 = Vector3.op_Addition(param1, Vector3.op_Multiply(Vector3.get_WorldUp(), 0.8f));
  2280. if (this.\u0032CAAA != null)
  2281. {
  2282. this.\u0032CAAA.Delete();
  2283. this.\u0032CAAA = (Rope) null;
  2284. }
  2285. Entity ᙂ1 = ᙂ;
  2286. Prop bbaaa = this.BBAAA;
  2287. Vector3 ᙄ1 = vector3_2;
  2288. // ISSUE: explicit reference operation
  2289. ((Vector3) @vector3_3).\u002Ector(-0.05f, -0.05f, 1.1f);
  2290. Vector3 vector3_4 = vector3_3;
  2291. this.\u0032CAAA = this.B0AAA(ᙂ1, bbaaa, ᙄ1, vector3_4);
  2292. this.\u0031CAA0 = (int) THelper.getParachuteState() < 1;
  2293. this.\u0034CAAA = !this.\u0031CAA0;
  2294. this.\u0035CAA0 = vector3_2;
  2295. this.\u0036CAAA = ᙂ;
  2296. if (THelper.Exists(ᙂ))
  2297. {
  2298. vector3_3 = ᙂ.get_Position();
  2299. // ISSUE: explicit reference operation
  2300. this.\u0037CAA0 = (double) ((Vector3) @vector3_3).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
  2301. }
  2302. else
  2303. {
  2304. // ISSUE: explicit reference operation
  2305. this.\u0037CAA0 = (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
  2306. }
  2307. }
  2308. else if (Entity.op_Inequality(ᙂ, (Entity) null))
  2309. {
  2310. if (this.\u0032CAAA != null)
  2311. {
  2312. this.\u0032CAAA.Delete();
  2313. this.\u0032CAAA = (Rope) null;
  2314. }
  2315. Entity ᙂ1 = ᙂ;
  2316. Prop bbaaa = this.BBAAA;
  2317. Vector3 ᙄ1 = vector3_1;
  2318. Vector3 vector3_2;
  2319. // ISSUE: explicit reference operation
  2320. ((Vector3) @vector3_2).\u002Ector(0.0f, 0.0f, 1.15f);
  2321. Vector3 vector3_3 = Vector3.op_Addition(vector3_2, ᙄ);
  2322. this.\u0032CAAA = this.B0AAA(ᙂ1, bbaaa, ᙄ1, vector3_3);
  2323. this.\u0031CAA0 = (int) THelper.getParachuteState() < 1;
  2324. this.\u0034CAAA = !this.\u0031CAA0;
  2325. this.\u0035CAA0 = Vector3.get_Zero();
  2326. this.\u0036CAAA = ᙂ;
  2327. if (THelper.Exists(ᙂ))
  2328. {
  2329. Vector3 position = ᙂ.get_Position();
  2330. // ISSUE: explicit reference operation
  2331. this.\u0037CAA0 = (double) ((Vector3) @position).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
  2332. }
  2333. else
  2334. {
  2335. // ISSUE: explicit reference operation
  2336. this.\u0037CAA0 = (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
  2337. }
  2338. }
  2339. }
  2340.  
  2341. private void \u00331AA0(bool ᙂ = false)
  2342. {
  2343. ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
  2344. if (this.\u0031CAA0)
  2345. {
  2346. THelper.play3DSound(".\\scripts\\jc3 files\\hook_end.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
  2347. if (ᙂ)
  2348. {
  2349. Vector3 direction = THelper.HeadingToDirection(this.BDAAA);
  2350. direction.Z = (__Null) 0.0;
  2351. RaycastResult raycastResult = World.Raycast(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 1f)), (IntersectOptions) 1, (Entity) Game.get_Player().get_Character());
  2352. // ISSUE: explicit reference operation
  2353. if (!((RaycastResult) @raycastResult).get_DitHitAnything())
  2354. {
  2355. ((Entity) Game.get_Player().get_Character()).set_FreezePosition(true);
  2356. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  2357. Script.Wait(10);
  2358. raycastResult = World.Raycast(Vector3.op_Subtraction(Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.5f)), Vector3.op_Multiply(direction, 2f)), Vector3.op_Addition(Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.5f)), Vector3.op_Multiply(direction, 3f)), (IntersectOptions) 1, (Entity) Game.get_Player().get_Character());
  2359. bool flag1 = false;
  2360. bool flag2 = true;
  2361. // ISSUE: explicit reference operation
  2362. if (!((RaycastResult) @raycastResult).get_DitHitAnything())
  2363. {
  2364. raycastResult = World.Raycast(Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 0.5f)), Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 2f)), (IntersectOptions) 1, (Entity) Game.get_Player().get_Character());
  2365. // ISSUE: explicit reference operation
  2366. flag1 = ((RaycastResult) @raycastResult).get_DitHitAnything();
  2367. }
  2368. THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation());
  2369. // ISSUE: explicit reference operation
  2370. if (flag2 && ((RaycastResult) @raycastResult).get_DitHitAnything())
  2371. {
  2372. this.\u00341AAA();
  2373. // ISSUE: explicit reference operation
  2374. Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(((RaycastResult) @raycastResult).get_HitCoords(), ((Entity) Game.get_Player().get_Character()).get_Position()));
  2375. dir.Z = (__Null) 0.0;
  2376. ((Entity) Game.get_Player().get_Character()).set_Rotation(THelper.directionToRotation(dir, 0.0));
  2377. if (flag1)
  2378. {
  2379. this.BCAAA = "michael_meat_hook_react_c";
  2380. this.CCAA0 = this.\u0038CAAA.dict;
  2381. this.\u0030DAAA = 0.539;
  2382. // ISSUE: explicit reference operation
  2383. ((Entity) Game.get_Player().get_Character()).set_Position(Vector3.op_Addition(((RaycastResult) @raycastResult).get_HitCoords(), Vector3.op_Multiply(Vector3.get_WorldDown(), 2f)));
  2384. }
  2385. else
  2386. {
  2387. this.BCAAA = "Rappel_Jump_a";
  2388. this.CCAA0 = this.\u0039CAA0.dict;
  2389. this.\u0030DAAA = 0.969;
  2390. // ISSUE: explicit reference operation
  2391. ((Entity) Game.get_Player().get_Character()).set_Position(Vector3.op_Addition(Vector3.op_Subtraction(((RaycastResult) @raycastResult).get_HitCoords(), Vector3.op_Multiply(direction, 0.55f)), Vector3.op_Multiply(Vector3.get_WorldDown(), 1.5f)));
  2392. }
  2393. THelper.anim_playPedAnim(this.CCAA0, this.BCAAA, 8.0, THelper.animFlags.normal, false);
  2394. while (!THelper.anim_isPlayingPedAnim(this.CCAA0, this.BCAAA, 1.0))
  2395. Script.Wait(10);
  2396. THelper.anim_setAnimSpeed(this.CCAA0, this.BCAAA, 0.0);
  2397. THelper.anim_setAnimTime(this.CCAA0, this.BCAAA, this.\u0030DAAA);
  2398. Script.Wait(100);
  2399. this.\u0031CAA0 = false;
  2400. this.\u0031DAA0 = true;
  2401. if (this.\u0032CAAA != null)
  2402. {
  2403. this.\u0032CAAA.Delete();
  2404. this.\u0032CAAA = (Rope) null;
  2405. }
  2406. this.\u00311AA0();
  2407. Vector3 pos1;
  2408. Vector3 pos2;
  2409. if (flag1)
  2410. {
  2411. pos1 = Vector3.op_Addition(Vector3.op_Addition(Game.get_Player().get_Character().GetBoneCoord((Bone) 51826), Vector3.op_Multiply(THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()), 0.17f)), Vector3.op_Multiply(Vector3.get_WorldDown(), 0.65f));
  2412. // ISSUE: explicit reference operation
  2413. pos2 = Vector3.op_Addition(Vector3.op_Addition(((RaycastResult) @raycastResult).get_HitCoords(), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.2f)), Vector3.op_Multiply(THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()), 0.45f));
  2414. }
  2415. else
  2416. {
  2417. pos1 = Vector3.op_Addition(Vector3.op_Addition(Game.get_Player().get_Character().GetBoneCoord((Bone) 0), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.89f)), Vector3.op_Multiply(THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()), 0.38f));
  2418. // ISSUE: explicit reference operation
  2419. pos2 = Vector3.op_Addition(Vector3.op_Addition(((RaycastResult) @raycastResult).get_HitCoords(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1.2f)), Vector3.op_Multiply(direction, 0.5f));
  2420. }
  2421. // ISSUE: explicit reference operation
  2422. double forcedDist = (double) ((Vector3) @pos1).DistanceTo(pos2) * 0.5;
  2423. this.\u0032CAAA = JC2.createRope(pos1, pos2, 1.0, forcedDist, (Bone) -1);
  2424. int num1 = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
  2425. {
  2426. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle())
  2427. }) - 1);
  2428. Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
  2429. {
  2430. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  2431. InputArgument.op_Implicit(num1),
  2432. InputArgument.op_Implicit((float) pos1.X),
  2433. InputArgument.op_Implicit((float) pos1.Y),
  2434. InputArgument.op_Implicit((float) pos1.Z)
  2435. });
  2436. Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
  2437. {
  2438. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  2439. InputArgument.op_Implicit(0),
  2440. InputArgument.op_Implicit((float) pos2.X),
  2441. InputArgument.op_Implicit((float) pos2.Y),
  2442. InputArgument.op_Implicit((float) pos2.Z)
  2443. });
  2444. if (flag1)
  2445. return;
  2446. Vector3 vector3 = Vector3.op_Division(Vector3.Normalize(Vector3.op_Subtraction(pos2, pos1)), (float) checked (num1 - 1));
  2447. pos2 = pos1;
  2448. int num2 = 0;
  2449. int num3 = checked (num1 - 2);
  2450. int num4 = num2;
  2451. while (num4 <= num3)
  2452. {
  2453. Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
  2454. {
  2455. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  2456. InputArgument.op_Implicit(num4),
  2457. InputArgument.op_Implicit((float) pos2.X),
  2458. InputArgument.op_Implicit((float) pos2.Y),
  2459. InputArgument.op_Implicit((float) pos2.Z)
  2460. });
  2461. pos2 = Vector3.op_Addition(pos2, vector3);
  2462. checked { ++num4; }
  2463. }
  2464. return;
  2465. }
  2466. ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
  2467. this.\u0031DAA0 = false;
  2468. ((Entity) Game.get_Player().get_Character()).ResetAlpha();
  2469. if (!flag2)
  2470. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Subtraction(((Entity) Game.get_Player().get_Character()).get_Position(), this.\u0039DAA0));
  2471. }
  2472. this.\u0031DAA0 = false;
  2473. ((Entity) Game.get_Player().get_Character()).ResetAlpha();
  2474. this.\u00341AAA();
  2475. Game.get_Player().get_Character().set_CanRagdoll(false);
  2476. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  2477. if (THelper.anim_requestDict(this.B7AAA))
  2478. {
  2479. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 8.0, THelper.animFlags.normal, false);
  2480. Script.Wait(100);
  2481. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 2.0);
  2482. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 0.35))
  2483. Script.Wait(100);
  2484. Game.get_Player().get_Character().get_Task().ClearAnimation(this.B7AAA, this.C7AA0);
  2485. }
  2486. Game.get_Player().get_Character().set_CanRagdoll(true);
  2487. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
  2488. }
  2489. else
  2490. {
  2491. this.\u00341AAA();
  2492. ((Entity) Game.get_Player().get_Character()).ResetAlpha();
  2493. this.\u0031DAA0 = false;
  2494. }
  2495. }
  2496. }
  2497.  
  2498. private void \u00341AAA()
  2499. {
  2500. this.\u0031CAA0 = false;
  2501. this.\u00311AA0();
  2502. if (this.\u0032CAAA == null)
  2503. return;
  2504. this.\u0032CAAA.Delete();
  2505. this.\u0032CAAA = (Rope) null;
  2506. }
  2507.  
  2508. private void \u00351AA0(Entity ᙂ, Vector3 \u0031AAAA = null)
  2509. {
  2510. try
  2511. {
  2512. this.\u0031BAA0 = (Vector3) null;
  2513. this.\u0038DAAA = (Entity) null;
  2514. this.\u00371AA0();
  2515. Vector3 vector3_1;
  2516. if (!THelper.Exists(ᙂ) && Vector3.op_Equality(param1, vector3_1) || THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()) || ((Entity) Game.get_Player().get_Character()).IsAttached() && (int) THelper.getParachuteState() == -1)
  2517. this.\u00331AA0(false);
  2518. else if (THelper.Exists(ᙂ) && (double) World.GetDistance(ᙂ.get_Position(), ((Entity) Game.get_Player().get_Character()).get_Position()) < 5.0 || (double) World.GetDistance(param1, ((Entity) Game.get_Player().get_Character()).get_Position()) < 5.0)
  2519. {
  2520. this.\u00331AA0(false);
  2521. }
  2522. else
  2523. {
  2524. DateTime now1 = DateAndTime.Now;
  2525. Prop prop1 = (Prop) null;
  2526. if (this.\u0035DAA0)
  2527. prop1 = this.BBAAA;
  2528. double heading = (double) ((Entity) Game.get_Player().get_Character()).get_Heading();
  2529. DateTime now2;
  2530. if ((!((Entity) Game.get_Player().get_Character()).get_IsInAir() || this.\u00359AA0) && (!this.\u0033CAA0 && !this.\u0031DAA0) && THelper.anim_requestDict(this.\u00387AAA))
  2531. {
  2532. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 8.0, THelper.animFlags.normal, false);
  2533. Script.Wait(100);
  2534. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 1.5);
  2535. DateTime now3 = DateAndTime.Now;
  2536. while (true)
  2537. {
  2538. int num1 = THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 0.55) ? 1 : 0;
  2539. now2 = DateAndTime.Now;
  2540. int num2 = now2.Subtract(now3).TotalMilliseconds < 1000.0 ? 1 : 0;
  2541. if ((num1 & num2) != 0)
  2542. {
  2543. ((Entity) Game.get_Player().get_Character()).ApplyForce(Vector3.get_WorldUp());
  2544. Script.Wait(10);
  2545. }
  2546. else
  2547. break;
  2548. }
  2549. }
  2550. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  2551. if (Game.get_Player().get_Character().get_IsRagdoll() || ((Entity) Game.get_Player().get_Character()).get_IsInAir())
  2552. {
  2553. Game.get_Player().get_Character().set_CanRagdoll(false);
  2554. Game.get_Player().get_Character().set_CanRagdoll(true);
  2555. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  2556. }
  2557. List<Prop> propList = new List<Prop>();
  2558. Prop prop2 = (Prop) null;
  2559. Prop prop3 = (Prop) null;
  2560. Prop prop4 = (Prop) null;
  2561. if (this.\u0035DAA0)
  2562. {
  2563. prop2 = World.CreateProp(JC2.CBAA0, Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), true, false);
  2564. prop3 = World.CreateProp(JC2.CBAA0, Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 51f)), true, false);
  2565. prop4 = World.CreateProp(JC2.CBAA0, Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 52f)), true, false);
  2566. }
  2567. if (THelper.Exists((Entity) prop2))
  2568. {
  2569. propList.Add(prop2);
  2570. ((Entity) prop2).set_IsVisible(false);
  2571. }
  2572. if (THelper.Exists((Entity) prop1))
  2573. {
  2574. propList.Add(prop1);
  2575. ((Entity) prop1).set_IsVisible(false);
  2576. }
  2577. if (THelper.Exists((Entity) prop3))
  2578. {
  2579. propList.Add(prop3);
  2580. ((Entity) prop3).set_IsVisible(false);
  2581. }
  2582. if (THelper.Exists((Entity) prop4))
  2583. {
  2584. propList.Add(prop4);
  2585. ((Entity) prop4).set_IsVisible(false);
  2586. }
  2587. if (!this.\u0035DAA0 && THelper.anim_requestDict(this.\u00328AAA))
  2588. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00328AAA, this.\u00338AA0, 6.0, THelper.animFlags.repeat, true);
  2589. if (THelper.Exists((Entity) prop2))
  2590. {
  2591. try
  2592. {
  2593. foreach (Prop prop5 in propList)
  2594. {
  2595. try
  2596. {
  2597. ((Entity) prop5).set_IsVisible(false);
  2598. Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
  2599. {
  2600. InputArgument.op_Implicit(prop5),
  2601. InputArgument.op_Implicit(false),
  2602. InputArgument.op_Implicit(false)
  2603. });
  2604. }
  2605. catch (Exception ex)
  2606. {
  2607. ProjectData.SetProjectError(ex);
  2608. ProjectData.ClearProjectError();
  2609. }
  2610. }
  2611. }
  2612. finally
  2613. {
  2614. List<Prop>.Enumerator enumerator;
  2615. enumerator.Dispose();
  2616. }
  2617. Game.get_Player().get_Character().set_CanRagdoll(true);
  2618. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  2619. {
  2620. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2621. InputArgument.op_Implicit(-1),
  2622. InputArgument.op_Implicit(-1),
  2623. InputArgument.op_Implicit(0),
  2624. InputArgument.op_Implicit(0),
  2625. InputArgument.op_Implicit(0)
  2626. });
  2627. Script.Wait(200);
  2628. ((Entity) prop2).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2629. {
  2630. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2631. InputArgument.op_Implicit(31086),
  2632. InputArgument.op_Implicit(0),
  2633. InputArgument.op_Implicit(0),
  2634. InputArgument.op_Implicit(0)
  2635. }));
  2636. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  2637. {
  2638. InputArgument.op_Implicit(prop2),
  2639. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2640. InputArgument.op_Implicit(0),
  2641. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 31086)),
  2642. InputArgument.op_Implicit(0),
  2643. InputArgument.op_Implicit(0),
  2644. InputArgument.op_Implicit(0),
  2645. InputArgument.op_Implicit(0),
  2646. InputArgument.op_Implicit(0),
  2647. InputArgument.op_Implicit(0),
  2648. InputArgument.op_Implicit(0),
  2649. InputArgument.op_Implicit(0),
  2650. InputArgument.op_Implicit(0),
  2651. InputArgument.op_Implicit(0),
  2652. InputArgument.op_Implicit(false),
  2653. InputArgument.op_Implicit(false),
  2654. InputArgument.op_Implicit(false),
  2655. InputArgument.op_Implicit(false),
  2656. InputArgument.op_Implicit(0)
  2657. });
  2658. if (THelper.Exists((Entity) prop1))
  2659. {
  2660. ((Entity) prop1).Detach();
  2661. ((Entity) prop1).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2662. {
  2663. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2664. InputArgument.op_Implicit(28422),
  2665. InputArgument.op_Implicit(0),
  2666. InputArgument.op_Implicit(0),
  2667. InputArgument.op_Implicit(0)
  2668. }));
  2669. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  2670. {
  2671. InputArgument.op_Implicit(prop1),
  2672. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2673. InputArgument.op_Implicit(0),
  2674. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
  2675. InputArgument.op_Implicit(0),
  2676. InputArgument.op_Implicit(0),
  2677. InputArgument.op_Implicit(0),
  2678. InputArgument.op_Implicit(0),
  2679. InputArgument.op_Implicit(0),
  2680. InputArgument.op_Implicit(0),
  2681. InputArgument.op_Implicit(0),
  2682. InputArgument.op_Implicit(0),
  2683. InputArgument.op_Implicit(0),
  2684. InputArgument.op_Implicit(0),
  2685. InputArgument.op_Implicit(false),
  2686. InputArgument.op_Implicit(false),
  2687. InputArgument.op_Implicit(false),
  2688. InputArgument.op_Implicit(false),
  2689. InputArgument.op_Implicit(0)
  2690. });
  2691. }
  2692. if (THelper.Exists((Entity) prop3))
  2693. {
  2694. ((Entity) prop3).set_Position(Vector3.op_Addition((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2695. {
  2696. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2697. InputArgument.op_Implicit(57717),
  2698. InputArgument.op_Implicit(0),
  2699. InputArgument.op_Implicit(0),
  2700. InputArgument.op_Implicit(0)
  2701. }), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.1f)));
  2702. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  2703. {
  2704. InputArgument.op_Implicit(prop3),
  2705. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2706. InputArgument.op_Implicit(0),
  2707. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 57717)),
  2708. InputArgument.op_Implicit(0),
  2709. InputArgument.op_Implicit(0),
  2710. InputArgument.op_Implicit(0),
  2711. InputArgument.op_Implicit(0),
  2712. InputArgument.op_Implicit(0),
  2713. InputArgument.op_Implicit(0),
  2714. InputArgument.op_Implicit(0),
  2715. InputArgument.op_Implicit(0),
  2716. InputArgument.op_Implicit(0),
  2717. InputArgument.op_Implicit(0),
  2718. InputArgument.op_Implicit(false),
  2719. InputArgument.op_Implicit(false),
  2720. InputArgument.op_Implicit(false),
  2721. InputArgument.op_Implicit(false),
  2722. InputArgument.op_Implicit(0)
  2723. });
  2724. }
  2725. if (THelper.Exists((Entity) prop4))
  2726. {
  2727. ((Entity) prop4).set_Position(Vector3.op_Addition((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  2728. {
  2729. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2730. InputArgument.op_Implicit(24806),
  2731. InputArgument.op_Implicit(0),
  2732. InputArgument.op_Implicit(0),
  2733. InputArgument.op_Implicit(0)
  2734. }), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.1f)));
  2735. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  2736. {
  2737. InputArgument.op_Implicit(prop4),
  2738. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2739. InputArgument.op_Implicit(0),
  2740. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 24806)),
  2741. InputArgument.op_Implicit(0),
  2742. InputArgument.op_Implicit(0),
  2743. InputArgument.op_Implicit(0),
  2744. InputArgument.op_Implicit(0),
  2745. InputArgument.op_Implicit(0),
  2746. InputArgument.op_Implicit(0),
  2747. InputArgument.op_Implicit(0),
  2748. InputArgument.op_Implicit(0),
  2749. InputArgument.op_Implicit(0),
  2750. InputArgument.op_Implicit(0),
  2751. InputArgument.op_Implicit(false),
  2752. InputArgument.op_Implicit(false),
  2753. InputArgument.op_Implicit(false),
  2754. InputArgument.op_Implicit(false),
  2755. InputArgument.op_Implicit(0)
  2756. });
  2757. }
  2758. }
  2759. if (THelper.Exists(ᙂ))
  2760. param1 = ᙂ.get_Position();
  2761. this.\u0039DAA0 = param1;
  2762. Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(param1, ((Entity) Game.get_Player().get_Character()).get_Position()));
  2763. Vector3 vector3_2 = Vector3.op_Addition(param1, dir);
  2764. double distance1 = (double) World.GetDistance(((Entity) Game.get_Player().get_Character()).get_Position(), param1);
  2765. double distance2 = (double) World.GetDistance(((Entity) Game.get_Player().get_Character()).get_Position(), vector3_2);
  2766. Game.get_Player().get_Character().set_CanRagdoll(true);
  2767. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, true, true, false, false, false);
  2768. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  2769. {
  2770. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2771. InputArgument.op_Implicit(false)
  2772. });
  2773. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  2774. {
  2775. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2776. InputArgument.op_Implicit(true)
  2777. });
  2778. if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
  2779. {
  2780. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  2781. {
  2782. InputArgument.op_Implicit(this.BBAAA),
  2783. InputArgument.op_Implicit(false)
  2784. });
  2785. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  2786. {
  2787. InputArgument.op_Implicit(this.BBAAA),
  2788. InputArgument.op_Implicit(true)
  2789. });
  2790. }
  2791. Vector3 vector3_3;
  2792. if (!this.\u0035DAA0)
  2793. {
  2794. ((Entity) this.BBAAA).Detach();
  2795. Vector3 rotation = ((Entity) Game.get_Player().get_Character()).get_Rotation();
  2796. rotation.X = (__Null) (rotation.X + 90.0);
  2797. ((Entity) this.BBAAA).set_Rotation(rotation);
  2798. Ped character = Game.get_Player().get_Character();
  2799. Prop bbaaa = this.BBAAA;
  2800. int num = 0;
  2801. // ISSUE: explicit reference operation
  2802. ((Vector3) @vector3_3).\u002Ector(0.1f, 0.11f, -1.2f);
  2803. Vector3 vector3_4 = vector3_3;
  2804. Vector3 zero = Vector3.get_Zero();
  2805. ((Entity) character).AttachTo((Entity) bbaaa, num, vector3_4, zero);
  2806. Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
  2807. {
  2808. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2809. InputArgument.op_Implicit(true)
  2810. });
  2811. }
  2812. bool flag1 = false;
  2813. DateTime now4 = DateAndTime.Now;
  2814. int num3 = 0;
  2815. if (THelper.Exists((Entity) prop1))
  2816. ((Entity) prop1).set_Velocity(Vector3.op_Multiply(dir, 10f));
  2817. int num4;
  2818. if (THelper.Exists(ᙂ) && THelper.isVehicle(ᙂ))
  2819. {
  2820. Model model = ᙂ.get_Model();
  2821. // ISSUE: explicit reference operation
  2822. if (((Model) @model).get_IsHelicopter())
  2823. {
  2824. num4 = 1;
  2825. goto label_52;
  2826. }
  2827. }
  2828. num4 = 0;
  2829. label_52:
  2830. bool flag2 = num4 != 0;
  2831. Vector3 vector3_5 = Vector3.get_Zero();
  2832. double num5 = 0.5;
  2833. Vector3 vector3_6;
  2834. if (THelper.Exists(ᙂ))
  2835. {
  2836. num5 = 1.5;
  2837. Model model1 = ᙂ.get_Model();
  2838. // ISSUE: explicit reference operation
  2839. vector3_3 = ((Model) @model1).GetDimensions();
  2840. double z1 = (double) vector3_3.Z;
  2841. double num1;
  2842. if (flag2)
  2843. {
  2844. num5 = 3.0;
  2845. num1 = z1 * 1.5;
  2846. }
  2847. else
  2848. num1 = z1 <= 2.0 ? z1 * 1.5 : z1 * 0.85;
  2849. int num2;
  2850. if (flag2)
  2851. {
  2852. vector3_3 = ᙂ.get_Position();
  2853. // ISSUE: variable of the null type
  2854. __Null z2 = vector3_3.Z;
  2855. vector3_6 = THelper.getGroundPos(ᙂ.get_Position());
  2856. // ISSUE: variable of the null type
  2857. __Null z3 = vector3_6.Z;
  2858. if (z2 - z3 > 2.0)
  2859. {
  2860. num2 = 1;
  2861. goto label_60;
  2862. }
  2863. }
  2864. num2 = 0;
  2865. label_60:
  2866. if (num2 != 0)
  2867. vector3_5 = Vector3.op_Multiply(Vector3.get_WorldDown(), (float) num1);
  2868. else if (!flag2)
  2869. {
  2870. Model model2 = ᙂ.get_Model();
  2871. // ISSUE: explicit reference operation
  2872. if (((Model) @model2).get_IsPlane())
  2873. {
  2874. vector3_5 = Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num1), 0.6f);
  2875. }
  2876. else
  2877. {
  2878. Model model3 = ᙂ.get_Model();
  2879. int num6;
  2880. // ISSUE: explicit reference operation
  2881. if (!((Model) @model3).get_IsBicycle())
  2882. {
  2883. Model model4 = ᙂ.get_Model();
  2884. // ISSUE: explicit reference operation
  2885. if (!((Model) @model4).get_IsBike())
  2886. {
  2887. Model model5 = ᙂ.get_Model();
  2888. // ISSUE: explicit reference operation
  2889. if ((long) ((Model) @model5).get_Hash() != 2166734073L)
  2890. {
  2891. Model model6 = ᙂ.get_Model();
  2892. // ISSUE: explicit reference operation
  2893. if ((long) ((Model) @model6).get_Hash() != 4246935337L)
  2894. {
  2895. Model model7 = ᙂ.get_Model();
  2896. // ISSUE: explicit reference operation
  2897. if ((long) ((Model) @model7).get_Hash() != 3025077634L)
  2898. {
  2899. Model model8 = ᙂ.get_Model();
  2900. // ISSUE: explicit reference operation
  2901. if ((long) ((Model) @model8).get_Hash() != 3757070668L)
  2902. {
  2903. num6 = 0;
  2904. goto label_73;
  2905. }
  2906. }
  2907. }
  2908. }
  2909. }
  2910. }
  2911. num6 = 1;
  2912. label_73:
  2913. vector3_5 = num6 == 0 ? Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num1) : Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num1), 0.5f);
  2914. }
  2915. }
  2916. else
  2917. flag2 = false;
  2918. }
  2919. bool flag3 = false;
  2920. double num7 = 0.0;
  2921. double num8 = 1.0;
  2922. double num9 = 1.0;
  2923. if (this.\u0037DAA0 == -1)
  2924. this.\u0037DAA0 = (int) Function.Call<int>((Hash) 4828851653567843141L, new InputArgument[0]);
  2925. if (this.\u0037DAA0 > -1)
  2926. Function.Call((Hash) -1846684210194370067L, new InputArgument[6]
  2927. {
  2928. InputArgument.op_Implicit(this.\u0037DAA0),
  2929. InputArgument.op_Implicit("helicopter_wind_idle"),
  2930. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  2931. InputArgument.op_Implicit("basejumps_sounds"),
  2932. InputArgument.op_Implicit(0),
  2933. InputArgument.op_Implicit(0)
  2934. });
  2935. GameplayCamera.Shake((CameraShake) 8, 2f);
  2936. short num10 = 0;
  2937. if (!this.\u0035DAA0)
  2938. {
  2939. if (THelper.Exists((Entity) this.BBAAA))
  2940. ((Entity) this.BBAAA).set_IsVisible(false);
  2941. ((Entity) Game.get_Player().get_Character()).set_IsVisible(false);
  2942. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  2943. }
  2944. this.CDAA0 = 1000.0;
  2945. try
  2946. {
  2947. while (distance1 > num5 && distance1 < distance2 && ((Entity) Game.get_Player().get_Character()).get_Health() > 0)
  2948. {
  2949. bool flag4 = false;
  2950. vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  2951. // ISSUE: explicit reference operation
  2952. double num1 = (double) ((Vector3) @vector3_6).Length();
  2953. if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
  2954. {
  2955. vector3_6 = ((Entity) this.BBAAA).get_Velocity();
  2956. // ISSUE: explicit reference operation
  2957. num1 = (double) ((Vector3) @vector3_6).Length();
  2958. }
  2959. now2 = DateAndTime.Now;
  2960. TimeSpan timeSpan = now2.Subtract(now4);
  2961. if ((timeSpan.TotalMilliseconds <= 5000.0 || num1 >= 10.0) && !false)
  2962. {
  2963. this.BDAAA = THelper.directionToHeading(dir);
  2964. now2 = DateAndTime.Now;
  2965. timeSpan = now2.Subtract(now4);
  2966. if (timeSpan.TotalMilliseconds > 250.0 && !THelper.Exists(ᙂ))
  2967. {
  2968. if (distance1 < this.CDAA0)
  2969. this.CDAA0 = distance1;
  2970. else
  2971. break;
  2972. }
  2973. if (THelper.Exists(ᙂ))
  2974. {
  2975. if (!this.\u0035DAA0)
  2976. {
  2977. Model model1 = ᙂ.get_Model();
  2978. int num2;
  2979. // ISSUE: explicit reference operation
  2980. if (!((Model) @model1).get_IsPlane())
  2981. {
  2982. Model model2 = ᙂ.get_Model();
  2983. // ISSUE: explicit reference operation
  2984. if (!((Model) @model2).get_IsHelicopter())
  2985. {
  2986. num2 = 0;
  2987. goto label_98;
  2988. }
  2989. }
  2990. num2 = 1;
  2991. label_98:
  2992. if (num2 != 0)
  2993. {
  2994. double val1_1 = 3.0;
  2995. double val1_2 = 1.0;
  2996. vector3_6 = ᙂ.get_Velocity();
  2997. // ISSUE: explicit reference operation
  2998. double val2_1 = System.Math.Max((double) ((Vector3) @vector3_6).Length() * 0.7, distance1) * 0.05;
  2999. double val2_2 = System.Math.Max(val1_2, val2_1);
  3000. num9 = System.Math.Min(val1_1, val2_2);
  3001. }
  3002. else
  3003. num9 = System.Math.Min(3.0, System.Math.Max(1.0, distance1 * 0.05));
  3004. if (THelper.Exists((Entity) this.BBAAA))
  3005. Function.Call((Hash) 1028689870813569457L, new InputArgument[2]
  3006. {
  3007. InputArgument.op_Implicit(this.BBAAA),
  3008. InputArgument.op_Implicit(distance1 * num9)
  3009. });
  3010. }
  3011. else
  3012. {
  3013. double val1_1 = num9 * 0.8;
  3014. double val1_2 = 1.2;
  3015. vector3_6 = ᙂ.get_Velocity();
  3016. // ISSUE: explicit reference operation
  3017. double val2_1 = System.Math.Max((double) ((Vector3) @vector3_6).Length() * 0.1, 1.0);
  3018. double val2_2 = System.Math.Min(val1_2, val2_1);
  3019. num9 = System.Math.Max(val1_1, val2_2);
  3020. }
  3021. }
  3022. else if (!this.\u0035DAA0)
  3023. {
  3024. num9 = System.Math.Max(num9 * 0.8, System.Math.Min(3.0, System.Math.Max(1.0, distance1 * 0.05)));
  3025. if (THelper.Exists((Entity) this.BBAAA))
  3026. Function.Call((Hash) 1028689870813569457L, new InputArgument[2]
  3027. {
  3028. InputArgument.op_Implicit(this.BBAAA),
  3029. InputArgument.op_Implicit(distance1 * num9)
  3030. });
  3031. }
  3032. else
  3033. num9 = 1.0;
  3034. if (this.\u0035DAA0 && THelper.Exists((Entity) prop2))
  3035. {
  3036. ((Entity) prop2).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 45f), (float) num9));
  3037. flag4 = true;
  3038. Vector3 rotation = ((Entity) Game.get_Player().get_Character()).get_Rotation();
  3039. rotation.Y = (__Null) num7;
  3040. rotation.X = (__Null) (double) ((float) (double) rotation.X + (float) (num7 * 0.1));
  3041. rotation.Z = (__Null) (double) ((float) (double) rotation.Z + (float) (num7 * 0.1));
  3042. num7 += num8 * 0.25;
  3043. if (num7 > 5.0)
  3044. num8 = -1.0;
  3045. else if (num7 < -5.0)
  3046. num8 = 1.0;
  3047. ((Entity) Game.get_Player().get_Character()).set_Rotation(rotation);
  3048. try
  3049. {
  3050. foreach (Prop prop5 in propList)
  3051. {
  3052. try
  3053. {
  3054. if (Entity.op_Equality((Entity) prop5, (Entity) prop1))
  3055. {
  3056. vector3_6 = ((Entity) prop5).get_Velocity();
  3057. // ISSUE: explicit reference operation
  3058. double num2 = (double) ((Vector3) @vector3_6).Length();
  3059. vector3_3 = ((Entity) prop2).get_Velocity();
  3060. // ISSUE: explicit reference operation
  3061. double num6 = (double) ((Vector3) @vector3_3).Length() * 0.9;
  3062. if (num2 < num6)
  3063. ((Entity) prop5).ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(dir, 10f), (float) num9));
  3064. else
  3065. ((Entity) prop5).set_Velocity(((Entity) prop2).get_Velocity());
  3066. }
  3067. else if (Entity.op_Equality((Entity) prop5, (Entity) prop3))
  3068. {
  3069. Vector3 vector3_4 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
  3070. {
  3071. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3072. InputArgument.op_Implicit(-1.0),
  3073. InputArgument.op_Implicit(0),
  3074. InputArgument.op_Implicit(0)
  3075. });
  3076. ((Entity) prop5).ApplyForce(Vector3.op_Addition(Vector3.op_Subtraction(Vector3.op_Addition(Vector3.op_Multiply(Vector3.op_Multiply(dir, (float) num9), -2f), vector3_4), ((Entity) prop5).get_Position()), Vector3.get_WorldUp()));
  3077. }
  3078. else if (Entity.op_Equality((Entity) prop5, (Entity) prop4))
  3079. {
  3080. Vector3 vector3_4 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
  3081. {
  3082. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3083. InputArgument.op_Implicit(1.0),
  3084. InputArgument.op_Implicit(0),
  3085. InputArgument.op_Implicit(0)
  3086. });
  3087. ((Entity) prop5).ApplyForce(Vector3.op_Addition(Vector3.op_Subtraction(Vector3.op_Addition(Vector3.op_Multiply(Vector3.op_Multiply(dir, (float) num9), -2f), vector3_4), ((Entity) prop5).get_Position()), Vector3.get_WorldUp()));
  3088. }
  3089. }
  3090. catch (Exception ex)
  3091. {
  3092. ProjectData.SetProjectError(ex);
  3093. ProjectData.ClearProjectError();
  3094. }
  3095. }
  3096. }
  3097. finally
  3098. {
  3099. List<Prop>.Enumerator enumerator;
  3100. enumerator.Dispose();
  3101. }
  3102. }
  3103. else
  3104. {
  3105. Vector3 rotation1 = THelper.directionToRotation(dir, 0.0);
  3106. rotation1.X = (__Null) (rotation1.X - 90.0);
  3107. rotation1.Z = (__Null) (rotation1.Z - 10.0);
  3108. Vector3 rotation2 = ((Entity) this.BBAAA).get_Rotation();
  3109. rotation2.X = (__Null) (double) ((float) (double) rotation2.X + (float) (double) (rotation1.X - rotation2.X) * 0.05f);
  3110. rotation2.Z = rotation1.Z;
  3111. ((Entity) this.BBAAA).set_Rotation(rotation1);
  3112. ((Entity) this.BBAAA).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 45f), (float) num9));
  3113. }
  3114. if (!flag4)
  3115. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 35f), (float) num9));
  3116. Vector3 vector3_7;
  3117. if (THelper.Exists(ᙂ))
  3118. {
  3119. vector3_7 = Vector3.op_Addition(ᙂ.get_Position(), vector3_5);
  3120. dir = Vector3.Normalize(Vector3.op_Subtraction(vector3_7, ((Entity) Game.get_Player().get_Character()).get_Position()));
  3121. heading = THelper.directionToHeading(dir);
  3122. if (((Entity) Game.get_Player().get_Character()).IsTouching(ᙂ))
  3123. break;
  3124. }
  3125. else if (Vector3.op_Inequality(param1, vector3_1))
  3126. vector3_7 = param1;
  3127. Vector3 vector3_8 = Vector3.op_Addition(vector3_7, dir);
  3128. vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
  3129. // ISSUE: explicit reference operation
  3130. distance1 = (double) ((Vector3) @vector3_6).DistanceTo(vector3_7);
  3131. vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
  3132. // ISSUE: explicit reference operation
  3133. distance2 = (double) ((Vector3) @vector3_6).DistanceTo(vector3_8);
  3134. int num11;
  3135. if (num1 >= 10.0)
  3136. {
  3137. if (Function.Call<bool>((Hash) -8382040100735967724L, new InputArgument[1]
  3138. {
  3139. InputArgument.op_Implicit(Game.get_Player().get_Character())
  3140. }) == null)
  3141. {
  3142. if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
  3143. {
  3144. if (Function.Call<bool>((Hash) -8382040100735967724L, new InputArgument[1]
  3145. {
  3146. InputArgument.op_Implicit(this.BBAAA)
  3147. }) != null)
  3148. goto label_141;
  3149. }
  3150. num11 = 0;
  3151. goto label_142;
  3152. }
  3153. }
  3154. label_141:
  3155. num11 = 1;
  3156. label_142:
  3157. bool flag5 = num11 != 0;
  3158. if (flag5)
  3159. checked { ++num10; }
  3160. if (flag5)
  3161. {
  3162. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  3163. {
  3164. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3165. InputArgument.op_Implicit(false)
  3166. });
  3167. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  3168. {
  3169. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3170. InputArgument.op_Implicit(true)
  3171. });
  3172. if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
  3173. {
  3174. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  3175. {
  3176. InputArgument.op_Implicit(this.BBAAA),
  3177. InputArgument.op_Implicit(false)
  3178. });
  3179. Function.Call((Hash) 743271985761492581L, new InputArgument[2]
  3180. {
  3181. InputArgument.op_Implicit(this.BBAAA),
  3182. InputArgument.op_Implicit(true)
  3183. });
  3184. }
  3185. }
  3186. flag1 = false;
  3187. now2 = DateAndTime.Now;
  3188. timeSpan = now2.Subtract(now4);
  3189. if ((timeSpan.TotalMilliseconds <= 500.0 || (int) num10 <= 25) && !false)
  3190. {
  3191. if (num1 > 15.0)
  3192. num10 = (short) 0;
  3193. flag3 = this.C2AA0();
  3194. this.\u0039GAA0 = this.\u00313AA0();
  3195. if (flag3 || this.\u0039GAA0)
  3196. {
  3197. this.\u0034DAAA = num1 * 0.5;
  3198. if (this.\u0034DAAA > 20.0)
  3199. this.\u0034DAAA = 20.0;
  3200. this.\u0035A0A0 = Vector3.op_Multiply(((Entity) this.BBAAA).get_Velocity(), 0.05f);
  3201. break;
  3202. }
  3203. THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
  3204. checked { num3 += 10; }
  3205. if (num3 % 50 == 0)
  3206. {
  3207. if (THelper.Exists(ᙂ))
  3208. this.\u00361AAA(ᙂ);
  3209. else
  3210. Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
  3211. {
  3212. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  3213. InputArgument.op_Implicit(distance1 * 0.5)
  3214. });
  3215. }
  3216. Script.Wait(10);
  3217. }
  3218. else
  3219. break;
  3220. }
  3221. else
  3222. break;
  3223. }
  3224. }
  3225. catch (Exception ex)
  3226. {
  3227. ProjectData.SetProjectError(ex);
  3228. ProjectData.ClearProjectError();
  3229. }
  3230. GameplayCamera.StopShaking();
  3231. ((Entity) Game.get_Player().get_Character()).set_IsVisible(false);
  3232. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  3233. Function.Call((Hash) -4679285206957010997L, new InputArgument[5]
  3234. {
  3235. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3236. InputArgument.op_Implicit((int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
  3237. {
  3238. InputArgument.op_Implicit("GADGET_PARACHUTE")
  3239. })),
  3240. InputArgument.op_Implicit(1),
  3241. InputArgument.op_Implicit(1),
  3242. InputArgument.op_Implicit(1)
  3243. });
  3244. if (this.\u0037DAA0 > -1)
  3245. Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
  3246. {
  3247. InputArgument.op_Implicit(this.\u0037DAA0)
  3248. });
  3249. if (this.\u0035DAA0 || ((Entity) Game.get_Player().get_Character()).IsAttached())
  3250. {
  3251. Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
  3252. {
  3253. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3254. InputArgument.op_Implicit(true)
  3255. });
  3256. ((Entity) Game.get_Player().get_Character()).Detach();
  3257. vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
  3258. if ((double) (vector3_6.Z - THelper.getGroundPos(((Entity) Game.get_Player().get_Character()).get_Position()).Z) < 0.25)
  3259. {
  3260. Ped character = Game.get_Player().get_Character();
  3261. ((Entity) character).set_Position(Vector3.op_Addition(((Entity) character).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1f)));
  3262. }
  3263. if (!flag3)
  3264. ((Entity) Game.get_Player().get_Character()).set_Velocity(dir);
  3265. if (this.\u0039GAA0)
  3266. this.CHAA0 = Vector3.op_Multiply(((Entity) this.BBAAA).get_Velocity(), 0.3f);
  3267. this.\u00311AA0();
  3268. }
  3269. try
  3270. {
  3271. foreach (Prop prop5 in propList)
  3272. {
  3273. try
  3274. {
  3275. if (THelper.Exists((Entity) prop5) && Entity.op_Inequality((Entity) prop5, (Entity) this.BBAAA))
  3276. {
  3277. ((Entity) prop5).Detach();
  3278. ((Entity) prop5).Delete();
  3279. }
  3280. }
  3281. catch (Exception ex)
  3282. {
  3283. ProjectData.SetProjectError(ex);
  3284. ProjectData.ClearProjectError();
  3285. }
  3286. }
  3287. }
  3288. finally
  3289. {
  3290. List<Prop>.Enumerator enumerator;
  3291. enumerator.Dispose();
  3292. }
  3293. if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00328AAA, this.\u00338AA0, 1.0))
  3294. Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00328AAA, this.\u00338AA0);
  3295. if (flag3)
  3296. this.\u00303AAA();
  3297. else if (this.\u0039GAA0)
  3298. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Multiply(dir, 5f));
  3299. else if ((int) num10 > 25 || ((Entity) Game.get_Player().get_Character()).get_Health() <= 0)
  3300. {
  3301. if (this.\u0035DAA0)
  3302. {
  3303. Game.get_Player().get_Character().set_CanRagdoll(false);
  3304. Game.get_Player().get_Character().set_CanRagdoll(true);
  3305. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  3306. {
  3307. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3308. InputArgument.op_Implicit(10),
  3309. InputArgument.op_Implicit(10),
  3310. InputArgument.op_Implicit(0),
  3311. InputArgument.op_Implicit(0),
  3312. InputArgument.op_Implicit(0)
  3313. });
  3314. }
  3315. else
  3316. {
  3317. ((Entity) Game.get_Player().get_Character()).Detach();
  3318. if ((double) (((Entity) Game.get_Player().get_Character()).get_Position().Z - THelper.getGroundPos(((Entity) Game.get_Player().get_Character()).get_Position()).Z) < 0.25)
  3319. {
  3320. Ped character = Game.get_Player().get_Character();
  3321. ((Entity) character).set_Position(Vector3.op_Addition(((Entity) character).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1f)));
  3322. }
  3323. Script.Wait(50);
  3324. }
  3325. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
  3326. ((Entity) Game.get_Player().get_Character()).set_Heading((float) heading);
  3327. this.\u00331AA0(true);
  3328. }
  3329. else
  3330. {
  3331. int num1;
  3332. if (THelper.Exists(ᙂ))
  3333. {
  3334. Model model1 = ᙂ.get_Model();
  3335. // ISSUE: explicit reference operation
  3336. if (((Model) @model1).get_IsHelicopter())
  3337. {
  3338. Model model2 = ᙂ.get_Model();
  3339. // ISSUE: explicit reference operation
  3340. if (((Model) @model2).get_IsPlane())
  3341. {
  3342. Model model3 = ᙂ.get_Model();
  3343. // ISSUE: explicit reference operation
  3344. if (((Model) @model3).get_IsVehicle())
  3345. goto label_199;
  3346. }
  3347. }
  3348. num1 = 1;
  3349. goto label_201;
  3350. }
  3351. label_199:
  3352. num1 = 0;
  3353. label_201:
  3354. if (num1 != 0)
  3355. {
  3356. Vehicle[] nearbyVehicles = World.GetNearbyVehicles(Game.get_Player().get_Character(), 50f);
  3357. int index = 0;
  3358. while (index < nearbyVehicles.Length)
  3359. {
  3360. Vehicle vehicle = nearbyVehicles[index];
  3361. try
  3362. {
  3363. int num2;
  3364. if (THelper.Exists((Entity) vehicle))
  3365. {
  3366. if (((Entity) vehicle).get_Handle() != ᙂ.get_Handle())
  3367. {
  3368. vector3_6 = ((Entity) vehicle).get_Position();
  3369. // ISSUE: explicit reference operation
  3370. if ((double) ((Vector3) @vector3_6).DistanceTo(ᙂ.get_Position()) >= 1.0)
  3371. goto label_207;
  3372. }
  3373. num2 = 1;
  3374. goto label_209;
  3375. }
  3376. label_207:
  3377. num2 = 0;
  3378. label_209:
  3379. if (num2 != 0)
  3380. {
  3381. ᙂ = (Entity) vehicle;
  3382. break;
  3383. }
  3384. }
  3385. catch (Exception ex)
  3386. {
  3387. ProjectData.SetProjectError(ex);
  3388. ProjectData.ClearProjectError();
  3389. }
  3390. checked { ++index; }
  3391. }
  3392. }
  3393. if (THelper.Exists(ᙂ))
  3394. {
  3395. this.\u0033CAA0 = flag2;
  3396. try
  3397. {
  3398. this.\u00378AA0 = (Vehicle) ᙂ;
  3399. }
  3400. catch (Exception ex)
  3401. {
  3402. ProjectData.SetProjectError(ex);
  3403. ProjectData.ClearProjectError();
  3404. }
  3405. this.\u00388AAA = DateAndTime.Now;
  3406. if (!flag2)
  3407. {
  3408. Model model1 = ᙂ.get_Model();
  3409. // ISSUE: explicit reference operation
  3410. if (!((Model) @model1).get_IsBicycle())
  3411. {
  3412. Model model2 = ᙂ.get_Model();
  3413. // ISSUE: explicit reference operation
  3414. if (!((Model) @model2).get_IsBike())
  3415. {
  3416. Model model3 = ᙂ.get_Model();
  3417. // ISSUE: explicit reference operation
  3418. if ((long) ((Model) @model3).get_Hash() != 2166734073L)
  3419. {
  3420. Model model4 = ᙂ.get_Model();
  3421. // ISSUE: explicit reference operation
  3422. if ((long) ((Model) @model4).get_Hash() != 4246935337L)
  3423. {
  3424. Model model5 = ᙂ.get_Model();
  3425. // ISSUE: explicit reference operation
  3426. if ((long) ((Model) @model5).get_Hash() != 3025077634L)
  3427. {
  3428. Model model6 = ᙂ.get_Model();
  3429. // ISSUE: explicit reference operation
  3430. if ((long) ((Model) @model6).get_Hash() != 3757070668L)
  3431. goto label_226;
  3432. }
  3433. }
  3434. }
  3435. }
  3436. }
  3437. int num2;
  3438. if (THelper.Exists((Entity) ((Vehicle) ᙂ).GetPedOnSeat((VehicleSeat) -1)))
  3439. {
  3440. num2 = 1;
  3441. goto label_228;
  3442. }
  3443. label_226:
  3444. num2 = 0;
  3445. label_228:
  3446. if (num2 != 0)
  3447. {
  3448. this.\u00360AAA((Vehicle) ᙂ);
  3449. try
  3450. {
  3451. Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
  3452. {
  3453. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3454. InputArgument.op_Implicit(ᙂ),
  3455. InputArgument.op_Implicit(-1)
  3456. });
  3457. }
  3458. catch (Exception ex)
  3459. {
  3460. ProjectData.SetProjectError(ex);
  3461. ProjectData.ClearProjectError();
  3462. }
  3463. }
  3464. else
  3465. {
  3466. Game.get_Player().get_Character().set_CanRagdoll(false);
  3467. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  3468. ((Entity) Game.get_Player().get_Character()).set_Heading((float) heading);
  3469. this.\u00331AA0(false);
  3470. Model model2 = ᙂ.get_Model();
  3471. // ISSUE: explicit reference operation
  3472. if (((Model) @model2).get_IsPlane())
  3473. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Addition(Vector3.op_Addition(Vector3.op_Subtraction(Vector3.op_Addition(ᙂ.get_Position(), vector3_5), ((Entity) Game.get_Player().get_Character()).get_Position()), Vector3.op_Multiply(ᙂ.get_Velocity(), 1.05f)), Vector3.op_Multiply(Vector3.get_WorldDown(), 3f)));
  3474. else
  3475. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Addition(Vector3.op_Multiply(ᙂ.get_Velocity(), 1.2f), Vector3.op_Multiply(Vector3.get_WorldDown(), 3f)));
  3476. }
  3477. }
  3478. else
  3479. {
  3480. Game.get_Player().get_Character().set_CanRagdoll(true);
  3481. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  3482. {
  3483. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3484. InputArgument.op_Implicit(-1),
  3485. InputArgument.op_Implicit(-1),
  3486. InputArgument.op_Implicit(0),
  3487. InputArgument.op_Implicit(0),
  3488. InputArgument.op_Implicit(0)
  3489. });
  3490. this.\u00331AA0(false);
  3491. this.\u00311AA0();
  3492. this.C0AA0();
  3493. this.\u00301AAA();
  3494. ((Entity) this.BBAAA).Detach();
  3495. Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
  3496. {
  3497. InputArgument.op_Implicit(this.BBAAA),
  3498. InputArgument.op_Implicit(false),
  3499. InputArgument.op_Implicit(false)
  3500. });
  3501. Script.Wait(100);
  3502. this.\u0032CAAA = JC2.createRope((Entity) Game.get_Player().get_Character(), ᙂ, 0.5, 0.0, (Bone) -1);
  3503. if (THelper.Exists((Entity) this.BBAAA))
  3504. {
  3505. ((Entity) this.BBAAA).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
  3506. {
  3507. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3508. InputArgument.op_Implicit(31086),
  3509. InputArgument.op_Implicit(0),
  3510. InputArgument.op_Implicit(0),
  3511. InputArgument.op_Implicit(0)
  3512. }));
  3513. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  3514. {
  3515. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3516. InputArgument.op_Implicit(this.BBAAA),
  3517. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 31086)),
  3518. InputArgument.op_Implicit(0),
  3519. InputArgument.op_Implicit(0),
  3520. InputArgument.op_Implicit(-0.15),
  3521. InputArgument.op_Implicit(-0.45),
  3522. InputArgument.op_Implicit(0),
  3523. InputArgument.op_Implicit(0),
  3524. InputArgument.op_Implicit(0),
  3525. InputArgument.op_Implicit(0),
  3526. InputArgument.op_Implicit(0),
  3527. InputArgument.op_Implicit(0),
  3528. InputArgument.op_Implicit(0),
  3529. InputArgument.op_Implicit(false),
  3530. InputArgument.op_Implicit(false),
  3531. InputArgument.op_Implicit(false),
  3532. InputArgument.op_Implicit(false),
  3533. InputArgument.op_Implicit(0)
  3534. });
  3535. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  3536. {
  3537. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3538. InputArgument.op_Implicit(this.BBAAA),
  3539. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
  3540. InputArgument.op_Implicit(0),
  3541. InputArgument.op_Implicit(0),
  3542. InputArgument.op_Implicit(0),
  3543. InputArgument.op_Implicit(0),
  3544. InputArgument.op_Implicit(0),
  3545. InputArgument.op_Implicit(0),
  3546. InputArgument.op_Implicit(0),
  3547. InputArgument.op_Implicit(0),
  3548. InputArgument.op_Implicit(0),
  3549. InputArgument.op_Implicit(0),
  3550. InputArgument.op_Implicit(0),
  3551. InputArgument.op_Implicit(false),
  3552. InputArgument.op_Implicit(false),
  3553. InputArgument.op_Implicit(false),
  3554. InputArgument.op_Implicit(false),
  3555. InputArgument.op_Implicit(0)
  3556. });
  3557. Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
  3558. {
  3559. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3560. InputArgument.op_Implicit(this.BBAAA),
  3561. InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 60309)),
  3562. InputArgument.op_Implicit(0),
  3563. InputArgument.op_Implicit(0),
  3564. InputArgument.op_Implicit(0),
  3565. InputArgument.op_Implicit(0),
  3566. InputArgument.op_Implicit(0),
  3567. InputArgument.op_Implicit(0),
  3568. InputArgument.op_Implicit(0),
  3569. InputArgument.op_Implicit(0),
  3570. InputArgument.op_Implicit(0),
  3571. InputArgument.op_Implicit(0),
  3572. InputArgument.op_Implicit(0),
  3573. InputArgument.op_Implicit(false),
  3574. InputArgument.op_Implicit(false),
  3575. InputArgument.op_Implicit(false),
  3576. InputArgument.op_Implicit(false),
  3577. InputArgument.op_Implicit(0)
  3578. });
  3579. }
  3580. Ped character1 = Game.get_Player().get_Character();
  3581. ((Entity) character1).set_Velocity(Vector3.op_Multiply(((Entity) character1).get_Velocity(), 0.2f));
  3582. Rope rope = this.\u0032CAAA;
  3583. Ped character2 = Game.get_Player().get_Character();
  3584. Entity e2 = ᙂ;
  3585. double distCoef = 1.0;
  3586. double forcedDist = 0.0;
  3587. // ISSUE: explicit reference operation
  3588. ((Vector3) @vector3_6).\u002Ector(-0.1f, -0.1f, 2.3f);
  3589. Vector3 offset_E1 = vector3_6;
  3590. Vector3 offset_E2 = vector3_1;
  3591. JC2.attachEntitiesToRope(rope, (Entity) character2, e2, distCoef, forcedDist, offset_E1, offset_E2);
  3592. Game.get_Player().get_Character().set_CanRagdoll(true);
  3593. this.\u0038DAAA = ᙂ;
  3594. }
  3595. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
  3596. }
  3597. else
  3598. this.\u00331AA0(true);
  3599. }
  3600. }
  3601. }
  3602. catch (Exception ex)
  3603. {
  3604. ProjectData.SetProjectError(ex);
  3605. Exception exception = ex;
  3606. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  3607. UI.ShowSubtitle("Error when moving to target: " + exception.Message, 10000);
  3608. ProjectData.ClearProjectError();
  3609. }
  3610. }
  3611.  
  3612. private void \u00361AAA(Entity ᙂ)
  3613. {
  3614. Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
  3615. {
  3616. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  3617. InputArgument.op_Implicit((double) World.GetDistance(ᙂ.get_Position(), ((Entity) Game.get_Player().get_Character()).get_Position()) * 0.5)
  3618. });
  3619. int num = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
  3620. {
  3621. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle())
  3622. }) - 1);
  3623. Vector3 position = ᙂ.get_Position();
  3624. Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
  3625. {
  3626. InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
  3627. InputArgument.op_Implicit(num),
  3628. InputArgument.op_Implicit((float) position.X),
  3629. InputArgument.op_Implicit((float) position.Y),
  3630. InputArgument.op_Implicit((float) position.Z)
  3631. });
  3632. }
  3633.  
  3634. private void \u00371AA0()
  3635. {
  3636. if (!this.\u0033CAA0)
  3637. return;
  3638. this.\u0033CAA0 = false;
  3639. this.\u0038DAAA = (Entity) null;
  3640. Game.get_Player().get_Character().set_CanRagdoll(false);
  3641. Game.get_Player().get_Character().set_CanRagdoll(true);
  3642. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  3643. {
  3644. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3645. InputArgument.op_Implicit(100),
  3646. InputArgument.op_Implicit(100),
  3647. InputArgument.op_Implicit(0),
  3648. InputArgument.op_Implicit(0),
  3649. InputArgument.op_Implicit(0)
  3650. });
  3651. this.\u0032CAAA.Delete();
  3652. this.\u0032CAAA = (Rope) null;
  3653. this.\u00311AA0();
  3654. }
  3655.  
  3656. private void \u00381AAA()
  3657. {
  3658. this.C6AA0 = !this.C6AA0;
  3659. try
  3660. {
  3661. this.\u00331AA0(false);
  3662. }
  3663. catch (Exception ex)
  3664. {
  3665. ProjectData.SetProjectError(ex);
  3666. ProjectData.ClearProjectError();
  3667. }
  3668. try
  3669. {
  3670. this.\u00371AA0();
  3671. }
  3672. catch (Exception ex)
  3673. {
  3674. ProjectData.SetProjectError(ex);
  3675. ProjectData.ClearProjectError();
  3676. }
  3677. this.\u00380AAA();
  3678. this.\u00356AA0.findItem("bEnabled").value = Conversions.ToString(this.C6AA0);
  3679. this.\u00316AA0.WriteINIBool("bEnabled", "general", this.C6AA0);
  3680. UI.ShowSubtitle("Just Cause 3 Mod enabled: " + Conversions.ToString(this.C6AA0));
  3681. }
  3682.  
  3683. private void \u00391AA0()
  3684. {
  3685. if (!this.C6AA0)
  3686. return;
  3687. this.\u00307AAA = !this.\u00307AAA;
  3688. try
  3689. {
  3690. this.\u00331AA0(false);
  3691. }
  3692. catch (Exception ex)
  3693. {
  3694. ProjectData.SetProjectError(ex);
  3695. ProjectData.ClearProjectError();
  3696. }
  3697. try
  3698. {
  3699. this.\u00371AA0();
  3700. }
  3701. catch (Exception ex)
  3702. {
  3703. ProjectData.SetProjectError(ex);
  3704. ProjectData.ClearProjectError();
  3705. }
  3706. this.\u00380AAA();
  3707. this.\u00316AA0.WriteINIBool("bHookMode", "general", this.\u00307AAA);
  3708. this.\u00356AA0.findItem("bHookMode").value = Conversions.ToString(this.\u00307AAA);
  3709. UI.ShowSubtitle("Just Cause 3 mod - Hook On: " + Conversions.ToString(this.\u00307AAA));
  3710. }
  3711.  
  3712. private void B1AAA()
  3713. {
  3714. if (!Game.get_Player().get_IsAiming() || DateAndTime.Now.Subtract(this.\u0034EAAA).TotalMilliseconds <= 1000.0)
  3715. return;
  3716. this.\u0034EAAA = DateAndTime.Now;
  3717. try
  3718. {
  3719. while (this.\u0035EAA0.Count < 4)
  3720. {
  3721. Ped ped = World.CreatePed(this.\u0037EAA0, Vector3.op_Addition(Vector3.op_Subtraction(GameplayCamera.get_Position(), Vector3.op_Multiply(THelper.RotationToDirection(GameplayCamera.get_Rotation()), 10f)), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)));
  3722. Script.Wait(10);
  3723. if (THelper.Exists((Entity) ped))
  3724. this.\u0035EAA0.Add((Entity) ped);
  3725. }
  3726. try
  3727. {
  3728. foreach (Entity e in this.\u0033EAA0)
  3729. {
  3730. try
  3731. {
  3732. if (THelper.Exists(e))
  3733. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  3734. {
  3735. InputArgument.op_Implicit(e)
  3736. });
  3737. }
  3738. catch (Exception ex)
  3739. {
  3740. ProjectData.SetProjectError(ex);
  3741. ProjectData.ClearProjectError();
  3742. }
  3743. }
  3744. }
  3745. finally
  3746. {
  3747. List<Entity>.Enumerator enumerator;
  3748. enumerator.Dispose();
  3749. }
  3750. this.\u0033EAA0.Clear();
  3751. short num1 = 1;
  3752. try
  3753. {
  3754. foreach (Ped ped1 in this.\u0035EAA0)
  3755. {
  3756. try
  3757. {
  3758. if (Entity.op_Inequality((Entity) ped1, (Entity) Game.get_Player().get_Character()))
  3759. {
  3760. ((Entity) ped1).set_Health(-1);
  3761. Ped ped2 = ped1;
  3762. Ped character = Game.get_Player().get_Character();
  3763. int num2 = 28422;
  3764. Vector3 vector3_1;
  3765. // ISSUE: explicit reference operation
  3766. ((Vector3) @vector3_1).\u002Ector(-5f, (float) checked ((int) num1 * 20), -2f);
  3767. Vector3 vector3_2 = vector3_1;
  3768. Vector3 zero = Vector3.get_Zero();
  3769. ((Entity) ped2).AttachTo((Entity) character, num2, vector3_2, zero);
  3770. Function.Call((Hash) 4945100874290747328L, new InputArgument[3]
  3771. {
  3772. InputArgument.op_Implicit(ped1),
  3773. InputArgument.op_Implicit(10),
  3774. InputArgument.op_Implicit(0)
  3775. });
  3776. checked { ++num1; }
  3777. }
  3778. Ped[] nearbyPeds = World.GetNearbyPeds(ped1, 100f);
  3779. int index1 = 0;
  3780. while (index1 < nearbyPeds.Length)
  3781. {
  3782. Ped ped2 = nearbyPeds[index1];
  3783. try
  3784. {
  3785. if (THelper.Exists((Entity) ped2) && !this.\u0033EAA0.Contains((Entity) ped2) && (!this.\u0035EAA0.Contains((Entity) ped2) && Entity.op_Inequality((Entity) ped2, (Entity) Game.get_Player().get_Character())) && !THelper.Exists((Entity) ped2.get_CurrentVehicle()))
  3786. {
  3787. this.\u0033EAA0.Add((Entity) ped2);
  3788. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  3789. {
  3790. InputArgument.op_Implicit(ped2)
  3791. });
  3792. }
  3793. }
  3794. catch (Exception ex)
  3795. {
  3796. ProjectData.SetProjectError(ex);
  3797. ProjectData.ClearProjectError();
  3798. }
  3799. checked { ++index1; }
  3800. }
  3801. Vehicle[] nearbyVehicles = World.GetNearbyVehicles(ped1, 100f);
  3802. int index2 = 0;
  3803. while (index2 < nearbyVehicles.Length)
  3804. {
  3805. Vehicle vehicle = nearbyVehicles[index2];
  3806. try
  3807. {
  3808. if (THelper.Exists((Entity) vehicle) && !this.\u0033EAA0.Contains((Entity) vehicle) && Entity.op_Inequality((Entity) vehicle, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  3809. {
  3810. this.\u0033EAA0.Add((Entity) vehicle);
  3811. Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
  3812. {
  3813. InputArgument.op_Implicit(vehicle)
  3814. });
  3815. }
  3816. }
  3817. catch (Exception ex)
  3818. {
  3819. ProjectData.SetProjectError(ex);
  3820. ProjectData.ClearProjectError();
  3821. }
  3822. checked { ++index2; }
  3823. }
  3824. }
  3825. catch (Exception ex)
  3826. {
  3827. ProjectData.SetProjectError(ex);
  3828. ProjectData.ClearProjectError();
  3829. }
  3830. }
  3831. }
  3832. finally
  3833. {
  3834. List<Entity>.Enumerator enumerator;
  3835. enumerator.Dispose();
  3836. }
  3837. }
  3838. catch (Exception ex)
  3839. {
  3840. ProjectData.SetProjectError(ex);
  3841. ProjectData.ClearProjectError();
  3842. }
  3843. }
  3844.  
  3845. private void C1AA0()
  3846. {
  3847. this.\u0039EAA0 = this.\u0039EAA0 + 1.0;
  3848. if (this.\u0039EAA0 > 180.0)
  3849. this.\u0039EAA0 = this.\u0039EAA0 % 180.0;
  3850. if (THelper.isButtonPressed(THelper.controls.INPUT_AIM))
  3851. {
  3852. Vector3 direction = GameplayCamera.get_Direction();
  3853. Vector3 vector3 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction, 2f));
  3854. RaycastResult raycastResult = World.Raycast(vector3, Vector3.op_Addition(vector3, Vector3.op_Multiply(direction, 1000f)), (IntersectOptions) 1, (Entity) Game.get_Player().get_Character());
  3855. // ISSUE: explicit reference operation
  3856. if (((RaycastResult) @raycastResult).get_DitHitAnything())
  3857. {
  3858. double num1 = 1.0;
  3859. // ISSUE: explicit reference operation
  3860. Vector3 hitCoords = ((RaycastResult) @raycastResult).get_HitCoords();
  3861. // ISSUE: explicit reference operation
  3862. double num2 = (double) ((Vector3) @hitCoords).DistanceTo(vector3) / 1000.0;
  3863. double num3 = num1 - num2;
  3864. // ISSUE: explicit reference operation
  3865. this.BEAAA = ((RaycastResult) @raycastResult).get_HitCoords();
  3866. if ((!this.\u00307AAA || !this.\u0038EAAA) && !false)
  3867. return;
  3868. string sFile = ".\\scripts\\jc3 files\\crosshair_hook.png";
  3869. Vector2 vector2_1;
  3870. // ISSUE: explicit reference operation
  3871. ((Vector2) @vector2_1).\u002Ector(0.5f, 0.5f);
  3872. Vector2 pos = vector2_1;
  3873. Vector2 vector2_2;
  3874. // ISSUE: explicit reference operation
  3875. ((Vector2) @vector2_2).\u002Ector((float) (0.03 * num3), (float) (0.03 * num3));
  3876. Vector2 size = vector2_2;
  3877. double rotation = this.\u0039EAA0;
  3878. Color white = Color.White;
  3879. int num4 = 100;
  3880. int num5 = 0;
  3881. int num6 = 0;
  3882. double aspectRatio = 1.0;
  3883. Vector2 vector2_3;
  3884. Vector2 centerOffset = vector2_3;
  3885. THelper.drawTextureAuxSpinSizeFix(sFile, pos, size, rotation, white, (short) num4, (short) num5, (short) num6, aspectRatio, centerOffset);
  3886. }
  3887. else
  3888. this.BEAAA = Vector3.get_Zero();
  3889. }
  3890. else
  3891. this.BEAAA = Vector3.get_Zero();
  3892. }
  3893.  
  3894. private void \u00302AAA()
  3895. {
  3896. short parachuteState = THelper.getParachuteState();
  3897. Prop prop1 = (Prop) null;
  3898. if ((int) parachuteState > 0)
  3899. {
  3900. if (this.CEAA0 == -1)
  3901. this.CEAA0 = (int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
  3902. {
  3903. InputArgument.op_Implicit("p_parachute1_sp_s")
  3904. });
  3905. Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
  3906. int ceaA0 = this.CEAA0;
  3907. prop1 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
  3908. {
  3909. InputArgument.op_Implicit((float) position.X),
  3910. InputArgument.op_Implicit((float) position.Y),
  3911. InputArgument.op_Implicit((float) position.Z),
  3912. InputArgument.op_Implicit(5.0),
  3913. InputArgument.op_Implicit(ceaA0),
  3914. InputArgument.op_Implicit(0),
  3915. InputArgument.op_Implicit(0),
  3916. InputArgument.op_Implicit(1)
  3917. });
  3918. }
  3919. if (!this.\u0034CAAA)
  3920. return;
  3921. if (THelper.Exists(this.\u0036CAAA))
  3922. this.\u0035CAA0 = this.\u0036CAAA.get_Position();
  3923. if (THelper.Exists((Entity) prop1))
  3924. {
  3925. THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()).Z = (__Null) 0.0;
  3926. Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(this.\u0035CAA0, ((Entity) Game.get_Player().get_Character()).get_Position()));
  3927. bool flag = THelper.Exists(this.\u0036CAAA);
  3928. // ISSUE: explicit reference operation
  3929. if (!flag || this.\u0037CAA0 < (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position()))
  3930. {
  3931. ((Entity) prop1).ApplyForce(Vector3.op_Multiply(dir, 0.25f));
  3932. if (flag)
  3933. {
  3934. Vector3 velocity1 = this.\u0036CAAA.get_Velocity();
  3935. Vector3 velocity2 = ((Entity) prop1).get_Velocity();
  3936. // ISSUE: explicit reference operation
  3937. // ISSUE: explicit reference operation
  3938. if ((double) ((Vector3) @velocity2).Length() < (double) ((Vector3) @velocity1).Length())
  3939. {
  3940. Prop prop2 = prop1;
  3941. ((Entity) prop2).set_Velocity(Vector3.op_Addition(((Entity) prop2).get_Velocity(), Vector3.op_Multiply(Vector3.op_Subtraction(velocity1, ((Entity) prop1).get_Velocity()), 0.25f)));
  3942. // ISSUE: explicit reference operation
  3943. this.\u0036CAAA.set_MaxSpeed(((Vector3) @velocity1).Length() * 1.5f);
  3944. }
  3945. this.\u00361AAA(this.\u0036CAAA);
  3946. }
  3947. }
  3948. if (!flag)
  3949. {
  3950. THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
  3951. THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
  3952. }
  3953. if (THelper.getDistance2D(((Entity) Game.get_Player().get_Character()).get_Position(), this.\u0035CAA0) < 2.0 || System.Math.Abs(THelper.headingDiff((double) ((Entity) Game.get_Player().get_Character()).get_Heading(), THelper.directionToHeading(dir))) > 90.0 || THelper.isButtonPressed(THelper.controls.INPUT_DUCK))
  3954. {
  3955. THelper.play3DSound(".\\scripts\\jc3 files\\hook_end.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
  3956. this.\u0034CAAA = false;
  3957. this.\u00311AA0();
  3958. if (this.\u0032CAAA != null)
  3959. {
  3960. this.\u0032CAAA.Delete();
  3961. this.\u0032CAAA = (Rope) null;
  3962. }
  3963. }
  3964. }
  3965. else
  3966. {
  3967. this.\u0031CAA0 = true;
  3968. this.\u0034CAAA = false;
  3969. Game.get_Player().get_Character().set_CanRagdoll(false);
  3970. }
  3971. }
  3972.  
  3973. private void \u00312AA0()
  3974. {
  3975. if (!this.\u0031DAA0)
  3976. return;
  3977. THelper.anim_setAnimSpeed(this.CCAA0, this.BCAAA, 0.0);
  3978. THelper.anim_setAnimTime(this.CCAA0, this.BCAAA, this.\u0030DAAA);
  3979. Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
  3980. {
  3981. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  3982. InputArgument.op_Implicit(true)
  3983. });
  3984. RaycastResult raycastResult = World.Raycast(GameplayCamera.get_Position(), Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(GameplayCamera.get_Direction(), 2f)), (IntersectOptions) -1);
  3985. // ISSUE: explicit reference operation
  3986. // ISSUE: explicit reference operation
  3987. // ISSUE: explicit reference operation
  3988. if (((RaycastResult) @raycastResult).get_DitHitEntity() && THelper.Exists(((RaycastResult) @raycastResult).get_HitEntity()) && ((RaycastResult) @raycastResult).get_HitEntity().get_Handle() == ((Entity) Game.get_Player().get_Character()).get_Handle())
  3989. ((Entity) Game.get_Player().get_Character()).set_Alpha(50);
  3990. else
  3991. ((Entity) Game.get_Player().get_Character()).ResetAlpha();
  3992. if (((Entity) Game.get_Player().get_Character()).get_IsDead() || THelper.isButtonJustPressed(THelper.controls.INPUT_JUMP))
  3993. {
  3994. this.\u0031DAA0 = false;
  3995. ((Entity) Game.get_Player().get_Character()).ResetAlpha();
  3996. this.\u00331AA0(false);
  3997. this.\u00341AAA();
  3998. ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
  3999. THelper.anim_stopPedAnim(this.CCAA0, this.BCAAA, 2.0);
  4000. Vector3 direction = THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation());
  4001. Vector3 vector3_1 = Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1.5f));
  4002. Vector3 groundPos = THelper.getGroundPos(vector3_1);
  4003. Vector3 vector3_2;
  4004. while (THelper.getDistance2D(vector3_1, ((Entity) Game.get_Player().get_Character()).get_Position()) < 1.5)
  4005. {
  4006. vector3_1 = Vector3.op_Addition(vector3_1, Vector3.op_Multiply(direction, 0.2f));
  4007. groundPos = THelper.getGroundPos(vector3_1);
  4008. Script.Wait(0);
  4009. int num;
  4010. if (groundPos.Z - ((Entity) Game.get_Player().get_Character()).get_Position().Z < 2.0)
  4011. {
  4012. // ISSUE: variable of the null type
  4013. __Null z1 = groundPos.Z;
  4014. vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Position();
  4015. // ISSUE: variable of the null type
  4016. __Null z2 = vector3_2.Z;
  4017. if (z1 > z2)
  4018. {
  4019. num = 1;
  4020. goto label_10;
  4021. }
  4022. }
  4023. num = 0;
  4024. label_10:
  4025. if (num != 0)
  4026. break;
  4027. }
  4028. // ISSUE: variable of the null type
  4029. __Null z3 = groundPos.Z;
  4030. vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Position();
  4031. // ISSUE: variable of the null type
  4032. __Null z4 = vector3_2.Z;
  4033. if (z3 - z4 < 2.0 && groundPos.Z > ((Entity) Game.get_Player().get_Character()).get_Position().Z)
  4034. {
  4035. Script.Wait(10);
  4036. THelper.resetTimeOut();
  4037. while (!THelper.timedOut(200))
  4038. {
  4039. vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  4040. // ISSUE: explicit reference operation
  4041. if ((double) ((Vector3) @vector3_2).Length() < 5.0)
  4042. ((Entity) Game.get_Player().get_Character()).ApplyForce(Vector3.op_Addition(Vector3.op_Multiply(Vector3.op_Subtraction(groundPos, ((Entity) Game.get_Player().get_Character()).get_Position()), 5f), Vector3.get_WorldUp()));
  4043. Script.Wait(10);
  4044. }
  4045. }
  4046. }
  4047. }
  4048.  
  4049. private void \u00322AAA(object ᙂ, EventArgs \u0031AAAA)
  4050. {
  4051. if (!this.\u00346AAA)
  4052. {
  4053. this.\u0035AAA0();
  4054. }
  4055. else
  4056. {
  4057. THelper.helper_tick();
  4058. this.\u00312AA0();
  4059. int index1 = checked (JC2.CA0A0.Count - 1);
  4060. while (index1 >= 0)
  4061. {
  4062. if (THelper._iskeyPressed(Keys.X) || THelper.usingController() && THelper.isButtonPressed(THelper.controls.INPUT_FRONTEND_RIGHT))
  4063. JC2.CA0A0[index1].retract(false);
  4064. JC2.CA0A0[index1].tick();
  4065. checked { index1 += -1; }
  4066. }
  4067. this.\u00302AAA();
  4068. this.\u00373AA0();
  4069. this.\u0037AAA0();
  4070. this.\u00356AA0.menuTick();
  4071. this.B2AAA();
  4072. if (!this.C6AA0)
  4073. return;
  4074. this.C1AA0();
  4075. this.B1AAA();
  4076. if (this.\u00359AA0 && THelper.isButtonJustPressed(THelper.controls.INPUT_ENTER))
  4077. this.CAAA0();
  4078. if (this.\u0030EAAA % 500 == 0)
  4079. {
  4080. try
  4081. {
  4082. foreach (Ped ped in this.\u0035EAA0)
  4083. {
  4084. try
  4085. {
  4086. if (Entity.op_Inequality((Entity) ped, (Entity) Game.get_Player().get_Character()))
  4087. {
  4088. ((Entity) ped).set_Health(-1);
  4089. ((Entity) ped).set_IsVisible(false);
  4090. }
  4091. }
  4092. catch (Exception ex)
  4093. {
  4094. ProjectData.SetProjectError(ex);
  4095. ProjectData.ClearProjectError();
  4096. }
  4097. }
  4098. }
  4099. finally
  4100. {
  4101. List<Entity>.Enumerator enumerator;
  4102. enumerator.Dispose();
  4103. }
  4104. }
  4105. TimeSpan timeSpan;
  4106. if (THelper.Exists((Entity) this.\u00378AA0))
  4107. {
  4108. if (this.\u0030EAAA % 100 == 0)
  4109. {
  4110. int num1;
  4111. if (!this.\u0033CAA0 && !((Entity) this.\u00378AA0).IsTouching((Entity) Game.get_Player().get_Character()))
  4112. {
  4113. timeSpan = DateAndTime.Now.Subtract(this.\u00388AAA);
  4114. if (timeSpan.TotalMilliseconds > 2000.0)
  4115. {
  4116. num1 = 1;
  4117. goto label_25;
  4118. }
  4119. }
  4120. num1 = 0;
  4121. label_25:
  4122. if (num1 != 0)
  4123. {
  4124. RaycastResult raycastResult = World.Raycast(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.Normalize(Vector3.op_Subtraction(((Entity) this.\u00378AA0).get_Position(), ((Entity) Game.get_Player().get_Character()).get_Position())), 1.5f)), (IntersectOptions) -1, (Entity) Game.get_Player().get_Character());
  4125. // ISSUE: explicit reference operation
  4126. // ISSUE: explicit reference operation
  4127. if (!THelper.Exists(((RaycastResult) @raycastResult).get_HitEntity()) || Entity.op_Inequality(((RaycastResult) @raycastResult).get_HitEntity(), (Entity) this.\u00378AA0))
  4128. {
  4129. this.\u00378AA0 = (Vehicle) null;
  4130. this.\u00359AA0 = false;
  4131. }
  4132. }
  4133. if (THelper.Exists((Entity) this.\u00378AA0))
  4134. {
  4135. Ped pedOnSeat = this.\u00378AA0.GetPedOnSeat((VehicleSeat) -1);
  4136. if (!THelper.Exists((Entity) pedOnSeat))
  4137. {
  4138. this.\u00359AA0 = true;
  4139. }
  4140. else
  4141. {
  4142. Vector3 offsetInWorldCoords = ((Entity) pedOnSeat).GetOffsetInWorldCoords(Vector3.get_Zero());
  4143. int num2;
  4144. if (!this.\u0033CAA0)
  4145. {
  4146. Model model = ((Entity) this.\u00378AA0).get_Model();
  4147. // ISSUE: explicit reference operation
  4148. if (((Model) @model).get_IsTrain() || THelper.getDistance2D(offsetInWorldCoords, ((Entity) Game.get_Player().get_Character()).get_Position()) >= 1.0)
  4149. {
  4150. num2 = 0;
  4151. goto label_36;
  4152. }
  4153. }
  4154. num2 = 1;
  4155. label_36:
  4156. this.\u00359AA0 = num2 != 0;
  4157. if (this.\u00359AA0)
  4158. UI.ShowSubtitle("Press Enter Vehicle button to steal the vehicle...", 150);
  4159. }
  4160. }
  4161. }
  4162. }
  4163. else if (this.\u0030EAAA % 200 == 0)
  4164. this.\u00359AA0 = false;
  4165. int index2 = checked (JC2.\u00368AAA.Count - 1);
  4166. while (index2 >= 0)
  4167. {
  4168. try
  4169. {
  4170. JC2.\u00368AAA[index2].tick();
  4171. }
  4172. catch (Exception ex)
  4173. {
  4174. ProjectData.SetProjectError(ex);
  4175. ProjectData.ClearProjectError();
  4176. }
  4177. checked { index2 += -1; }
  4178. }
  4179. this.\u0030EAAA = checked (this.\u0030EAAA + 10);
  4180. if (this.\u0030EAAA > 1000)
  4181. this.\u0030EAAA = 0;
  4182. if (this.\u0030EAAA % 500 == 0)
  4183. this.\u00372AA0();
  4184. this.\u00370AA0();
  4185. if (((Entity) Game.get_Player().get_Character()).get_Health() <= 0)
  4186. {
  4187. this.\u00331AA0(false);
  4188. this.\u00371AA0();
  4189. this.\u00380AAA();
  4190. }
  4191. else
  4192. {
  4193. Vector3 vector3_1;
  4194. if (this.\u0033DAA0)
  4195. {
  4196. int parachuteState = (int) THelper.getParachuteState();
  4197. timeSpan = DateAndTime.Now.Subtract(this.\u0032DAAA);
  4198. double totalMilliseconds = timeSpan.TotalMilliseconds;
  4199. Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  4200. direction.Z = (__Null) 0.0;
  4201. if (!THelper.Exists((Entity) this.\u0031EAA0))
  4202. {
  4203. Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
  4204. int num = (int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
  4205. {
  4206. InputArgument.op_Implicit("p_parachute1_sp_s")
  4207. });
  4208. this.\u0031EAA0 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
  4209. {
  4210. InputArgument.op_Implicit((float) position.X),
  4211. InputArgument.op_Implicit((float) position.Y),
  4212. InputArgument.op_Implicit((float) position.Z),
  4213. InputArgument.op_Implicit(5.0),
  4214. InputArgument.op_Implicit(num),
  4215. InputArgument.op_Implicit(0),
  4216. InputArgument.op_Implicit(0),
  4217. InputArgument.op_Implicit(1)
  4218. });
  4219. this.\u0032EAAA = true;
  4220. }
  4221. if (totalMilliseconds < 3000.0)
  4222. {
  4223. if (parachuteState == 1 && this.\u0032EAAA && THelper.Exists((Entity) this.\u0031EAA0))
  4224. {
  4225. vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
  4226. this.\u0032EAAA = vector3_1.Z < 1.0;
  4227. Prop prop = this.\u0031EAA0;
  4228. ((Entity) prop).set_Velocity(Vector3.op_Addition(((Entity) prop).get_Velocity(), Vector3.op_Multiply(Vector3.get_WorldUp(), 10f)));
  4229. }
  4230. int num;
  4231. if (parachuteState == 1)
  4232. {
  4233. vector3_1 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  4234. // ISSUE: explicit reference operation
  4235. if ((double) ((Vector3) @vector3_1).Length() < this.\u0034DAAA * 0.4)
  4236. {
  4237. num = 1;
  4238. goto label_64;
  4239. }
  4240. }
  4241. num = 0;
  4242. label_64:
  4243. if (num != 0)
  4244. ((Entity) Game.get_Player().get_Character()).ApplyForce(direction);
  4245. }
  4246. else
  4247. this.\u0033DAA0 = false;
  4248. }
  4249. if (THelper.Exists((Entity) this.\u0031EAA0))
  4250. {
  4251. if (!THelper.isButtonPressed(THelper.controls.INPUT_MOVE_UP_ONLY))
  4252. {
  4253. vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
  4254. if ((double) vector3_1.Z < -2.5)
  4255. ((Entity) this.\u0031EAA0).ApplyForce(Vector3.get_WorldUp());
  4256. }
  4257. vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
  4258. // ISSUE: explicit reference operation
  4259. if ((double) ((Vector3) @vector3_1).Length() < this.\u0034DAAA * 0.4 && !THelper.isButtonPressed(THelper.controls.INPUT_MOVE_DOWN_ONLY))
  4260. ((Entity) this.\u0031EAA0).ApplyForce(THelper.RotationToDirection(((Entity) this.\u0031EAA0).get_Rotation()));
  4261. }
  4262. else
  4263. this.\u0031EAA0 = (Prop) null;
  4264. if (this.\u0033CAA0)
  4265. {
  4266. try
  4267. {
  4268. if (Game.IsKeyPressed(this.\u00376AA0))
  4269. {
  4270. this.\u00371AA0();
  4271. }
  4272. else
  4273. {
  4274. int num;
  4275. if (THelper.Exists(this.\u0038DAAA))
  4276. {
  4277. Model model = this.\u0038DAAA.get_Model();
  4278. // ISSUE: explicit reference operation
  4279. if (((Model) @model).get_IsHelicopter())
  4280. {
  4281. num = 1;
  4282. goto label_83;
  4283. }
  4284. }
  4285. num = 0;
  4286. label_83:
  4287. if (num != 0)
  4288. {
  4289. Entity entity1 = this.\u0038DAAA;
  4290. // ISSUE: explicit reference operation
  4291. ((Vector3) @vector3_1).\u002Ector(0.0f, 0.0f, -2f);
  4292. Vector3 vector3_2 = vector3_1;
  4293. Vector3 offsetInWorldCoords = entity1.GetOffsetInWorldCoords(vector3_2);
  4294. Entity entity2 = this.\u0038DAAA;
  4295. // ISSUE: explicit reference operation
  4296. ((Vector3) @vector3_1).\u002Ector(0.0f, 0.0f, -2f);
  4297. Vector3 vector3_3 = vector3_1;
  4298. entity2.GetOffsetInWorldCoords(vector3_3);
  4299. if (THelper.Exists((Entity) this.BBAAA))
  4300. ((Entity) this.BBAAA).set_Velocity(Vector3.op_Multiply(Vector3.op_Subtraction(offsetInWorldCoords, ((Entity) this.BBAAA).get_Position()), 4f));
  4301. if (this.\u0030EAAA % 100 != 0)
  4302. ;
  4303. }
  4304. }
  4305. }
  4306. catch (Exception ex)
  4307. {
  4308. ProjectData.SetProjectError(ex);
  4309. this.\u00371AA0();
  4310. ProjectData.ClearProjectError();
  4311. }
  4312. }
  4313. else
  4314. {
  4315. if (THelper.Exists(this.\u00399AA0) && (double) World.GetDistance(this.\u00399AA0.get_Position(), GameplayCamera.get_Position()) < 200.0)
  4316. {
  4317. int num;
  4318. if (THelper.isPed(this.\u00399AA0))
  4319. {
  4320. if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
  4321. {
  4322. InputArgument.op_Implicit(this.\u00399AA0)
  4323. }) == null)
  4324. {
  4325. num = 1;
  4326. goto label_96;
  4327. }
  4328. }
  4329. num = 0;
  4330. label_96:
  4331. if (num != 0)
  4332. {
  4333. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  4334. {
  4335. InputArgument.op_Implicit(this.\u00399AA0),
  4336. InputArgument.op_Implicit(true)
  4337. });
  4338. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  4339. {
  4340. InputArgument.op_Implicit(this.\u00399AA0),
  4341. InputArgument.op_Implicit(5000),
  4342. InputArgument.op_Implicit(5000),
  4343. InputArgument.op_Implicit(0),
  4344. InputArgument.op_Implicit(0),
  4345. InputArgument.op_Implicit(0)
  4346. });
  4347. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  4348. {
  4349. InputArgument.op_Implicit(this.\u00399AA0),
  4350. InputArgument.op_Implicit(false)
  4351. });
  4352. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  4353. {
  4354. InputArgument.op_Implicit(this.\u00399AA0),
  4355. InputArgument.op_Implicit(false)
  4356. });
  4357. }
  4358. }
  4359. if (THelper.Exists(this.C9AA0) && (double) World.GetDistance(this.C9AA0.get_Position(), GameplayCamera.get_Position()) < 200.0)
  4360. {
  4361. int num;
  4362. if (THelper.isPed(this.C9AA0))
  4363. {
  4364. if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
  4365. {
  4366. InputArgument.op_Implicit(this.C9AA0)
  4367. }) == null)
  4368. {
  4369. num = 1;
  4370. goto label_104;
  4371. }
  4372. }
  4373. num = 0;
  4374. label_104:
  4375. if (num != 0)
  4376. {
  4377. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  4378. {
  4379. InputArgument.op_Implicit(this.C9AA0),
  4380. InputArgument.op_Implicit(true)
  4381. });
  4382. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  4383. {
  4384. InputArgument.op_Implicit(this.C9AA0),
  4385. InputArgument.op_Implicit(5000),
  4386. InputArgument.op_Implicit(5000),
  4387. InputArgument.op_Implicit(0),
  4388. InputArgument.op_Implicit(0),
  4389. InputArgument.op_Implicit(0)
  4390. });
  4391. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  4392. {
  4393. InputArgument.op_Implicit(this.C9AA0),
  4394. InputArgument.op_Implicit(false)
  4395. });
  4396. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  4397. {
  4398. InputArgument.op_Implicit(this.C9AA0),
  4399. InputArgument.op_Implicit(false)
  4400. });
  4401. }
  4402. }
  4403. if (this.\u0031CAA0)
  4404. {
  4405. if (!THelper.isButtonPressed(THelper.controls.INPUT_AIM) || this.\u0031DAA0)
  4406. {
  4407. if (Game.get_Player().get_Character().get_IsRagdoll())
  4408. {
  4409. this.\u00331AA0(false);
  4410. return;
  4411. }
  4412. Vector3 vector3_2;
  4413. if (THelper.Exists(this.\u00399AA0))
  4414. {
  4415. if (THelper.isPed(this.\u00399AA0))
  4416. {
  4417. if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  4418. {
  4419. Vehicle currentVehicle = Game.get_Player().get_Character().get_CurrentVehicle();
  4420. this.\u00331AA0(false);
  4421. vector3_1 = this.\u00399AA0.get_Position();
  4422. // ISSUE: explicit reference operation
  4423. double pDist = (double) ((Vector3) @vector3_1).DistanceTo(((Entity) currentVehicle).get_Position());
  4424. Rope rope = JC2.createRope((Entity) currentVehicle, this.\u00399AA0, 1.0, 0.0, (Bone) -1);
  4425. JC2.attachEntitiesToRope(rope, this.\u00399AA0, (Entity) currentVehicle, 1.0, 0.0, vector3_2, vector3_2);
  4426. JC2.TEntityInRope tentityInRope = new JC2.TEntityInRope(this.\u00399AA0, (Entity) currentVehicle, rope, pDist, Vector3.get_Zero(), Vector3.get_Zero());
  4427. if (THelper.isObject(this.\u00399AA0))
  4428. this.\u00399AA0.ApplyForce(Vector3.op_Subtraction(((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Position(), this.\u00399AA0.get_Position()));
  4429. this.\u00399AA0 = (Entity) null;
  4430. }
  4431. else
  4432. {
  4433. DateTime now = DateAndTime.Now;
  4434. if (THelper.isPed(this.\u00399AA0))
  4435. {
  4436. while (true)
  4437. {
  4438. int num1 = Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
  4439. {
  4440. InputArgument.op_Implicit(this.\u00399AA0)
  4441. }) == 0 ? 1 : 0;
  4442. timeSpan = DateAndTime.Now.Subtract(now);
  4443. int num2 = timeSpan.TotalMilliseconds < 1000.0 ? 1 : 0;
  4444. if ((num1 & num2) != 0)
  4445. {
  4446. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  4447. {
  4448. InputArgument.op_Implicit(this.\u00399AA0),
  4449. InputArgument.op_Implicit(true)
  4450. });
  4451. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  4452. {
  4453. InputArgument.op_Implicit(this.\u00399AA0),
  4454. InputArgument.op_Implicit(3000),
  4455. InputArgument.op_Implicit(3000),
  4456. InputArgument.op_Implicit(0),
  4457. InputArgument.op_Implicit(0),
  4458. InputArgument.op_Implicit(0)
  4459. });
  4460. }
  4461. else
  4462. break;
  4463. }
  4464. }
  4465. if (!this.\u0031DAA0)
  4466. {
  4467. if (THelper.anim_requestDict(this.\u00308AAA))
  4468. {
  4469. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  4470. THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 8.0, THelper.animFlags.normal, false);
  4471. Script.Wait(100);
  4472. if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 1.0))
  4473. {
  4474. THelper.anim_setAnimTime((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.01);
  4475. THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 4.0);
  4476. }
  4477. }
  4478. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.05))
  4479. Script.Wait(10);
  4480. }
  4481. this.\u00331AA0(false);
  4482. GameplayCamera.Shake((CameraShake) 1, 0.1f);
  4483. double num3 = 15.0;
  4484. double num4 = 10.0;
  4485. vector3_1 = this.\u00399AA0.get_Position();
  4486. // ISSUE: explicit reference operation
  4487. double num5 = (double) ((Vector3) @vector3_1).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
  4488. double num6 = (double) System.Math.Max((float) num4, (float) num5);
  4489. double num7 = (double) System.Math.Min((float) num3, (float) num6);
  4490. Vector3 vector3_3 = Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num7));
  4491. Vector3 position = this.\u00399AA0.get_Position();
  4492. while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.085))
  4493. {
  4494. int num1;
  4495. if (THelper.Exists(this.\u00399AA0))
  4496. {
  4497. vector3_1 = this.\u00399AA0.get_Position();
  4498. // ISSUE: explicit reference operation
  4499. if ((double) ((Vector3) @vector3_1).DistanceTo(vector3_3) > 2.0)
  4500. {
  4501. num1 = 1;
  4502. goto label_132;
  4503. }
  4504. }
  4505. num1 = 0;
  4506. label_132:
  4507. if (num1 != 0)
  4508. this.\u00399AA0.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.Normalize(Vector3.op_Subtraction(vector3_3, position)), (float) num7), 0.1f), Vector3.get_WorldNorth());
  4509. Script.Wait(10);
  4510. }
  4511. GameplayCamera.StopShaking();
  4512. Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00308AAA, this.\u00318AA0);
  4513. }
  4514. }
  4515. else
  4516. {
  4517. if (THelper.isObject(this.\u00399AA0))
  4518. this.\u00399AA0.ApplyForce(Vector3.op_Multiply(Vector3.op_Subtraction(((Entity) Game.get_Player().get_Character()).get_Position(), this.\u00399AA0.get_Position()), 0.7f), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
  4519. this.\u00351AA0(this.\u00399AA0, vector3_2);
  4520. }
  4521. }
  4522. else
  4523. this.\u00351AA0((Entity) null, this.\u0031BAA0);
  4524. this.\u00399AA0 = (Entity) null;
  4525. this.C9AA0 = (Entity) null;
  4526. this.\u0031BAA0 = (Vector3) null;
  4527. }
  4528. else if (this.\u0030EAAA % 50 == 0 && THelper.Exists(this.\u00399AA0))
  4529. this.\u00361AAA(this.\u00399AA0);
  4530. }
  4531. this.\u00340AAA();
  4532. this.\u00332AA0();
  4533. }
  4534. }
  4535. }
  4536. }
  4537.  
  4538. private void \u00332AA0()
  4539. {
  4540. try
  4541. {
  4542. if (!this.\u00307AAA)
  4543. return;
  4544. bool flag1 = this.\u0039FAA0 && !this.\u0031DAA0;
  4545. if (flag1)
  4546. {
  4547. int num;
  4548. switch ((ulong) Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash())
  4549. {
  4550. case 2725352035:
  4551. case 126349499:
  4552. case 615608432:
  4553. case 4256991824:
  4554. case 2508868239:
  4555. case 741814745:
  4556. case 2874559379:
  4557. case 883325847:
  4558. case 1737195953:
  4559. case 2578778090:
  4560. case 1317494643:
  4561. case 4191993645:
  4562. case 1141786504:
  4563. case 101631238:
  4564. case 2138347493:
  4565. case 2460120199:
  4566. case 2227010557:
  4567. case 2694266206:
  4568. case 2481070269:
  4569. num = 1;
  4570. break;
  4571. default:
  4572. num = 0;
  4573. break;
  4574. }
  4575. if (num != 0)
  4576. return;
  4577. }
  4578. OutputArgument outputArgument = new OutputArgument();
  4579. bool flag2 = false;
  4580. bool flag3 = !flag1 && THelper.isButtonPressed(THelper.controls.INPUT_AIM) && THelper.isButtonJustPressed(THelper.controls.INPUT_ATTACK);
  4581. if (flag1 && Game.get_Player().get_Character().get_IsShooting() || flag3)
  4582. {
  4583. this.\u0030FAAA = DateAndTime.Now;
  4584. this.\u0031FAA0 = true;
  4585. }
  4586. Vector3 vector3_1 = Vector3.get_Zero();
  4587. Prop prop1 = (Prop) null;
  4588. Entity entity1 = (Entity) null;
  4589. Vector3 zero = Vector3.get_Zero();
  4590. Vector3 ᙂ1 = Vector3.get_Zero();
  4591. Vector3 direction1 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  4592. int num1;
  4593. if (!flag3)
  4594. {
  4595. if (flag1)
  4596. {
  4597. if (Function.Call<bool>((Hash) 7803898169126431682L, new InputArgument[2]
  4598. {
  4599. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  4600. (InputArgument) outputArgument
  4601. }) != null)
  4602. goto label_13;
  4603. }
  4604. num1 = 0;
  4605. goto label_14;
  4606. }
  4607. label_13:
  4608. num1 = 1;
  4609. label_14:
  4610. if (num1 != 0)
  4611. {
  4612. if (!flag3)
  4613. {
  4614. ᙂ1 = Vector3.op_Addition((Vector3) outputArgument.GetResult<Vector3>(), direction1);
  4615. outputArgument.Dispose();
  4616. }
  4617. else
  4618. ᙂ1 = this.BEAAA;
  4619. entity1 = this.\u00390AA0(ᙂ1, ref zero);
  4620. if (!THelper.Exists(entity1))
  4621. entity1 = (Entity) this.\u00362AAA(ᙂ1);
  4622. if (flag1 && !THelper.Exists(entity1) && this.\u0033FAA0)
  4623. {
  4624. this.\u0033FAA0 = false;
  4625. Vector3 direction2 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  4626. Vector3 vector3_2 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction2, 10f));
  4627. Vector3 vector3_3 = Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, 500f));
  4628. int hash = checked ((int) Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash());
  4629. Function.Call((Hash) -8757719191175270612L, new InputArgument[13]
  4630. {
  4631. InputArgument.op_Implicit((float) vector3_2.X),
  4632. InputArgument.op_Implicit((float) vector3_2.Y),
  4633. InputArgument.op_Implicit((float) vector3_2.Z),
  4634. InputArgument.op_Implicit((float) vector3_3.X),
  4635. InputArgument.op_Implicit((float) vector3_3.Y),
  4636. InputArgument.op_Implicit((float) vector3_3.Z),
  4637. InputArgument.op_Implicit(0),
  4638. InputArgument.op_Implicit(1),
  4639. InputArgument.op_Implicit(hash),
  4640. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  4641. InputArgument.op_Implicit(1),
  4642. InputArgument.op_Implicit(1),
  4643. InputArgument.op_Implicit(0)
  4644. });
  4645. return;
  4646. }
  4647. flag2 = THelper.Exists(entity1);
  4648. this.\u0033FAA0 = true;
  4649. }
  4650. if (this.\u0033FAA0 && !flag2 && (DateAndTime.Now.Subtract(this.\u0030FAAA).TotalMilliseconds < 200.0 && this.\u0031FAA0))
  4651. {
  4652. this.\u0030FAAA = DateAndTime.Now.Subtract(new TimeSpan(1, 1, 1));
  4653. this.\u0031FAA0 = false;
  4654. entity1 = this.\u00390AA0(((Entity) Game.get_Player().get_Character()).get_Position(), ref zero);
  4655. if (!THelper.Exists(entity1))
  4656. {
  4657. Vector3 direction2 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  4658. Vector3 vector3_2 = Vector3.op_Addition(GameplayCamera.get_Position(), direction2);
  4659. short num2 = 0;
  4660. do
  4661. {
  4662. prop1 = THelper.getTargetedDistProp(Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, (float) num2)), Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, (float) checked ((int) num2 + 100))), 101.0, (Entity) null);
  4663. if (!THelper.Exists((Entity) prop1))
  4664. num2 += (short) 100;
  4665. else
  4666. break;
  4667. }
  4668. while ((int) num2 <= 2000);
  4669. if (!THelper.Exists((Entity) prop1))
  4670. {
  4671. short num3 = 0;
  4672. do
  4673. {
  4674. vector3_1 = THelper.getTargetedCoord(Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, (float) num3)), Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, (float) checked ((int) num3 + 100))), 101.0);
  4675. if (!Vector3.op_Inequality(vector3_1, Vector3.get_Zero()))
  4676. num3 += (short) 100;
  4677. else
  4678. break;
  4679. }
  4680. while ((int) num3 <= 500);
  4681. }
  4682. if (Vector3.op_Equality(vector3_1, Vector3.get_Zero()))
  4683. vector3_1 = this.BEAAA;
  4684. flag2 = Vector3.op_Inequality(vector3_1, Vector3.get_Zero()) || THelper.Exists((Entity) prop1);
  4685. }
  4686. else
  4687. flag2 = true;
  4688. }
  4689. if (flag2 && DateAndTime.Now.Subtract(this.\u0038BAAA).TotalMilliseconds > 200.0)
  4690. {
  4691. this.\u0038BAAA = DateAndTime.Now;
  4692. THelper.play3DSound(".\\scripts\\jc3 files\\hook_start.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
  4693. if (Vector3.op_Inequality(vector3_1, Vector3.get_Zero()))
  4694. ᙂ1 = vector3_1;
  4695. else if (THelper.Exists((Entity) prop1))
  4696. {
  4697. ᙂ1 = ((Entity) prop1).get_Position();
  4698. try
  4699. {
  4700. entity1 = (Entity) prop1;
  4701. }
  4702. catch (Exception ex)
  4703. {
  4704. ProjectData.SetProjectError(ex);
  4705. ProjectData.ClearProjectError();
  4706. }
  4707. }
  4708. Entity entity2;
  4709. if (!this.\u0036DAAA && THelper.Exists(entity1))
  4710. {
  4711. int num2;
  4712. if (Entity.op_Inequality(entity1, (Entity) this.CFAA0))
  4713. {
  4714. Model model = entity1.get_Model();
  4715. // ISSUE: explicit reference operation
  4716. if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
  4717. {
  4718. num2 = 1;
  4719. goto label_52;
  4720. }
  4721. }
  4722. num2 = 0;
  4723. label_52:
  4724. if (num2 != 0)
  4725. {
  4726. this.CFAA0 = (Prop) entity1;
  4727. this.\u00382AAA(entity1);
  4728. }
  4729. Prop prop2 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
  4730. {
  4731. InputArgument.op_Implicit((float) ᙂ1.X),
  4732. InputArgument.op_Implicit((float) ᙂ1.Y),
  4733. InputArgument.op_Implicit((float) ᙂ1.Z),
  4734. InputArgument.op_Implicit((float) (JC2.\u0038FAAA.Y * 5.0)),
  4735. InputArgument.op_Implicit(JC2.\u0037FAA0),
  4736. InputArgument.op_Implicit(0),
  4737. InputArgument.op_Implicit(0),
  4738. InputArgument.op_Implicit(0)
  4739. });
  4740. if (THelper.Exists((Entity) prop2) && ((Entity) prop2).IsAttached() && !((Entity) prop2).get_IsVisible())
  4741. {
  4742. entity1 = (Entity) prop2;
  4743. }
  4744. else
  4745. {
  4746. Model model = entity1.get_Model();
  4747. // ISSUE: explicit reference operation
  4748. if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
  4749. {
  4750. entity2 = (Entity) null;
  4751. return;
  4752. }
  4753. }
  4754. }
  4755. this.\u0032BAAA = DateAndTime.Now;
  4756. if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()) && THelper.Exists(entity1) && (!THelper.isVehicle(entity1) && THelper.Exists(this.\u00399AA0)))
  4757. {
  4758. this.\u00399AA0 = (Entity) Game.get_Player().get_Character().get_CurrentVehicle();
  4759. this.C9AA0 = (Entity) null;
  4760. }
  4761. Vector3 ᙄ;
  4762. if (THelper.Exists(entity1))
  4763. {
  4764. this.\u0032BAAA = DateAndTime.Now;
  4765. if (this.\u0031CAA0 && !THelper.Exists(this.\u00399AA0))
  4766. {
  4767. this.\u00399AA0 = entity1;
  4768. this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.\u0031BAA0, this.\u00399AA0.get_Position()));
  4769. this.\u00331AA0(false);
  4770. this.\u00348AAA = true;
  4771. this.\u0039AAA0(this.\u0031BAA0, this.\u00399AA0, (Entity) null, (short) 0, ᙄ);
  4772. entity2 = (Entity) null;
  4773. this.\u00399AA0 = (Entity) null;
  4774. this.C9AA0 = (Entity) null;
  4775. this.\u0031BAA0 = (Vector3) null;
  4776. }
  4777. else
  4778. {
  4779. if (THelper.isPed(entity1))
  4780. {
  4781. Ped ped = (Ped) entity1;
  4782. if (THelper.Exists((Entity) ped.get_CurrentVehicle()))
  4783. entity1 = (Entity) ped.get_CurrentVehicle();
  4784. }
  4785. if (!THelper.Exists(this.\u00399AA0))
  4786. {
  4787. if (Entity.op_Inequality(entity1, this.\u00399AA0))
  4788. {
  4789. this.\u00399AA0 = entity1;
  4790. this.C9AA0 = (Entity) null;
  4791. this.B9AAA = zero;
  4792. this.\u0031BAA0 = (Vector3) null;
  4793. Entity ᙂ2 = this.\u00399AA0;
  4794. Vector3 vector3_2 = ᙄ;
  4795. // ISSUE: explicit reference operation
  4796. // ISSUE: variable of a reference type
  4797. Vector3& local = @vector3_2;
  4798. Vector3 offsetFromWorldCoords = this.\u00399AA0.GetOffsetFromWorldCoords(this.BEAAA);
  4799. this.\u00321AAA(ᙂ2, local, offsetFromWorldCoords);
  4800. }
  4801. }
  4802. else
  4803. {
  4804. this.C9AA0 = entity1;
  4805. this.\u0030BAAA = zero;
  4806. this.\u00331AA0(false);
  4807. this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.C9AA0.get_Position(), this.\u00399AA0.get_Position()));
  4808. double distance = (double) World.GetDistance(this.C9AA0.get_Position(), this.\u00399AA0.get_Position());
  4809. Rope rope = JC2.createRope(this.\u00399AA0, this.C9AA0, 1.0, distance, (Bone) -1);
  4810. if (Entity.op_Inequality(this.\u00399AA0, this.C9AA0) && !this.BAAAA(this.\u00399AA0, this.C9AA0))
  4811. {
  4812. int num2;
  4813. if (THelper.isObject(this.\u00399AA0))
  4814. {
  4815. Vector3 velocity = this.\u00399AA0.get_Velocity();
  4816. // ISSUE: explicit reference operation
  4817. if ((double) ((Vector3) @velocity).Length() < 0.05)
  4818. {
  4819. num2 = 1;
  4820. goto label_76;
  4821. }
  4822. }
  4823. num2 = 0;
  4824. label_76:
  4825. if (num2 != 0)
  4826. {
  4827. this.\u00399AA0.set_FreezePosition(false);
  4828. this.\u00399AA0.ApplyForce(Vector3.op_Subtraction(this.C9AA0.get_Position(), this.\u00399AA0.get_Position()), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
  4829. }
  4830. int num3;
  4831. if (THelper.isObject(this.C9AA0))
  4832. {
  4833. Vector3 velocity = this.C9AA0.get_Velocity();
  4834. // ISSUE: explicit reference operation
  4835. if ((double) ((Vector3) @velocity).Length() < 0.05)
  4836. {
  4837. num3 = 1;
  4838. goto label_82;
  4839. }
  4840. }
  4841. num3 = 0;
  4842. label_82:
  4843. if (num3 != 0)
  4844. {
  4845. this.C9AA0.set_FreezePosition(false);
  4846. this.C9AA0.ApplyForce(Vector3.op_Subtraction(this.\u00399AA0.get_Position(), this.C9AA0.get_Position()), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
  4847. }
  4848. if (THelper.isPed(this.\u00399AA0) || THelper.isObject(this.\u00399AA0))
  4849. JC2.attachEntitiesToRope(rope, this.\u00399AA0, this.C9AA0, 1.0, 0.0, this.\u0030BAAA, this.B9AAA);
  4850. else
  4851. JC2.attachEntitiesToRope(rope, this.C9AA0, this.\u00399AA0, 1.0, 0.0, this.\u00342AAA(this.C9AA0), this.\u00342AAA(this.\u00399AA0));
  4852. if (THelper.isPed(this.\u00399AA0) || THelper.isObject(this.\u00399AA0))
  4853. this.\u00399AA0.ApplyForce(Vector3.op_Multiply(this.C3AA0, (float) distance));
  4854. JC2.TEntityInRope tentityInRope = new JC2.TEntityInRope(this.\u00399AA0, this.C9AA0, rope, distance, this.\u0030BAAA, this.B9AAA);
  4855. if (THelper.isPed(this.C9AA0) || THelper.isObject(this.C9AA0))
  4856. this.C9AA0.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(this.C3AA0, (float) distance), -1f));
  4857. this.C9AA0 = (Entity) null;
  4858. this.\u00399AA0 = (Entity) null;
  4859. this.\u0031BAA0 = (Vector3) null;
  4860. }
  4861. else
  4862. {
  4863. this.C9AA0 = (Entity) null;
  4864. this.\u00399AA0 = (Entity) null;
  4865. this.\u0031BAA0 = (Vector3) null;
  4866. }
  4867. }
  4868. }
  4869. }
  4870. else
  4871. {
  4872. this.\u0031BAA0 = ᙂ1;
  4873. if (!THelper.Exists(this.\u00399AA0))
  4874. {
  4875. if (this.\u0031CAA0)
  4876. {
  4877. this.\u0031BAA0 = (Vector3) null;
  4878. this.\u00331AA0(false);
  4879. }
  4880. else
  4881. this.\u00321AAA((Entity) null, ref this.\u0031BAA0, ᙄ);
  4882. this.\u00399AA0 = (Entity) null;
  4883. this.C9AA0 = (Entity) null;
  4884. }
  4885. else
  4886. {
  4887. this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.\u0031BAA0, this.\u00399AA0.get_Position()));
  4888. this.\u00331AA0(false);
  4889. this.\u0039AAA0(this.\u0031BAA0, this.\u00399AA0, (Entity) null, (short) 0, ᙄ);
  4890. this.\u00399AA0 = (Entity) null;
  4891. this.C9AA0 = (Entity) null;
  4892. this.\u0031BAA0 = (Vector3) null;
  4893. }
  4894. }
  4895. }
  4896. }
  4897. catch (Exception ex)
  4898. {
  4899. ProjectData.SetProjectError(ex);
  4900. UI.ShowSubtitle("Hook creation error: " + ex.Message);
  4901. this.\u00331AA0(false);
  4902. this.\u00399AA0 = (Entity) null;
  4903. this.C9AA0 = (Entity) null;
  4904. this.\u0031BAA0 = (Vector3) null;
  4905. ProjectData.ClearProjectError();
  4906. }
  4907. }
  4908.  
  4909. private Vector3 \u00342AAA(Entity ᙂ)
  4910. {
  4911. int index = checked (JC2.BFAAA.Count - 1);
  4912. while (index >= 0)
  4913. {
  4914. try
  4915. {
  4916. if (JC2.BFAAA[index].ent.get_Handle() == ᙂ.get_Handle())
  4917. return JC2.BFAAA[index].offset;
  4918. }
  4919. catch (Exception ex)
  4920. {
  4921. ProjectData.SetProjectError(ex);
  4922. ProjectData.ClearProjectError();
  4923. }
  4924. checked { index += -1; }
  4925. }
  4926. return Vector3.get_Zero();
  4927. }
  4928.  
  4929. private static void \u00352AA0(Entity ᙂ)
  4930. {
  4931. int index = checked (JC2.BFAAA.Count - 1);
  4932. while (index >= 0)
  4933. {
  4934. try
  4935. {
  4936. if (JC2.BFAAA[index].ent.get_Handle() == ᙂ.get_Handle())
  4937. throw new Exception("finish");
  4938. }
  4939. catch (Exception ex)
  4940. {
  4941. ProjectData.SetProjectError(ex);
  4942. JC2.BFAAA.RemoveAt(index);
  4943. ProjectData.ClearProjectError();
  4944. }
  4945. checked { index += -1; }
  4946. }
  4947. }
  4948.  
  4949. private Prop \u00362AAA(Vector3 ᙂ)
  4950. {
  4951. OutputArgument outputArgument = new OutputArgument();
  4952. int num = (int) Function.Call<int>((Hash) 5730343094349521110L, new InputArgument[0]);
  4953. try
  4954. {
  4955. if ((bool) Function.Call<bool>((Hash) 2987514272108589712L, new InputArgument[2]
  4956. {
  4957. InputArgument.op_Implicit(num),
  4958. (InputArgument) outputArgument
  4959. }))
  4960. {
  4961. Prop result = (Prop) outputArgument.GetResult<Prop>();
  4962. if (THelper.Exists((Entity) result))
  4963. return result;
  4964. }
  4965. }
  4966. catch (Exception ex)
  4967. {
  4968. ProjectData.SetProjectError(ex);
  4969. ProjectData.ClearProjectError();
  4970. }
  4971. return (Prop) null;
  4972. }
  4973.  
  4974. private void \u00372AA0()
  4975. {
  4976. if (this.\u0036DAAA)
  4977. return;
  4978. try
  4979. {
  4980. if (Game.get_Player().get_IsAiming())
  4981. {
  4982. OutputArgument outputArgument = new OutputArgument();
  4983. if ((bool) Function.Call<bool>((Hash) 2987514272108589712L, new InputArgument[2]
  4984. {
  4985. InputArgument.op_Implicit(Game.get_Player()),
  4986. (InputArgument) outputArgument
  4987. }))
  4988. {
  4989. Prop result = (Prop) outputArgument.GetResult<Prop>();
  4990. int num;
  4991. if (THelper.Exists((Entity) result))
  4992. {
  4993. Model model = ((Entity) result).get_Model();
  4994. // ISSUE: explicit reference operation
  4995. if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
  4996. {
  4997. num = 1;
  4998. goto label_7;
  4999. }
  5000. }
  5001. num = 0;
  5002. label_7:
  5003. if (num != 0 && Entity.op_Inequality((Entity) this.CFAA0, (Entity) result))
  5004. {
  5005. this.CFAA0 = result;
  5006. this.\u00382AAA((Entity) result);
  5007. }
  5008. }
  5009. else
  5010. {
  5011. Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
  5012. Vector3 vector3_1 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction, 30f));
  5013. Vector3 vector3_2 = vector3_1;
  5014. Prop prop = (Prop) null;
  5015. // ISSUE: explicit reference operation
  5016. for (; (double) ((Vector3) @vector3_1).DistanceTo(vector3_2) < 50.0; vector3_1 = Vector3.op_Addition(vector3_1, Vector3.op_Multiply(direction, 4f)))
  5017. {
  5018. Vector3 groundPos = THelper.getGroundPos(Vector3.op_Addition(vector3_1, Vector3.op_Multiply(Vector3.get_WorldUp(), 50f)));
  5019. prop = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
  5020. {
  5021. InputArgument.op_Implicit((float) groundPos.X),
  5022. InputArgument.op_Implicit((float) groundPos.Y),
  5023. InputArgument.op_Implicit((float) groundPos.Z),
  5024. InputArgument.op_Implicit(5.0),
  5025. InputArgument.op_Implicit(JC2.\u0036FAAA),
  5026. InputArgument.op_Implicit(0),
  5027. InputArgument.op_Implicit(0),
  5028. InputArgument.op_Implicit(1)
  5029. });
  5030. if (THelper.Exists((Entity) prop))
  5031. break;
  5032. }
  5033. if (THelper.Exists((Entity) prop) && Entity.op_Inequality((Entity) this.CFAA0, (Entity) prop))
  5034. {
  5035. this.CFAA0 = prop;
  5036. this.\u00382AAA((Entity) prop);
  5037. }
  5038. }
  5039. }
  5040. }
  5041. catch (Exception ex)
  5042. {
  5043. ProjectData.SetProjectError(ex);
  5044. ProjectData.ClearProjectError();
  5045. }
  5046. }
  5047.  
  5048. private void \u00382AAA(Entity ᙂ)
  5049. {
  5050. if (this.\u0036DAAA)
  5051. return;
  5052. List<Prop> propList = new List<Prop>();
  5053. int index1 = checked (this.\u0030GAAA.Count - 1);
  5054. while (index1 >= 0)
  5055. {
  5056. try
  5057. {
  5058. Prop prop = this.\u0030GAAA[index1];
  5059. int num;
  5060. if (THelper.Exists((Entity) prop) && ((Entity) prop).IsAttached())
  5061. {
  5062. if (Function.Call<bool>((Hash) -1171374017519995096L, new InputArgument[2]
  5063. {
  5064. InputArgument.op_Implicit(prop),
  5065. InputArgument.op_Implicit(ᙂ)
  5066. }) != null)
  5067. {
  5068. num = 1;
  5069. goto label_7;
  5070. }
  5071. }
  5072. num = 0;
  5073. label_7:
  5074. if (num != 0)
  5075. {
  5076. int index2 = checked (JC2.\u0035BAA0.Count - 1);
  5077. while (index2 >= 0)
  5078. {
  5079. JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[index2];
  5080. if (Entity.op_Equality(tentityInRope.p1, (Entity) prop) || Entity.op_Equality(tentityInRope.p2, (Entity) prop))
  5081. tentityInRope.remove();
  5082. checked { index2 += -1; }
  5083. }
  5084. ((Entity) prop).Detach();
  5085. propList.Add(prop);
  5086. }
  5087. }
  5088. catch (Exception ex)
  5089. {
  5090. ProjectData.SetProjectError(ex);
  5091. ProjectData.ClearProjectError();
  5092. }
  5093. checked { index1 += -1; }
  5094. }
  5095. THelper.requestModel("", (long) JC2.\u0037FAA0, (short) 500, true);
  5096. Vector3 position = ᙂ.get_Position();
  5097. // ISSUE: explicit reference operation
  5098. Vector3 vector3_1 = Vector3.op_Addition(((Vector3) @position).Around(15f), Vector3.op_Multiply(Vector3.get_WorldDown(), 35f));
  5099. bool flag = false;
  5100. short num1 = 1;
  5101. Vector3 vector3_2;
  5102. do
  5103. {
  5104. Prop prop1;
  5105. if (propList.Count > 0)
  5106. {
  5107. prop1 = propList[0];
  5108. propList.RemoveAt(0);
  5109. }
  5110. else
  5111. prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
  5112. Script.Wait(10);
  5113. if (THelper.Exists((Entity) prop1))
  5114. {
  5115. this.\u0030GAAA.Add(prop1);
  5116. ((Entity) prop1).set_IsVisible(flag);
  5117. Prop prop2 = prop1;
  5118. Prop cfaA0 = this.CFAA0;
  5119. int num2 = 1;
  5120. // ISSUE: explicit reference operation
  5121. ((Vector3) @position).\u002Ector(0.0f, 0.0f, (float) (JC2.\u0038FAAA.Y * (double) num1 - (double) JC2.\u0038FAAA.Y * 0.5));
  5122. Vector3 vector3_3 = position;
  5123. // ISSUE: explicit reference operation
  5124. ((Vector3) @vector3_2).\u002Ector(90f, 0.0f, 0.0f);
  5125. Vector3 vector3_4 = vector3_2;
  5126. ((Entity) prop2).AttachTo((Entity) cfaA0, num2, vector3_3, vector3_4);
  5127. Script.Wait(10);
  5128. }
  5129. num1 += (short) 2;
  5130. }
  5131. while ((int) num1 <= 7);
  5132. short num3 = 1;
  5133. do
  5134. {
  5135. Prop prop1;
  5136. if (propList.Count > 0)
  5137. {
  5138. prop1 = propList[0];
  5139. propList.RemoveAt(0);
  5140. }
  5141. else
  5142. prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
  5143. Script.Wait(10);
  5144. if (THelper.Exists((Entity) prop1))
  5145. {
  5146. this.\u0030GAAA.Add(prop1);
  5147. ((Entity) prop1).set_IsVisible(flag);
  5148. double num2 = JC2.\u0038FAAA.Y * (double) num3 - (double) JC2.\u0038FAAA.Y * 0.5;
  5149. Prop prop2 = prop1;
  5150. Prop cfaA0 = this.CFAA0;
  5151. int num4 = 1;
  5152. // ISSUE: explicit reference operation
  5153. ((Vector3) @vector3_2).\u002Ector((float) (num2 * 0.9), 0.0f, (float) (num2 * -0.6));
  5154. Vector3 vector3_3 = vector3_2;
  5155. // ISSUE: explicit reference operation
  5156. ((Vector3) @position).\u002Ector(90f, 120f, 0.0f);
  5157. Vector3 vector3_4 = position;
  5158. ((Entity) prop2).AttachTo((Entity) cfaA0, num4, vector3_3, vector3_4);
  5159. Script.Wait(10);
  5160. }
  5161. num3 += (short) 2;
  5162. }
  5163. while ((int) num3 <= 7);
  5164. short num5 = 1;
  5165. do
  5166. {
  5167. Prop prop1;
  5168. if (propList.Count > 0)
  5169. {
  5170. prop1 = propList[0];
  5171. propList.RemoveAt(0);
  5172. }
  5173. else
  5174. prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
  5175. Script.Wait(10);
  5176. if (THelper.Exists((Entity) prop1))
  5177. {
  5178. this.\u0030GAAA.Add(prop1);
  5179. ((Entity) prop1).set_IsVisible(flag);
  5180. double num2 = JC2.\u0038FAAA.Y * (double) num5 - (double) JC2.\u0038FAAA.Y * 0.5;
  5181. Prop prop2 = prop1;
  5182. Prop cfaA0 = this.CFAA0;
  5183. int num4 = 1;
  5184. // ISSUE: explicit reference operation
  5185. ((Vector3) @vector3_2).\u002Ector((float) (num2 * -0.9), 0.0f, (float) (num2 * -0.6));
  5186. Vector3 vector3_3 = vector3_2;
  5187. // ISSUE: explicit reference operation
  5188. ((Vector3) @position).\u002Ector(90f, 240f, 0.0f);
  5189. Vector3 vector3_4 = position;
  5190. ((Entity) prop2).AttachTo((Entity) cfaA0, num4, vector3_3, vector3_4);
  5191. Script.Wait(10);
  5192. }
  5193. num5 += (short) 2;
  5194. }
  5195. while ((int) num5 <= 7);
  5196. }
  5197.  
  5198. private void \u00392AA0()
  5199. {
  5200. if (!this.\u0035GAA0)
  5201. {
  5202. if (!THelper.Exists((Entity) JC2.\u0036GAAA))
  5203. return;
  5204. ((Entity) JC2.\u0036GAAA).Delete();
  5205. JC2.\u0036GAAA = (Prop) null;
  5206. }
  5207. else
  5208. {
  5209. if (!THelper.Exists((Entity) JC2.\u0036GAAA))
  5210. {
  5211. JC2.\u0036GAAA = World.CreateProp(JC2.\u00317AA0, THelper.getCreationPos(15.0, 15.0), false, false);
  5212. Script.Wait(10);
  5213. }
  5214. if (THelper.Exists((Entity) JC2.\u0036GAAA))
  5215. {
  5216. Prop prop = JC2.\u0036GAAA;
  5217. Ped character = Game.get_Player().get_Character();
  5218. int boneIndexEnt1 = 0;
  5219. int boneIndex = Game.get_Player().get_Character().GetBoneIndex((Bone) 57005);
  5220. Vector3 vector3_1;
  5221. // ISSUE: explicit reference operation
  5222. ((Vector3) @vector3_1).\u002Ector(0.12f, 0.02f, -0.06f);
  5223. Vector3 offset = vector3_1;
  5224. Vector3 vector3_2;
  5225. // ISSUE: explicit reference operation
  5226. ((Vector3) @vector3_2).\u002Ector(40f, 0.0f, 40f);
  5227. Vector3 rot = vector3_2;
  5228. int num1 = 0;
  5229. int num2 = 0;
  5230. int num3 = 0;
  5231. int num4 = 0;
  5232. int num5 = 1;
  5233. THelper.attachEntToEnt((Entity) prop, (Entity) character, boneIndexEnt1, boneIndex, offset, rot, num1 != 0, num2 != 0, num3 != 0, num4 != 0, num5 != 0);
  5234. }
  5235. }
  5236. }
  5237.  
  5238. private void B2AAA()
  5239. {
  5240. int index = checked (JC2.\u0038GAAA.Count - 1);
  5241. while (index >= 0)
  5242. {
  5243. JC2.\u0038GAAA[index].tick();
  5244. checked { index += -1; }
  5245. }
  5246. if (!this.C6AA0)
  5247. return;
  5248. if (THelper.isButtonJustPressed(THelper.controls.INPUT_SELECT_WEAPON_UNARMED) && Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash() == -1569615261)
  5249. {
  5250. this.\u0035GAA0 = !this.\u0035GAA0;
  5251. this.\u00392AA0();
  5252. }
  5253. if (this.\u0035GAA0)
  5254. {
  5255. if (Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash() != -1569615261)
  5256. {
  5257. this.\u0035GAA0 = false;
  5258. this.\u00392AA0();
  5259. }
  5260. else
  5261. {
  5262. RaycastResult raycastResult = World.Raycast(GameplayCamera.get_Position(), Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(GameplayCamera.get_Direction(), 15f)), (IntersectOptions) -1, (Entity) Game.get_Player().get_Character());
  5263. // ISSUE: explicit reference operation
  5264. if (((RaycastResult) @raycastResult).get_DitHitEntity())
  5265. {
  5266. // ISSUE: explicit reference operation
  5267. Entity hitEntity = ((RaycastResult) @raycastResult).get_HitEntity();
  5268. Vector2 pos2dOffset;
  5269. // ISSUE: explicit reference operation
  5270. THelper.draw3dText("X", ((RaycastResult) @raycastResult).get_HitCoords(), pos2dOffset, Color.CornflowerBlue, true, true, 0.3, 0);
  5271. // ISSUE: explicit reference operation
  5272. Vector3 hitCoords = ((RaycastResult) @raycastResult).get_HitCoords();
  5273. // ISSUE: explicit reference operation
  5274. Vector3 surfaceNormal = ((RaycastResult) @raycastResult).get_SurfaceNormal();
  5275. Vector3.op_Addition(hitCoords, surfaceNormal);
  5276. Vector3 pos = hitCoords;
  5277. double num = 0.0;
  5278. do
  5279. {
  5280. pos = Vector3.op_Addition(pos, Vector3.op_Multiply(surfaceNormal, 0.1f));
  5281. THelper.draw3dText("o", pos, pos2dOffset, Color.CornflowerBlue, true, true, 0.3 - num * 0.25, 0);
  5282. num += 0.1;
  5283. }
  5284. while (num <= 0.5);
  5285. if (THelper.isButtonJustPressed(THelper.controls.INPUT_ATTACK))
  5286. {
  5287. JC2.ᙄ ᙄ = new JC2.ᙄ(hitEntity, hitCoords, surfaceNormal);
  5288. UI.ShowSubtitle("Press " + this.\u00369AAA.ToString() + " to trigger the C4 bomb");
  5289. }
  5290. }
  5291. }
  5292. }
  5293. }
  5294.  
  5295. private bool C2AA0()
  5296. {
  5297. if (!THelper._iskeyPressed(this.\u00366AAA) && !THelper.isButtonPressed(THelper.controls.INPUT_JUMP) || !true)
  5298. return false;
  5299. Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  5300. // ISSUE: explicit reference operation
  5301. this.\u0034DAAA = (double) ((Vector3) @velocity).Length() * 0.5;
  5302. if (this.\u0034DAAA > 20.0)
  5303. this.\u0034DAAA = 20.0;
  5304. return true;
  5305. }
  5306.  
  5307. private void \u00303AAA()
  5308. {
  5309. Game.get_Player().get_Character().set_CanRagdoll(false);
  5310. Game.get_Player().get_Character().set_CanRagdoll(true);
  5311. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
  5312. this.\u00331AA0(false);
  5313. Function.Call((Hash) -4679285206957010997L, new InputArgument[5]
  5314. {
  5315. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5316. InputArgument.op_Implicit(THelper.parachuteHash()),
  5317. InputArgument.op_Implicit(1),
  5318. InputArgument.op_Implicit(100),
  5319. InputArgument.op_Implicit(100)
  5320. });
  5321. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  5322. ((Entity) Game.get_Player().get_Character()).set_Heading((float) THelper.directionToHeading(THelper.RotationToDirection(GameplayCamera.get_Rotation())));
  5323. Vector3 vector3 = Vector3.op_Addition(Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(THelper.RotationToDirection(GameplayCamera.get_Rotation()), 10f)), Vector3.op_Multiply(Vector3.get_WorldUp(), 50f));
  5324. Function.Call((Hash) -5530938096517132230L, new InputArgument[4]
  5325. {
  5326. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5327. InputArgument.op_Implicit((float) vector3.X),
  5328. InputArgument.op_Implicit((float) vector3.Y),
  5329. InputArgument.op_Implicit((float) vector3.Z)
  5330. });
  5331. this.\u0033DAA0 = true;
  5332. this.\u0032DAAA = DateAndTime.Now;
  5333. ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Addition(Vector3.op_Multiply(THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()), (float) this.\u0034DAAA), Vector3.op_Multiply(Vector3.get_WorldUp(), 12f)));
  5334. }
  5335.  
  5336. private bool \u00313AA0()
  5337. {
  5338. if (this.\u0033CAA0 || !this.\u0038A0AA)
  5339. return false;
  5340. Vehicle currentVehicle = Game.get_Player().get_Character().get_CurrentVehicle();
  5341. if (THelper.Exists((Entity) currentVehicle))
  5342. {
  5343. Model model1 = ((Entity) currentVehicle).get_Model();
  5344. // ISSUE: explicit reference operation
  5345. if (!((Model) @model1).get_IsBicycle())
  5346. {
  5347. Model model2 = ((Entity) currentVehicle).get_Model();
  5348. // ISSUE: explicit reference operation
  5349. if (!((Model) @model2).get_IsBike())
  5350. goto label_6;
  5351. }
  5352. }
  5353. int num;
  5354. if (THelper._iskeyPressed(Keys.E) || THelper.usingController() && THelper.isButtonJustPressed(THelper.controls.INPUT_SPRINT))
  5355. {
  5356. num = 1;
  5357. goto label_8;
  5358. }
  5359. label_6:
  5360. num = 0;
  5361. label_8:
  5362. return num != 0;
  5363. }
  5364.  
  5365. private void \u00323AAA()
  5366. {
  5367. this.\u0030A0AA = Vector3.get_Zero();
  5368. this.CHAA0 = Vector3.get_Zero();
  5369. ((Entity) Game.get_Player().get_Character()).Detach();
  5370. this.BHAAA = World.CreateProp(this.\u0039HAA0, THelper.getCreationPos(15.0, 15.0), false, false);
  5371. Script.Wait(10);
  5372. THelper.getSoundID(ref this.\u0034HAAA);
  5373. THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
  5374. if (!THelper.Exists((Entity) this.BHAAA))
  5375. return;
  5376. ((Entity) this.BHAAA).set_IsVisible(false);
  5377. Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  5378. Vector3 rotation = GameplayCamera.get_Rotation();
  5379. rotation.X = (__Null) 0.0;
  5380. rotation.Y = (__Null) 0.0;
  5381. ((Entity) this.BHAAA).AttachTo((Entity) Game.get_Player().get_Character(), 0);
  5382. Script.Wait(10);
  5383. ((Entity) this.BHAAA).Detach();
  5384. Script.Wait(10);
  5385. ((Entity) this.BHAAA).set_Rotation(rotation);
  5386. this.\u0036HAAA = ((Entity) this.BHAAA).get_Rotation();
  5387. this.\u0038HAAA = 0.0;
  5388. Ped character = Game.get_Player().get_Character();
  5389. Prop bhaaa = this.BHAAA;
  5390. int boneIndexEnt1 = 0;
  5391. int boneIndexEnt2 = 0;
  5392. Vector3 vector3_1;
  5393. // ISSUE: explicit reference operation
  5394. ((Vector3) @vector3_1).\u002Ector(0.0f, -0.15f, 0.0f);
  5395. Vector3 offset = vector3_1;
  5396. Vector3 vector3_2;
  5397. // ISSUE: explicit reference operation
  5398. ((Vector3) @vector3_2).\u002Ector(0.0f, 0.0f, 0.0f);
  5399. Vector3 rot = vector3_2;
  5400. int num1 = 0;
  5401. int num2 = 0;
  5402. int num3 = 0;
  5403. int num4 = 1;
  5404. int num5 = 1;
  5405. THelper.attachEntToEnt((Entity) character, (Entity) bhaaa, boneIndexEnt1, boneIndexEnt2, offset, rot, num1 != 0, num2 != 0, num3 != 0, num4 != 0, num5 != 0);
  5406. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  5407. Game.get_Player().get_Character().set_CanRagdoll(false);
  5408. Game.get_Player().get_Character().set_CanRagdoll(true);
  5409. THelper.anim_playPedAnim(this.CGAA0.dict, "dive_walk_start", 8.0, THelper.animFlags.repeat | THelper.animFlags.enablePlCtrl, true);
  5410. THelper.play3DSound(".\\scripts\\jc3 files\\wingsuit_start.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
  5411. THelper.setEntRecordsCollision((Entity) this.BHAAA, false);
  5412. THelper.setEntRecordsCollision((Entity) this.BHAAA, true);
  5413. ((Entity) this.BHAAA).set_IsVisible(false);
  5414. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  5415. // ISSUE: explicit reference operation
  5416. ((Entity) this.BHAAA).set_Velocity(Vector3.op_Multiply(THelper.RotationToDirection(((Entity) this.BHAAA).get_Rotation()), (float) System.Math.Min(20.0, (double) ((Vector3) @velocity).Length() * 0.7)));
  5417. if (this.\u0034HAAA > -1)
  5418. THelper.playSoundFromEntity(this.\u0034HAAA, "Plane_Wind", (Entity) this.BHAAA, "DLC_Pilot_Chase_Parachute_Sounds");
  5419. this.\u00333AA0();
  5420. Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
  5421. {
  5422. InputArgument.op_Implicit(Game.get_Player().get_Character())
  5423. });
  5424. this.\u0031A0A0 = DateAndTime.Now;
  5425. }
  5426.  
  5427. private void \u00333AA0()
  5428. {
  5429. // ISSUE: explicit reference operation
  5430. THelper.clearObjects(((Model) @this.\u00327AAA).get_Hash(), ((Entity) Game.get_Player().get_Character()).get_Position(), 3.0, (Entity) null);
  5431. // ISSUE: explicit reference operation
  5432. THelper.clearObjects(((Model) @this.\u00337AA0).get_Hash(), ((Entity) Game.get_Player().get_Character()).get_Position(), 3.0, (Entity) null);
  5433. Vector3 offset;
  5434. // ISSUE: explicit reference operation
  5435. ((Vector3) @offset).\u002Ector(0.26f, 0.01f, -0.15f);
  5436. Vector3 rot;
  5437. // ISSUE: explicit reference operation
  5438. ((Vector3) @rot).\u002Ector(-80f, -4f, 14f);
  5439. Prop prop1 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
  5440. if (THelper.Exists((Entity) prop1))
  5441. {
  5442. this.\u00347AAA.Add(prop1);
  5443. THelper.attachEntToEnt((Entity) prop1, (Entity) Game.get_Player().get_Character(), 0, THelper.getPedBoneIndex(Game.get_Player().get_Character(), 40269), offset, rot, false, false, false, false, true);
  5444. }
  5445. Prop prop2 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
  5446. if (THelper.Exists((Entity) prop2))
  5447. {
  5448. this.\u00347AAA.Add(prop2);
  5449. // ISSUE: explicit reference operation
  5450. ((Vector3) @offset).\u002Ector(0.419f, 0.06f, -0.1f);
  5451. // ISSUE: explicit reference operation
  5452. ((Vector3) @rot).\u002Ector(-87f, -10f, 25f);
  5453. THelper.attachEntToEnt((Entity) prop2, (Entity) Game.get_Player().get_Character(), 0, THelper.getPedBoneIndex(Game.get_Player().get_Character(), 40269), offset, rot, false, false, false, false, true);
  5454. }
  5455. Prop prop3 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
  5456. if (THelper.Exists((Entity) prop3))
  5457. {
  5458. this.\u00347AAA.Add(prop3);
  5459. // ISSUE: explicit reference operation
  5460. ((Vector3) @offset).\u002Ector(0.399f, 0.08f, 0.11f);
  5461. // ISSUE: explicit reference operation
  5462. ((Vector3) @rot).\u002Ector(-113f, 7f, 25f);
  5463. THelper.attachEntToEnt((Entity) prop3, (Entity) Game.get_Player().get_Character(), 0, THelper.getPedBoneIndex(Game.get_Player().get_Character(), 45509), offset, rot, false, false, false, false, true);
  5464. }
  5465. Prop prop4 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
  5466. if (THelper.Exists((Entity) prop4))
  5467. {
  5468. this.\u00347AAA.Add(prop4);
  5469. // ISSUE: explicit reference operation
  5470. ((Vector3) @offset).\u002Ector(0.219f, 0.0099f, 0.14f);
  5471. // ISSUE: explicit reference operation
  5472. ((Vector3) @rot).\u002Ector(-113f, 9f, 15f);
  5473. THelper.attachEntToEnt((Entity) prop4, (Entity) Game.get_Player().get_Character(), 0, THelper.getPedBoneIndex(Game.get_Player().get_Character(), 45509), offset, rot, false, false, false, false, true);
  5474. }
  5475. Prop prop5 = World.CreateProp(this.\u00337AA0, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
  5476. if (!THelper.Exists((Entity) prop5))
  5477. return;
  5478. this.\u00347AAA.Add(prop5);
  5479. // ISSUE: explicit reference operation
  5480. ((Vector3) @offset).\u002Ector(0.08f, -0.159f, 0.0f);
  5481. // ISSUE: explicit reference operation
  5482. ((Vector3) @rot).\u002Ector(180f, -90f, 0.0f);
  5483. THelper.attachEntToEnt((Entity) prop5, (Entity) Game.get_Player().get_Character(), 0, THelper.getPedBoneIndex(Game.get_Player().get_Character(), 24818), offset, rot, false, false, false, false, true);
  5484. }
  5485.  
  5486. private void \u00343AAA()
  5487. {
  5488. this.\u0039GAA0 = false;
  5489. Function.Call((Hash) -6222817867460529944L, new InputArgument[2]
  5490. {
  5491. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5492. InputArgument.op_Implicit(0)
  5493. });
  5494. if (this.\u0034HAAA > -1)
  5495. THelper.stopSound(this.\u0034HAAA);
  5496. if (Operators.CompareString(this.\u0032HAAA, "", false) != 0)
  5497. THelper.anim_stopPedAnim(this.\u0033HAA0, this.\u0032HAAA, 2.0);
  5498. GameplayCamera.StopShaking();
  5499. try
  5500. {
  5501. foreach (Prop prop in this.\u00347AAA)
  5502. {
  5503. try
  5504. {
  5505. if (THelper.Exists((Entity) prop))
  5506. {
  5507. ((Entity) prop).Detach();
  5508. ((Entity) prop).Delete();
  5509. }
  5510. }
  5511. catch (Exception ex)
  5512. {
  5513. ProjectData.SetProjectError(ex);
  5514. ProjectData.ClearProjectError();
  5515. }
  5516. }
  5517. }
  5518. finally
  5519. {
  5520. List<Prop>.Enumerator enumerator;
  5521. enumerator.Dispose();
  5522. }
  5523. this.\u00347AAA.Clear();
  5524. if (!THelper.Exists((Entity) this.BHAAA))
  5525. return;
  5526. Vector3 velocity = ((Entity) this.BHAAA).get_Velocity();
  5527. ((Entity) Game.get_Player().get_Character()).Detach();
  5528. ((Entity) this.BHAAA).Delete();
  5529. this.BHAAA = (Prop) null;
  5530. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  5531. ((Entity) Game.get_Player().get_Character()).set_Velocity(velocity);
  5532. // ISSUE: explicit reference operation
  5533. if ((double) ((Vector3) @velocity).Length() > 15.0)
  5534. THelper.setPedToRagdoll(Game.get_Player().get_Character(), (short) 1000, (short) 1000, (short) 0, true, true, false);
  5535. }
  5536.  
  5537. private void \u00353AA0()
  5538. {
  5539. if (this.\u0036A0AA == null)
  5540. {
  5541. this.\u0036A0AA = World.CreateCamera(GameplayCamera.get_Position(), GameplayCamera.get_Rotation(), 70f);
  5542. this.\u0037A0A0 = Vector3.Normalize(((Entity) Game.get_Player().get_Character()).GetOffsetFromWorldCoords(GameplayCamera.get_Position()));
  5543. }
  5544. else
  5545. {
  5546. World.set_RenderingCamera(this.\u0036A0AA);
  5547. this.\u0037A0A0 = Vector3.op_Addition(this.\u0037A0A0, Vector3.op_Multiply(Vector3.op_Subtraction(Vector3.Normalize(((Entity) Game.get_Player().get_Character()).GetOffsetFromWorldCoords(GameplayCamera.get_Position())), this.\u0037A0A0), 0.5f));
  5548. this.\u0036A0AA.AttachTo(Game.get_Player().get_Character(), 0, Vector3.op_Multiply(this.\u0037A0A0, 4f));
  5549. this.\u0036A0AA.PointAt((Entity) Game.get_Player().get_Character());
  5550. }
  5551. }
  5552.  
  5553. private void \u00363AAA()
  5554. {
  5555. if (this.\u0036A0AA == null)
  5556. return;
  5557. World.set_RenderingCamera((Camera) null);
  5558. this.\u0036A0AA.Destroy();
  5559. this.\u0036A0AA = (Camera) null;
  5560. }
  5561.  
  5562. private void \u00373AA0()
  5563. {
  5564. if (!this.C6AA0 || !this.\u0038A0AA)
  5565. return;
  5566. if (!this.\u0039GAA0)
  5567. {
  5568. this.\u00363AAA();
  5569. if ((int) THelper.getParachuteState() > 0)
  5570. {
  5571. if (!this.\u00313AA0())
  5572. return;
  5573. Function.Call((Hash) 5231435679784720824L, new InputArgument[2]
  5574. {
  5575. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5576. InputArgument.op_Implicit(THelper.parachuteHash())
  5577. });
  5578. this.\u0035A0A0 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  5579. this.\u0039GAA0 = true;
  5580. return;
  5581. }
  5582. }
  5583. if (this.C2AA0() && this.\u0039GAA0)
  5584. {
  5585. Vector3 vector3 = !THelper.Exists((Entity) this.BHAAA) ? ((Entity) Game.get_Player().get_Character()).get_Velocity() : ((Entity) this.BHAAA).get_Velocity();
  5586. this.\u00343AAA();
  5587. this.\u00303AAA();
  5588. ((Entity) Game.get_Player().get_Character()).set_Velocity(vector3);
  5589. }
  5590. else
  5591. {
  5592. if (this.\u0039GAA0)
  5593. {
  5594. this.\u00353AA0();
  5595. Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
  5596. {
  5597. InputArgument.op_Implicit(Game.get_Player().get_Character())
  5598. });
  5599. Function.Call((Hash) -6222817867460529944L, new InputArgument[2]
  5600. {
  5601. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5602. InputArgument.op_Implicit(1)
  5603. });
  5604. Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
  5605. {
  5606. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5607. InputArgument.op_Implicit(true)
  5608. });
  5609. if ((bool) Function.Call<bool>((Hash) -8220001501650343748L, new InputArgument[2]
  5610. {
  5611. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5612. InputArgument.op_Implicit(THelper.parachuteHash())
  5613. }))
  5614. Function.Call((Hash) 5231435679784720824L, new InputArgument[2]
  5615. {
  5616. InputArgument.op_Implicit(Game.get_Player().get_Character()),
  5617. InputArgument.op_Implicit(THelper.parachuteHash())
  5618. });
  5619. if (!THelper.Exists((Entity) this.BHAAA))
  5620. {
  5621. this.\u00323AAA();
  5622. return;
  5623. }
  5624. ((Entity) this.BHAAA).set_IsVisible(false);
  5625. ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
  5626. Vector3 velocity = ((Entity) this.BHAAA).get_Velocity();
  5627. velocity.Z = (__Null) 0.0;
  5628. this.\u0039GAA0 = DateAndTime.Now.Subtract(this.\u0031A0A0).TotalMilliseconds < 500.0 || !THelper.isButtonPressed(THelper.controls.INPUT_VEH_JUMP) && !THelper.entHitAnything((Entity) this.BHAAA) && !((Entity) this.BHAAA).get_IsInWater();
  5629. if (!this.\u0039GAA0)
  5630. {
  5631. this.\u00343AAA();
  5632. return;
  5633. }
  5634. bool flag1 = THelper.isButtonPressed(THelper.controls.INPUT_MOVE_UP_ONLY);
  5635. bool flag2 = THelper.isButtonPressed(THelper.controls.INPUT_MOVE_DOWN_ONLY);
  5636. bool flag3 = THelper.isButtonPressed(THelper.controls.INPUT_VEH_MOVE_LEFT_ONLY);
  5637. bool flag4 = THelper.isButtonPressed(THelper.controls.INPUT_VEH_MOVE_RIGHT_ONLY);
  5638. Vector3 rotation = ((Entity) this.BHAAA).get_Rotation();
  5639. rotation.X = (__Null) 0.0;
  5640. rotation.Y = (__Null) 0.0;
  5641. Vector3 direction1 = THelper.RotationToDirection(rotation);
  5642. direction1.Z = (__Null) 0.0;
  5643. string sAnim = "free_forward";
  5644. THelper.TAnimDict tanimDict = this.\u0030HAAA;
  5645. double num1 = -1.0;
  5646. Vector3 vector3_1 = Vector3.op_Multiply(direction1, 0.1f);
  5647. Vector3 vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 0.5f);
  5648. if (flag1)
  5649. {
  5650. vector3_1 = Vector3.op_Multiply(vector3_1, 0.5f);
  5651. vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 2.5f);
  5652. this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((-55.0 - this.\u0037HAA0.X) * 0.05));
  5653. if (this.\u0032A0AA < 10.0)
  5654. this.\u0032A0AA = this.\u0032A0AA + 0.3;
  5655. }
  5656. else if (flag2)
  5657. {
  5658. if (this.\u0032A0AA > 0.0)
  5659. {
  5660. vector3_2 = Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldDown(), -1.5f), (float) (this.\u0032A0AA / 10.0));
  5661. this.\u0030A0AA.Z = (__Null) (1.5 * (this.\u0032A0AA / 10.0));
  5662. this.\u0032A0AA = this.\u0032A0AA - 0.1;
  5663. }
  5664. else
  5665. {
  5666. vector3_1 = Vector3.op_Multiply(vector3_1, 0.35f);
  5667. vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 0.8f);
  5668. }
  5669. this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((45.0 - this.\u0037HAA0.X) * 0.05));
  5670. }
  5671. else
  5672. {
  5673. this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((5.0 - this.\u0037HAA0.X) * 0.05));
  5674. if (this.\u0032A0AA < 10.0)
  5675. this.\u0032A0AA = this.\u0032A0AA + 0.1;
  5676. }
  5677. this.\u0037HAA0.Z = this.\u0036HAAA.Z;
  5678. if (flag3)
  5679. {
  5680. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 11.5f);
  5681. if (flag1)
  5682. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 2.5f);
  5683. else if (flag2)
  5684. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 0.5f);
  5685. if (this.\u0038HAAA > -10.0)
  5686. this.\u0038HAAA = this.\u0038HAAA - 1.5;
  5687. else if (this.\u0038HAAA > -45.0)
  5688. this.\u0038HAAA = this.\u0038HAAA - 3.0;
  5689. Vector3 rot = ((Entity) this.BHAAA).get_Rotation();
  5690. rot.Y = (__Null) 0.0;
  5691. rot.X = (__Null) 0.0;
  5692. rot.Z = (__Null) (rot.Z + 90.0);
  5693. rot = THelper.RotationToDirection(rot);
  5694. ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(rot, 1f));
  5695. }
  5696. else if (flag4)
  5697. {
  5698. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 11.5f);
  5699. if (flag1)
  5700. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 2.5f);
  5701. else if (flag2)
  5702. this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 0.5f);
  5703. if (this.\u0038HAAA < 15.0)
  5704. this.\u0038HAAA = this.\u0038HAAA + 1.5;
  5705. else if (this.\u0038HAAA < 45.0)
  5706. this.\u0038HAAA = this.\u0038HAAA + 3.0;
  5707. Vector3 rot = ((Entity) this.BHAAA).get_Rotation();
  5708. rot.Y = (__Null) 0.0;
  5709. rot.X = (__Null) 0.0;
  5710. rot.Z = (__Null) (rot.Z - 90.0);
  5711. rot = THelper.RotationToDirection(rot);
  5712. ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(rot, 1f));
  5713. }
  5714. else if (System.Math.Abs(this.\u0038HAAA) > 1.0)
  5715. {
  5716. this.\u0038HAAA = this.\u0038HAAA * 0.95;
  5717. if (this.\u0038HAAA > 10.0)
  5718. this.\u0037HAA0.Z = (__Null) (this.\u0037HAA0.Z - 2.0);
  5719. else if (this.\u0038HAAA < -10.0)
  5720. this.\u0037HAA0.Z = (__Null) (this.\u0037HAA0.Z + 2.0);
  5721. }
  5722. else
  5723. this.\u0038HAAA = 0.0;
  5724. this.\u0032HAAA = sAnim;
  5725. this.\u0033HAA0 = tanimDict.dict;
  5726. Ped character = Game.get_Player().get_Character();
  5727. Prop bhaaa = this.BHAAA;
  5728. int boneIndexEnt1 = 0;
  5729. int boneIndexEnt2 = 0;
  5730. Vector3 vector3_3;
  5731. // ISSUE: explicit reference operation
  5732. ((Vector3) @vector3_3).\u002Ector(0.0f, -0.15f, 0.0f);
  5733. Vector3 offset = vector3_3;
  5734. Vector3 vector3_4;
  5735. // ISSUE: explicit reference operation
  5736. ((Vector3) @vector3_4).\u002Ector((float) this.\u0033A0A0, 0.0f, 0.0f);
  5737. Vector3 rot1 = vector3_4;
  5738. int num2 = 0;
  5739. int num3 = 0;
  5740. int num4 = 0;
  5741. int num5 = 1;
  5742. int num6 = 1;
  5743. THelper.attachEntToEnt((Entity) character, (Entity) bhaaa, boneIndexEnt1, boneIndexEnt2, offset, rot1, num2 != 0, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
  5744. if (!THelper.anim_isPlayingPedAnim(tanimDict.dict, sAnim, 1.0))
  5745. {
  5746. if (!THelper.anim_isPlayingPedAnim(this.CGAA0.dict, "dive_walk_start", 0.5))
  5747. {
  5748. if (THelper.timeSinceLastAnimPlay() > 200.0)
  5749. THelper.anim_playPedAnim(tanimDict.dict, sAnim, 7.0, THelper.animFlags.repeat | THelper.animFlags.enablePlCtrl, true);
  5750. }
  5751. else
  5752. {
  5753. this.\u0033A0A0 = -25.0;
  5754. THelper.anim_setAnimSpeed(this.CGAA0.dict, "dive_walk_start", 1.3);
  5755. if (THelper.anim_getAnimTime(this.CGAA0.dict, "dive_walk_start") < 0.2)
  5756. THelper.anim_setAnimTime(this.CGAA0.dict, "dive_walk_start", 0.2);
  5757. }
  5758. }
  5759. else
  5760. {
  5761. if (this.\u0033A0A0 < 0.0)
  5762. this.\u0033A0A0 = this.\u0033A0A0 + 2.0;
  5763. double num7 = THelper.anim_getAnimTime(tanimDict.dict, sAnim);
  5764. if (num1 > -1.0)
  5765. {
  5766. if (num7 < num1 - 0.015 || num7 < 0.0)
  5767. this.\u0031HAA0 = (short) 1;
  5768. else if (num7 > num1 + 0.015 || num7 > 1.0)
  5769. this.\u0031HAA0 = (short) -1;
  5770. if (System.Math.Abs(num7 - num1) > 0.1)
  5771. num7 = num1;
  5772. double time = num7 + (0.0001 + JC2.\u00306AAA.NextDouble() * 0.0001) * (double) this.\u0031HAA0;
  5773. THelper.anim_setAnimTime(tanimDict.dict, sAnim, time);
  5774. THelper.anim_setAnimSpeed(tanimDict.dict, sAnim, 0.0);
  5775. }
  5776. }
  5777. Vector3 direction2 = THelper.RotationToDirection(this.\u0036HAAA);
  5778. Vector3 direction3 = THelper.RotationToDirection(this.\u0037HAA0);
  5779. this.\u0036HAAA = THelper.directionToRotation(Vector3.op_Addition(direction2, Vector3.op_Multiply(Vector3.op_Subtraction(direction3, direction2), 0.1f)), 0.0);
  5780. rotation = this.\u0036HAAA;
  5781. rotation.Y = (__Null) this.\u0038HAAA;
  5782. ((Entity) this.BHAAA).set_Rotation(rotation);
  5783. // ISSUE: explicit reference operation
  5784. // ISSUE: explicit reference operation
  5785. double num8 = (double) ((Vector3) @velocity).Length() >= 20.0 ? ((double) ((Vector3) @velocity).Length() >= 40.0 ? 1.0 : 0.5) : 0.1;
  5786. if (this.\u0035HAA0 != num8)
  5787. {
  5788. this.\u0035HAA0 = num8;
  5789. GameplayCamera.Shake((CameraShake) 8, (float) this.\u0035HAA0);
  5790. }
  5791. this.CHAA0 = Vector3.op_Addition(this.CHAA0, Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(vector3_1, this.CHAA0), 0.25f), (float) this.\u0034A0AA));
  5792. this.\u0030A0AA = Vector3.op_Addition(this.\u0030A0AA, Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(vector3_2, this.\u0030A0AA), 0.25f), (float) this.\u0034A0AA));
  5793. // ISSUE: explicit reference operation
  5794. if ((double) ((Vector3) @this.\u0035A0A0).Length() > 0.5)
  5795. {
  5796. // ISSUE: explicit reference operation
  5797. ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(THelper.RotationToDirection(((Entity) this.BHAAA).get_Rotation()), ((Vector3) @this.\u0035A0A0).Length()));
  5798. this.\u0035A0A0 = Vector3.op_Multiply(this.\u0035A0A0, 0.98f);
  5799. }
  5800. else
  5801. {
  5802. ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(this.CHAA0, 20f), (float) this.\u0034A0AA));
  5803. ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(this.\u0030A0AA, (float) this.\u0034A0AA));
  5804. }
  5805. if (this.\u0034A0AA < 1.0)
  5806. {
  5807. this.\u0034A0AA = this.\u0034A0AA + 0.005;
  5808. if (this.\u0034A0AA > 1.0)
  5809. this.\u0034A0AA = 1.0;
  5810. }
  5811. this.\u0039A0A0 = true;
  5812. }
  5813. else
  5814. {
  5815. this.\u0034A0AA = 0.0;
  5816. int num;
  5817. if (((Entity) Game.get_Player().get_Character()).get_IsAlive() && THelper.isEntInAir((Entity) Game.get_Player().get_Character()) && (!((Entity) Game.get_Player().get_Character()).get_IsInWater() && !THelper.isEntOverWater((Entity) Game.get_Player().get_Character(), -1.0)))
  5818. {
  5819. Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
  5820. // ISSUE: explicit reference operation
  5821. if ((double) ((Vector3) @velocity).Length() > 15.0)
  5822. {
  5823. if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
  5824. {
  5825. Model model1 = ((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Model();
  5826. // ISSUE: explicit reference operation
  5827. if (!((Model) @model1).get_IsBicycle())
  5828. {
  5829. Model model2 = ((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Model();
  5830. // ISSUE: explicit reference operation
  5831. if (!((Model) @model2).get_IsBike())
  5832. goto label_87;
  5833. }
  5834. }
  5835. num = 1;
  5836. goto label_89;
  5837. }
  5838. }
  5839. label_87:
  5840. num = 0;
  5841. label_89:
  5842. if (num != 0)
  5843. {
  5844. if (this.\u0039A0A0)
  5845. {
  5846. this.\u0039A0A0 = false;
  5847. this.BA0AA = DateAndTime.Now;
  5848. }
  5849. if (this.\u00313AA0())
  5850. {
  5851. this.\u0039GAA0 = true;
  5852. this.\u0035A0A0 = Vector3.op_Multiply(((Entity) Game.get_Player().get_Character()).get_Velocity(), 0.1f);
  5853. }
  5854. }
  5855. else
  5856. this.\u0039A0A0 = true;
  5857. }
  5858. if (this.\u0038A0AA && !this.\u0039A0A0 && !this.\u0033CAA0 && DateAndTime.Now.Subtract(this.BA0AA).TotalMilliseconds < 5000.0)
  5859. {
  5860. if (THelper.usingController())
  5861. UI.ShowSubtitle("Prees A to use the Wingsuit", 100);
  5862. else
  5863. UI.ShowSubtitle("Prees E to use the Wingsuit", 100);
  5864. }
  5865. }
  5866. }
  5867.  
  5868. private static JC2.TEntityInRope \u00383AAA(Entity ᙂ, Entity \u0031AAAA)
  5869. {
  5870. int index = checked (JC2.\u0035BAA0.Count - 1);
  5871. while (index >= 0)
  5872. {
  5873. JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[index];
  5874. if (tentityInRope.p1.get_Handle() == ᙂ.get_Handle() && tentityInRope.p2.get_Handle() == param1.get_Handle() || tentityInRope.p2.get_Handle() == ᙂ.get_Handle() && tentityInRope.p1.get_Handle() == param1.get_Handle())
  5875. return tentityInRope;
  5876. checked { index += -1; }
  5877. }
  5878. return (JC2.TEntityInRope) null;
  5879. }
  5880.  
  5881. public class TGasObjects
  5882. {
  5883. private DateTime \u00393AA0;
  5884. private Prop B3AAA;
  5885. private Vector3 C3AA0;
  5886. private int \u00304AAA;
  5887. private int \u00314AA0;
  5888. private int \u00324AAA;
  5889. private Entity \u00334AA0;
  5890. private DateTime \u00344AAA;
  5891.  
  5892. public TGasObjects(Entity o, Entity e2)
  5893. {
  5894. this.\u00393AA0 = DateAndTime.Now;
  5895. this.B3AAA = (Prop) null;
  5896. this.\u00304AAA = 0;
  5897. this.\u00314AA0 = -1;
  5898. this.\u00324AAA = -1;
  5899. this.\u00334AA0 = (Entity) null;
  5900. this.\u00344AAA = DateAndTime.Now;
  5901. try
  5902. {
  5903. if (!THelper.isObject(o))
  5904. throw new Exception("");
  5905. if (JC2.\u00358AA0.Contains((Prop) o))
  5906. throw new Exception("");
  5907. if (!THelper.isObject(o))
  5908. return;
  5909. this.\u00334AA0 = e2;
  5910. this.B3AAA = (Prop) o;
  5911. this.\u00393AA0 = DateAndTime.Now;
  5912. // ISSUE: explicit reference operation
  5913. ((Vector3) @this.C3AA0).\u002Ector((float) JC2.\u00306AAA.NextDouble(), (float) JC2.\u00306AAA.NextDouble(), 1f);
  5914. Function.Call((Hash) 7798175403732277905L, new InputArgument[1]
  5915. {
  5916. InputArgument.op_Implicit("scr_exile2")
  5917. });
  5918. this.\u00314AA0 = (int) Function.Call<int>((Hash) 1937722214304277783L, new InputArgument[12]
  5919. {
  5920. InputArgument.op_Implicit("scr_ex2_jeep_engine_fire"),
  5921. InputArgument.op_Implicit(this.B3AAA),
  5922. InputArgument.op_Implicit(0),
  5923. InputArgument.op_Implicit(0),
  5924. InputArgument.op_Implicit(0),
  5925. InputArgument.op_Implicit(0),
  5926. InputArgument.op_Implicit(0),
  5927. InputArgument.op_Implicit(0),
  5928. InputArgument.op_Implicit(0.5),
  5929. InputArgument.op_Implicit(0),
  5930. InputArgument.op_Implicit(0),
  5931. InputArgument.op_Implicit(0)
  5932. });
  5933. this.\u00324AAA = (int) Function.Call<int>((Hash) 4828851653567843141L, new InputArgument[0]);
  5934. if (this.\u00324AAA > -1)
  5935. THelper.playSoundFromEntity(this.\u00324AAA, "fire_missile_loop", (Entity) this.B3AAA, "exile_2_sounds");
  5936. JC2.\u00368AAA.Add(this);
  5937. JC2.\u00358AA0.Add((Prop) o);
  5938. }
  5939. catch (Exception ex)
  5940. {
  5941. ProjectData.SetProjectError(ex);
  5942. if (this.\u00314AA0 != 0)
  5943. Function.Call((Hash) -8109406742613235306L, new InputArgument[1]
  5944. {
  5945. InputArgument.op_Implicit(this.\u00314AA0)
  5946. });
  5947. if (this.\u00324AAA > -1)
  5948. Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
  5949. {
  5950. InputArgument.op_Implicit(this.\u00324AAA)
  5951. });
  5952. ProjectData.ClearProjectError();
  5953. }
  5954. }
  5955.  
  5956. public void tick()
  5957. {
  5958. try
  5959. {
  5960. if (DateAndTime.Now.Subtract(this.\u00344AAA).TotalMilliseconds < 250.0)
  5961. {
  5962. this.\u00393AA0 = DateAndTime.Now;
  5963. }
  5964. else
  5965. {
  5966. if (DateAndTime.Now.Subtract(this.\u00393AA0).TotalMilliseconds >= 3000.0)
  5967. throw new Exception("done");
  5968. ((Entity) this.B3AAA).ApplyForce(this.C3AA0);
  5969. this.\u00304AAA = checked (this.\u00304AAA + 10);
  5970. if (this.\u00304AAA == 200)
  5971. {
  5972. this.\u00304AAA = 0;
  5973. // ISSUE: explicit reference operation
  5974. ((Vector3) @this.C3AA0).\u002Ector((float) JC2.\u00306AAA.NextDouble(), (float) JC2.\u00306AAA.NextDouble(), 1f);
  5975. }
  5976. if (THelper.Exists(this.\u00334AA0) && THelper.isPed(this.\u00334AA0))
  5977. {
  5978. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  5979. {
  5980. InputArgument.op_Implicit(this.\u00334AA0),
  5981. InputArgument.op_Implicit(true)
  5982. });
  5983. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  5984. {
  5985. InputArgument.op_Implicit(this.\u00334AA0),
  5986. InputArgument.op_Implicit(-1),
  5987. InputArgument.op_Implicit(-1),
  5988. InputArgument.op_Implicit(0),
  5989. InputArgument.op_Implicit(0),
  5990. InputArgument.op_Implicit(0)
  5991. });
  5992. }
  5993. }
  5994. }
  5995. catch (Exception ex)
  5996. {
  5997. ProjectData.SetProjectError(ex);
  5998. if (this.\u00314AA0 != 0)
  5999. Function.Call((Hash) -8109406742613235306L, new InputArgument[1]
  6000. {
  6001. InputArgument.op_Implicit(this.\u00314AA0)
  6002. });
  6003. if (this.\u00324AAA > -1)
  6004. Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
  6005. {
  6006. InputArgument.op_Implicit(this.\u00324AAA)
  6007. });
  6008. JC2.\u00368AAA.Remove(this);
  6009. ProjectData.ClearProjectError();
  6010. }
  6011. }
  6012. }
  6013.  
  6014. public class TEntityInRope
  6015. {
  6016. public Entity p1;
  6017. public Entity p2;
  6018. public Rope rope;
  6019. public double dist;
  6020. public Vector3 e1_offset;
  6021. public Vector3 e2_offset;
  6022. public Vector3 pinCoord;
  6023. public DateTime timerSinceAttach;
  6024. public bool isPed_p1;
  6025. public bool isObject_p1;
  6026. public bool isVehicle_p1;
  6027. public bool isPed_p2;
  6028. public bool isObject_p2;
  6029. public bool isVehicle_p2;
  6030. private DateTime \u00354AA0;
  6031. private DateTime \u00364AAA;
  6032.  
  6033. public TEntityInRope(Entity e1, Entity e2, Rope r, double pDist, Vector3 e1_Off, Vector3 e2_Off)
  6034. {
  6035. this.p1 = (Entity) null;
  6036. this.p2 = (Entity) null;
  6037. this.isPed_p1 = false;
  6038. this.isObject_p1 = false;
  6039. this.isVehicle_p1 = false;
  6040. this.isPed_p2 = false;
  6041. this.isObject_p2 = false;
  6042. this.isVehicle_p2 = false;
  6043. this.\u00354AA0 = DateAndTime.Now;
  6044. this.\u00364AAA = DateAndTime.Now;
  6045. this.p1 = e1;
  6046. this.p2 = e2;
  6047. this.rope = r;
  6048. this.dist = pDist;
  6049. this.e1_offset = e1_Off;
  6050. this.e2_offset = e2_Off;
  6051. if (THelper.Exists(this.p1))
  6052. {
  6053. this.isPed_p1 = THelper.isPed(this.p1);
  6054. this.isObject_p1 = THelper.isObject(this.p1);
  6055. this.isVehicle_p1 = THelper.isVehicle(this.p1);
  6056. if (Function.Call<bool>((Hash) 755240282434935612L, new InputArgument[1]
  6057. {
  6058. InputArgument.op_Implicit(this.p1)
  6059. }) == 0)
  6060. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  6061. {
  6062. InputArgument.op_Implicit(this.p1),
  6063. InputArgument.op_Implicit(true),
  6064. InputArgument.op_Implicit(true)
  6065. });
  6066. if (this.isVehicle_p1)
  6067. Function.Call((Hash) -7808228676691476136L, new InputArgument[2]
  6068. {
  6069. InputArgument.op_Implicit(this.p1),
  6070. InputArgument.op_Implicit(15.0)
  6071. });
  6072. }
  6073. if (THelper.Exists(this.p2))
  6074. {
  6075. this.isPed_p2 = THelper.isPed(this.p2);
  6076. this.isObject_p2 = THelper.isObject(this.p2);
  6077. this.isVehicle_p2 = THelper.isVehicle(this.p2);
  6078. if (Function.Call<bool>((Hash) 755240282434935612L, new InputArgument[1]
  6079. {
  6080. InputArgument.op_Implicit(this.p2)
  6081. }) == 0)
  6082. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  6083. {
  6084. InputArgument.op_Implicit(this.p2),
  6085. InputArgument.op_Implicit(true),
  6086. InputArgument.op_Implicit(true)
  6087. });
  6088. if (this.isVehicle_p2)
  6089. Function.Call((Hash) -7808228676691476136L, new InputArgument[2]
  6090. {
  6091. InputArgument.op_Implicit(this.p2),
  6092. InputArgument.op_Implicit(15.0)
  6093. });
  6094. }
  6095. this.timerSinceAttach = DateAndTime.Now;
  6096. JC2.\u0035BAA0.Add(this);
  6097. }
  6098.  
  6099. public void remove()
  6100. {
  6101. try
  6102. {
  6103. this.rope.Delete();
  6104. }
  6105. catch (Exception ex)
  6106. {
  6107. ProjectData.SetProjectError(ex);
  6108. ProjectData.ClearProjectError();
  6109. }
  6110. try
  6111. {
  6112. this.p1.MarkAsNoLongerNeeded();
  6113. this.p1 = (Entity) null;
  6114. }
  6115. catch (Exception ex)
  6116. {
  6117. ProjectData.SetProjectError(ex);
  6118. ProjectData.ClearProjectError();
  6119. }
  6120. try
  6121. {
  6122. this.p2.MarkAsNoLongerNeeded();
  6123. this.p2 = (Entity) null;
  6124. }
  6125. catch (Exception ex)
  6126. {
  6127. ProjectData.SetProjectError(ex);
  6128. ProjectData.ClearProjectError();
  6129. }
  6130. JC2.\u0035BAA0.Remove(this);
  6131. }
  6132.  
  6133. public void pedTick()
  6134. {
  6135. try
  6136. {
  6137. if (DateAndTime.Now.Subtract(this.\u00354AA0).TotalMilliseconds <= 1000.0)
  6138. return;
  6139. this.\u00354AA0 = DateAndTime.Now;
  6140. if (THelper.Exists(this.p1) && THelper.isPed(this.p1))
  6141. {
  6142. if (this.p1.get_Health() < 0)
  6143. {
  6144. Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
  6145. {
  6146. InputArgument.op_Implicit(this.p1)
  6147. });
  6148. this.p1.set_Health(100);
  6149. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  6150. {
  6151. InputArgument.op_Implicit(this.p1),
  6152. InputArgument.op_Implicit(50000),
  6153. InputArgument.op_Implicit(50000),
  6154. InputArgument.op_Implicit(0),
  6155. InputArgument.op_Implicit(0),
  6156. InputArgument.op_Implicit(0)
  6157. });
  6158. }
  6159. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  6160. {
  6161. InputArgument.op_Implicit(this.p1),
  6162. InputArgument.op_Implicit(false)
  6163. });
  6164. Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
  6165. {
  6166. InputArgument.op_Implicit(this.p1),
  6167. InputArgument.op_Implicit(false)
  6168. });
  6169. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  6170. {
  6171. InputArgument.op_Implicit(this.p1),
  6172. InputArgument.op_Implicit(true),
  6173. InputArgument.op_Implicit(true)
  6174. });
  6175. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  6176. {
  6177. InputArgument.op_Implicit(this.p1),
  6178. InputArgument.op_Implicit(false)
  6179. });
  6180. if (Vector3.op_Inequality(this.pinCoord, Vector3.get_Zero()))
  6181. {
  6182. if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
  6183. {
  6184. InputArgument.op_Implicit(this.p1)
  6185. }) == 0)
  6186. {
  6187. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  6188. {
  6189. InputArgument.op_Implicit(this.p1),
  6190. InputArgument.op_Implicit(true)
  6191. });
  6192. THelper.setPedToRagdoll((Ped) this.p1, (short) 10000, (short) 10000, (short) 0, true, true, false);
  6193. }
  6194. }
  6195. }
  6196. if (THelper.Exists(this.p2) && THelper.isPed(this.p2))
  6197. {
  6198. if (this.p2.get_Health() < 0)
  6199. {
  6200. Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
  6201. {
  6202. InputArgument.op_Implicit(this.p2)
  6203. });
  6204. this.p2.set_Health(100);
  6205. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  6206. {
  6207. InputArgument.op_Implicit(this.p2),
  6208. InputArgument.op_Implicit(50000),
  6209. InputArgument.op_Implicit(50000),
  6210. InputArgument.op_Implicit(0),
  6211. InputArgument.op_Implicit(0),
  6212. InputArgument.op_Implicit(0)
  6213. });
  6214. }
  6215. Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
  6216. {
  6217. InputArgument.op_Implicit(this.p2),
  6218. InputArgument.op_Implicit(false)
  6219. });
  6220. Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
  6221. {
  6222. InputArgument.op_Implicit(this.p2),
  6223. InputArgument.op_Implicit(false)
  6224. });
  6225. Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
  6226. {
  6227. InputArgument.op_Implicit(this.p2),
  6228. InputArgument.op_Implicit(true),
  6229. InputArgument.op_Implicit(true)
  6230. });
  6231. Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
  6232. {
  6233. InputArgument.op_Implicit(this.p2),
  6234. InputArgument.op_Implicit(false)
  6235. });
  6236. if (Vector3.op_Inequality(this.pinCoord, Vector3.get_Zero()))
  6237. {
  6238. if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
  6239. {
  6240. InputArgument.op_Implicit(this.p2)
  6241. }) == 0)
  6242. {
  6243. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  6244. {
  6245. InputArgument.op_Implicit(this.p2),
  6246. InputArgument.op_Implicit(true)
  6247. });
  6248. THelper.setPedToRagdoll((Ped) this.p2, (short) 10000, (short) 10000, (short) 0, true, true, false);
  6249. }
  6250. }
  6251. }
  6252. if (THelper.Exists(this.p1) && THelper.Exists(this.p2))
  6253. {
  6254. double distance = (double) World.GetDistance(this.p1.get_Position(), this.p2.get_Position());
  6255. if (this.isPed_p1 && this.isVehicle_p2)
  6256. {
  6257. Ped p1 = (Ped) this.p1;
  6258. Vector3 velocity = this.p2.get_Velocity();
  6259. // ISSUE: explicit reference operation
  6260. double num1 = (double) ((Vector3) @velocity).Length();
  6261. velocity = ((Entity) p1).get_Velocity();
  6262. int num2;
  6263. // ISSUE: explicit reference operation
  6264. if (((double) ((Vector3) @velocity).Length() >= 0.3 || (double) World.GetDistance(this.p2.get_Position(), (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
  6265. {
  6266. InputArgument.op_Implicit(this.rope.get_Handle()),
  6267. InputArgument.op_Implicit(0)
  6268. })) < this.dist * 0.95) && (double) World.GetDistance(this.p2.get_Position(), (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
  6269. {
  6270. InputArgument.op_Implicit(this.rope.get_Handle())
  6271. })) <= 3.0)
  6272. {
  6273. if (!p1.get_IsRagdoll())
  6274. {
  6275. Model model = this.p2.get_Model();
  6276. // ISSUE: explicit reference operation
  6277. if (((Model) @model).get_IsVehicle())
  6278. {
  6279. velocity = this.p2.get_Velocity();
  6280. // ISSUE: explicit reference operation
  6281. if ((double) ((Vector3) @velocity).Length() > 5.0)
  6282. goto label_25;
  6283. }
  6284. }
  6285. num2 = 0;
  6286. goto label_26;
  6287. }
  6288. label_25:
  6289. num2 = 1;
  6290. label_26:
  6291. if (num2 != 0)
  6292. {
  6293. this.rope.Delete();
  6294. this.rope = JC2.createRope(this.p1.get_Position(), this.p2.get_Position(), 1.0, this.dist * 0.95, (Bone) -1);
  6295. ((Entity) p1).set_FreezePosition(false);
  6296. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  6297. {
  6298. InputArgument.op_Implicit(p1),
  6299. InputArgument.op_Implicit(true)
  6300. });
  6301. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  6302. {
  6303. InputArgument.op_Implicit(p1),
  6304. InputArgument.op_Implicit(30000),
  6305. InputArgument.op_Implicit(30000),
  6306. InputArgument.op_Implicit(0),
  6307. InputArgument.op_Implicit(0),
  6308. InputArgument.op_Implicit(0)
  6309. });
  6310. ((Entity) p1).set_Health(100);
  6311. ((Entity) p1).ApplyForce(Vector3.op_Subtraction(this.p2.get_Position(), ((Entity) p1).get_Position()));
  6312. ((Entity) p1).set_Velocity(Vector3.op_Subtraction(this.p2.get_Position(), ((Entity) p1).get_Position()));
  6313. JC2.attachEntitiesToRope(this.rope, this.p1, this.p2, 1.0, this.dist * 0.95, this.e1_offset, this.e2_offset);
  6314. }
  6315. }
  6316. else if (this.isPed_p2 && this.isVehicle_p1)
  6317. {
  6318. Ped p2 = (Ped) this.p2;
  6319. Vector3 velocity = this.p1.get_Velocity();
  6320. // ISSUE: explicit reference operation
  6321. double num1 = (double) ((Vector3) @velocity).Length();
  6322. velocity = ((Entity) p2).get_Velocity();
  6323. int num2;
  6324. // ISSUE: explicit reference operation
  6325. if (((double) ((Vector3) @velocity).Length() >= 0.3 || (double) World.GetDistance(this.p1.get_Position(), (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
  6326. {
  6327. InputArgument.op_Implicit(this.rope.get_Handle()),
  6328. InputArgument.op_Implicit(0)
  6329. })) < this.dist * 0.95) && (double) World.GetDistance(this.p1.get_Position(), (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
  6330. {
  6331. InputArgument.op_Implicit(this.rope.get_Handle())
  6332. })) <= 3.0)
  6333. {
  6334. if (!p2.get_IsRagdoll())
  6335. {
  6336. Model model = this.p1.get_Model();
  6337. // ISSUE: explicit reference operation
  6338. if (((Model) @model).get_IsVehicle())
  6339. {
  6340. velocity = this.p1.get_Velocity();
  6341. // ISSUE: explicit reference operation
  6342. if ((double) ((Vector3) @velocity).Length() > 5.0)
  6343. goto label_35;
  6344. }
  6345. }
  6346. num2 = 0;
  6347. goto label_36;
  6348. }
  6349. label_35:
  6350. num2 = 1;
  6351. label_36:
  6352. if (num2 != 0)
  6353. {
  6354. this.rope.Delete();
  6355. this.rope = JC2.createRope(this.p1.get_Position(), this.p1.get_Position(), 1.0, this.dist * 0.95, (Bone) -1);
  6356. ((Entity) p2).set_FreezePosition(false);
  6357. Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
  6358. {
  6359. InputArgument.op_Implicit(p2),
  6360. InputArgument.op_Implicit(true)
  6361. });
  6362. Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
  6363. {
  6364. InputArgument.op_Implicit(p2),
  6365. InputArgument.op_Implicit(30000),
  6366. InputArgument.op_Implicit(30000),
  6367. InputArgument.op_Implicit(0),
  6368. InputArgument.op_Implicit(0),
  6369. InputArgument.op_Implicit(0)
  6370. });
  6371. ((Entity) p2).set_Health(100);
  6372. ((Entity) p2).ApplyForce(Vector3.op_Subtraction(this.p1.get_Position(), ((Entity) p2).get_Position()));
  6373. ((Entity) p2).set_Velocity(Vector3.op_Subtraction(this.p1.get_Position(), ((Entity) p2).get_Position()));
  6374. JC2.attachEntitiesToRope(this.rope, this.p1, this.p1, 1.0, this.dist * 0.95, this.e1_offset, this.e2_offset);
  6375. }
  6376. }
  6377. }
  6378. }
  6379. catch (Exception ex)
  6380. {
  6381. ProjectData.SetProjectError(ex);
  6382. ProjectData.ClearProjectError();
  6383. }
  6384. }
  6385. }
  6386.  
  6387. private class ᙃ
  6388. {
  6389. public Entity ent;
  6390. public Vector3 offset;
  6391.  
  6392. public ᙃ(Entity e, Vector3 hitPos)
  6393. {
  6394. this.ent = (Entity) null;
  6395. if (!THelper.Exists(e))
  6396. return;
  6397. JC2.\u00352AA0(e);
  6398. this.ent = e;
  6399. this.offset = e.GetOffsetFromWorldCoords(hitPos);
  6400. JC2.BFAAA.Add(this);
  6401. }
  6402. }
  6403.  
  6404. private class ᙄ
  6405. {
  6406. public Entity ent;
  6407. public Prop bombinha;
  6408. public Vector3 offset;
  6409. public Vector3 offset2;
  6410. public Vector3 dir;
  6411. public DateTime timerAlive;
  6412. public bool bOk;
  6413. private int \u00324AAA;
  6414. private int \u00384AAA;
  6415. private bool \u00394AA0;
  6416. private bool B4AAA;
  6417. private Vector3 C4AA0;
  6418. private bool \u00305AAA;
  6419. private short \u00315AA0;
  6420. private string \u00325AAA;
  6421. private double \u00335AA0;
  6422. private double \u00345AAA;
  6423.  
  6424. public ᙄ(Entity pEnt, Vector3 pHitPosition, Vector3 pDir)
  6425. {
  6426. this.ent = (Entity) null;
  6427. this.bombinha = (Prop) null;
  6428. this.bOk = false;
  6429. this.\u00324AAA = -1;
  6430. this.\u00384AAA = -1;
  6431. this.\u00394AA0 = true;
  6432. this.B4AAA = false;
  6433. this.\u00305AAA = true;
  6434. this.\u00315AA0 = (short) 0;
  6435. if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, "throw_l_fb_stand", 0.6) || THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, "throw_m_fb_stand", 0.4))
  6436. return;
  6437. this.ent = pEnt;
  6438. if (THelper.Exists(this.ent))
  6439. {
  6440. this.bombinha = World.CreateProp(JC2.\u00317AA0, THelper.getCreationPos(15.0, 15.0), false, false);
  6441. Script.Wait(10);
  6442. if (!THelper.Exists((Entity) this.bombinha))
  6443. return;
  6444. this.offset = this.ent.GetOffsetFromWorldCoords(pHitPosition);
  6445. this.dir = pDir;
  6446. this.offset2 = this.ent.GetOffsetFromWorldCoords(Vector3.op_Addition(pHitPosition, this.dir));
  6447. bool flag = true;
  6448. List<JC2.ᙄ>.Enumerator enumerator;
  6449. try
  6450. {
  6451. enumerator = JC2.\u0038GAAA.GetEnumerator();
  6452. while (enumerator.MoveNext())
  6453. {
  6454. JC2.ᙄ current = enumerator.Current;
  6455. try
  6456. {
  6457. if (THelper.Exists(current.ent) && current.ent.get_Handle() == this.ent.get_Handle())
  6458. {
  6459. flag = false;
  6460. break;
  6461. }
  6462. }
  6463. catch (Exception ex)
  6464. {
  6465. ProjectData.SetProjectError(ex);
  6466. ProjectData.ClearProjectError();
  6467. }
  6468. }
  6469. }
  6470. finally
  6471. {
  6472. enumerator.Dispose();
  6473. }
  6474. if (flag)
  6475. {
  6476. THelper.getSoundID(ref this.\u00324AAA);
  6477. THelper.getSoundID(ref this.\u00384AAA);
  6478. }
  6479. ((Entity) Game.get_Player().get_Character()).set_Heading((float) THelper.directionToHeading(Vector3.op_Subtraction(this.ent.GetOffsetInWorldCoords(this.offset), ((Entity) Game.get_Player().get_Character()).get_Position())));
  6480. this.\u00325AAA = "throw_l_fb_stand";
  6481. this.\u00345AAA = 0.6;
  6482. this.\u00335AA0 = 0.2;
  6483. Vector3 position = this.ent.get_Position();
  6484. // ISSUE: explicit reference operation
  6485. if ((double) ((Vector3) @position).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position()) > 5.0)
  6486. {
  6487. this.\u00325AAA = "throw_m_fb_stand";
  6488. this.\u00345AAA = 0.4;
  6489. this.\u00335AA0 = 0.146;
  6490. }
  6491. Game.get_Player().get_Character().get_Task().ClearAllImmediately();
  6492. THelper.anim_playPedAnim(Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, 8.0, THelper.animFlags.normal, false);
  6493. THelper.attachEntToEnt((Entity) this.bombinha, (Entity) Game.get_Player().get_Character(), 0, Game.get_Player().get_Character().GetBoneIndex((Bone) 57005), Vector3.get_Zero(), Vector3.get_Zero(), false, false, false, false, true);
  6494. if (THelper.Exists((Entity) JC2.\u0036GAAA))
  6495. ((Entity) JC2.\u0036GAAA).set_IsVisible(false);
  6496. this.\u00315AA0 = (short) 1;
  6497. JC2.\u0038GAAA.Add(this);
  6498. }
  6499. }
  6500.  
  6501. private void \u0034AAAA()
  6502. {
  6503. Vector3 rotation = THelper.directionToRotation(this.dir, 0.0);
  6504. rotation.X = (__Null) (rotation.X + 90.0);
  6505. Vector3 rot1 = Vector3.op_Subtraction(rotation, this.ent.get_Rotation());
  6506. if (THelper.isPed(this.ent))
  6507. {
  6508. double num1 = 0.35;
  6509. Vector3 offset1;
  6510. Vector3 pedBonePos = THelper.getPedBonePos(this.ent, 31086, offset1);
  6511. // ISSUE: explicit reference operation
  6512. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6513. {
  6514. // ISSUE: explicit reference operation
  6515. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6516. Prop bombinha = this.bombinha;
  6517. Entity ent = this.ent;
  6518. int boneIndexEnt1 = 0;
  6519. int pedBoneIndex = THelper.getPedBoneIndex((Ped) this.ent, 31086);
  6520. Vector3 vector3;
  6521. // ISSUE: explicit reference operation
  6522. ((Vector3) @vector3).\u002Ector(0.0f, 0.0f, 0.0f);
  6523. Vector3 offset2 = vector3;
  6524. Vector3 rot2 = rot1;
  6525. int num2 = 0;
  6526. int num3 = 0;
  6527. int num4 = 0;
  6528. int num5 = 0;
  6529. int num6 = 1;
  6530. THelper.attachEntToEnt((Entity) bombinha, ent, boneIndexEnt1, pedBoneIndex, offset2, rot2, num2 != 0, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
  6531. }
  6532. pedBonePos = THelper.getPedBonePos(this.ent, 60309, offset1);
  6533. // ISSUE: explicit reference operation
  6534. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6535. {
  6536. // ISSUE: explicit reference operation
  6537. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6538. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 60309), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6539. }
  6540. pedBonePos = THelper.getPedBonePos(this.ent, 28422, offset1);
  6541. // ISSUE: explicit reference operation
  6542. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6543. {
  6544. // ISSUE: explicit reference operation
  6545. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6546. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 28422), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6547. }
  6548. pedBonePos = THelper.getPedBonePos(this.ent, 57717, offset1);
  6549. // ISSUE: explicit reference operation
  6550. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6551. {
  6552. // ISSUE: explicit reference operation
  6553. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6554. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 57717), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6555. }
  6556. pedBonePos = THelper.getPedBonePos(this.ent, 24806, offset1);
  6557. // ISSUE: explicit reference operation
  6558. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6559. {
  6560. // ISSUE: explicit reference operation
  6561. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6562. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 24806), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6563. }
  6564. pedBonePos = THelper.getPedBonePos(this.ent, 63931, offset1);
  6565. // ISSUE: explicit reference operation
  6566. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6567. {
  6568. // ISSUE: explicit reference operation
  6569. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6570. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 63931), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6571. }
  6572. pedBonePos = THelper.getPedBonePos(this.ent, 36864, offset1);
  6573. // ISSUE: explicit reference operation
  6574. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6575. {
  6576. // ISSUE: explicit reference operation
  6577. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6578. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 63931), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6579. }
  6580. pedBonePos = THelper.getPedBonePos(this.ent, 57005, offset1);
  6581. // ISSUE: explicit reference operation
  6582. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6583. {
  6584. // ISSUE: explicit reference operation
  6585. num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6586. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 57005), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6587. }
  6588. pedBonePos = THelper.getPedBonePos(this.ent, 18905, offset1);
  6589. // ISSUE: explicit reference operation
  6590. if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
  6591. {
  6592. // ISSUE: explicit reference operation
  6593. double num2 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
  6594. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 18905), Vector3.get_Zero(), rot1, false, false, false, false, true);
  6595. }
  6596. if (!((Entity) this.bombinha).IsAttached())
  6597. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, 0, Vector3.op_Addition(this.offset, Vector3.op_Multiply(this.dir, 0.15f)), rot1, false, false, false, false, true);
  6598. }
  6599. else
  6600. THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, 0, Vector3.op_Addition(this.offset, Vector3.op_Multiply(this.dir, 0.15f)), rot1, false, false, false, false, true);
  6601. if (!this.\u00305AAA)
  6602. return;
  6603. this.\u00305AAA = false;
  6604. THelper.play3DSound(".\\scripts\\jc3 files\\set_c4.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
  6605. }
  6606.  
  6607. public void trigger()
  6608. {
  6609. if (this.B4AAA)
  6610. return;
  6611. this.B4AAA = true;
  6612. this.timerAlive = DateAndTime.Now;
  6613. }
  6614.  
  6615. public void tick()
  6616. {
  6617. try
  6618. {
  6619. if ((int) this.\u00315AA0 == 1)
  6620. {
  6621. if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, this.\u00335AA0))
  6622. {
  6623. ((Entity) Game.get_Player().get_Character()).set_Heading((float) THelper.directionToHeading(Vector3.op_Subtraction(this.ent.GetOffsetInWorldCoords(this.offset), ((Entity) Game.get_Player().get_Character()).get_Position())));
  6624. return;
  6625. }
  6626. ((Entity) this.bombinha).Detach();
  6627. this.\u00315AA0 = (short) 2;
  6628. }
  6629. else if ((int) this.\u00315AA0 == 2)
  6630. {
  6631. if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, this.\u00345AAA))
  6632. {
  6633. if (!((Entity) this.bombinha).IsAttached())
  6634. {
  6635. Vector3 offsetInWorldCoords = this.ent.GetOffsetInWorldCoords(this.offset);
  6636. Vector3 dir;
  6637. // ISSUE: explicit reference operation
  6638. ((Vector3) @dir).\u002Ector(0.7f, 0.7f, 0.7f);
  6639. ((Entity) this.bombinha).set_Rotation(THelper.directionToRotation(dir, 0.0));
  6640. Vector3 vector3 = offsetInWorldCoords;
  6641. Function.Call((Hash) 3449744191218520391L, new InputArgument[8]
  6642. {
  6643. InputArgument.op_Implicit(this.bombinha),
  6644. InputArgument.op_Implicit((float) vector3.X),
  6645. InputArgument.op_Implicit((float) vector3.Y),
  6646. InputArgument.op_Implicit((float) vector3.Z),
  6647. InputArgument.op_Implicit((float) dir.X),
  6648. InputArgument.op_Implicit((float) dir.Y),
  6649. InputArgument.op_Implicit((float) dir.Z),
  6650. InputArgument.op_Implicit(true)
  6651. });
  6652. Vector3 position = ((Entity) this.bombinha).get_Position();
  6653. // ISSUE: explicit reference operation
  6654. if ((double) ((Vector3) @position).DistanceTo(vector3) < 0.1)
  6655. this.\u0034AAAA();
  6656. }
  6657. ((Entity) Game.get_Player().get_Character()).set_Heading((float) THelper.directionToHeading(Vector3.op_Subtraction(this.ent.GetOffsetInWorldCoords(this.offset), ((Entity) Game.get_Player().get_Character()).get_Position())));
  6658. return;
  6659. }
  6660. this.\u0034AAAA();
  6661. THelper.anim_stopPedAnim(Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, 2.0);
  6662. this.timerAlive = DateAndTime.Now;
  6663. Model model = this.ent.get_Model();
  6664. // ISSUE: explicit reference operation
  6665. this.C4AA0 = ((Model) @model).GetDimensions();
  6666. this.bOk = true;
  6667. this.\u00315AA0 = (short) 0;
  6668. if (THelper.Exists((Entity) JC2.\u0036GAAA))
  6669. ((Entity) JC2.\u0036GAAA).set_IsVisible(true);
  6670. }
  6671. if (!this.B4AAA)
  6672. return;
  6673. if (!THelper.Exists(this.ent))
  6674. throw new Exception("ent gone");
  6675. if (this.\u00394AA0)
  6676. {
  6677. this.\u00394AA0 = false;
  6678. if (this.\u00324AAA != -1)
  6679. THelper.playSoundFromEntity(this.\u00324AAA, "Woosh_02", this.ent, "FBI_HEIST_ELEVATOR_SHAFT_DEBRIS_SOUNDS");
  6680. if (this.\u00384AAA != -1)
  6681. THelper.playSoundFromEntity(this.\u00384AAA, "SPL_RPG_DIST_FLIGHT_MASTER", this.ent, "");
  6682. }
  6683. Vector3 vector3_1 = Vector3.Normalize(Vector3.op_Subtraction(this.offset, this.ent.get_Position()));
  6684. Vector3 vector3_2 = Vector3.Normalize(Vector3.op_Subtraction(this.ent.GetOffsetInWorldCoords(this.offset2), this.ent.GetOffsetInWorldCoords(this.offset)));
  6685. Vector3 dir1 = vector3_2;
  6686. Vector3 rot1;
  6687. // ISSUE: explicit reference operation
  6688. ((Vector3) @rot1).\u002Ector(0.0f, (float) (THelper.directionToRotation(dir1, 0.0).X * -1.0), (float) (THelper.directionToRotation(dir1, 0.0).Z + 90.0));
  6689. if (THelper.Exists((Entity) this.bombinha))
  6690. {
  6691. Prop bombinha = this.bombinha;
  6692. string sPTFX = "muz_assault_rifle";
  6693. string sAsset = "scr_fbi5a";
  6694. Vector3 zero = Vector3.get_Zero();
  6695. Vector3 vector3_3;
  6696. // ISSUE: explicit reference operation
  6697. ((Vector3) @vector3_3).\u002Ector(0.0f, 90f, 0.0f);
  6698. Vector3 rot2 = vector3_3;
  6699. double size = 1.5;
  6700. THelper.ptfx_triggerOnEntity((Entity) bombinha, sPTFX, sAsset, zero, rot2, size);
  6701. }
  6702. else
  6703. THelper.ptfx_triggerOnEntity(this.ent, "muz_assault_rifle", "scr_fbi5a", this.offset, rot1, 1.5);
  6704. double num = 0.0;
  6705. Vector3 velocity = this.ent.get_Velocity();
  6706. // ISSUE: explicit reference operation
  6707. if ((double) ((Vector3) @velocity).Length() < 1.0)
  6708. num = 1.0;
  6709. if (THelper.isPed(this.ent))
  6710. THelper.setPedToRagdoll((Ped) this.ent, (short) 1000, (short) 1000, (short) 0, true, true, false);
  6711. if (!THelper.isVehicle(this.ent))
  6712. vector3_1 = Vector3.get_Zero();
  6713. if (this.offset.Y > 0.0)
  6714. this.ent.ApplyForce(Vector3.op_Addition(Vector3.op_Multiply(vector3_2, -0.5f), Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldUp(), 0.15f), (float) num)), vector3_1);
  6715. else
  6716. this.ent.ApplyForce(Vector3.op_Addition(Vector3.op_Multiply(vector3_2, -0.5f), Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldUp(), 0.15f), (float) num)), Vector3.op_Multiply(vector3_1, -1f));
  6717. RaycastResult raycastResult = World.Raycast(this.ent.GetOffsetInWorldCoords(Vector3.get_RelativeBack()), Vector3.op_Addition(this.ent.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 1.5f)), (IntersectOptions) -1, this.ent);
  6718. // ISSUE: explicit reference operation
  6719. if (((RaycastResult) @raycastResult).get_DitHitAnything())
  6720. {
  6721. if ((double) this.offset.Y < (double) this.C4AA0.Y * -0.35)
  6722. this.ent.ApplyForceRelative(Vector3.op_Multiply(Vector3.get_RelativeBottom(), 0.2f), Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldNorth(), -5f), (float) this.dir.Z));
  6723. else if ((double) this.offset.Y > (double) this.C4AA0.Y * 0.35)
  6724. this.ent.ApplyForceRelative(Vector3.op_Multiply(Vector3.get_RelativeBottom(), 0.2f), Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldNorth(), 5f), (float) this.dir.Z));
  6725. }
  6726. if (DateAndTime.Now.Subtract(this.timerAlive).TotalMilliseconds > 10000.0)
  6727. {
  6728. World.AddExplosion(this.ent.GetOffsetInWorldCoords(this.offset2), (ExplosionType) 7, 1f, 0.5f);
  6729. throw new Exception("exploded");
  6730. }
  6731. }
  6732. catch (Exception ex)
  6733. {
  6734. ProjectData.SetProjectError(ex);
  6735. if (!this.\u00394AA0)
  6736. {
  6737. if (this.\u00324AAA != -1)
  6738. THelper.stopSound(this.\u00324AAA);
  6739. if (this.\u00384AAA != -1)
  6740. THelper.stopSound(this.\u00384AAA);
  6741. }
  6742. if (THelper.Exists((Entity) this.bombinha))
  6743. {
  6744. ((Entity) this.bombinha).Delete();
  6745. this.bombinha = (Prop) null;
  6746. }
  6747. JC2.\u0038GAAA.Remove(this);
  6748. ProjectData.ClearProjectError();
  6749. }
  6750. }
  6751. }
  6752.  
  6753. private class ᙅ
  6754. {
  6755. public Entity ent1;
  6756. public Entity ent2;
  6757. public Vector3 anchorPos;
  6758. public Vector3 secAttachPos;
  6759. private double \u00355AA0;
  6760. private bool \u00365AAA;
  6761. private DateTime \u00375AA0;
  6762.  
  6763. public ᙅ(Entity e1, Entity e2)
  6764. {
  6765. this.ent1 = (Entity) null;
  6766. this.ent2 = (Entity) null;
  6767. this.anchorPos = (Vector3) null;
  6768. this.secAttachPos = (Vector3) null;
  6769. this.\u00365AAA = false;
  6770. try
  6771. {
  6772. this.ent1 = e1;
  6773. this.ent2 = e2;
  6774. Vector3 position = e1.get_Position();
  6775. // ISSUE: explicit reference operation
  6776. this.\u00355AA0 = (double) ((Vector3) @position).DistanceTo(e2.get_Position());
  6777. JC2.CA0A0.Add(this);
  6778. }
  6779. catch (Exception ex)
  6780. {
  6781. ProjectData.SetProjectError(ex);
  6782. ProjectData.ClearProjectError();
  6783. }
  6784. }
  6785.  
  6786. public ᙅ(Vector3 pAnchorPos, Vector3 pPos)
  6787. {
  6788. this.ent1 = (Entity) null;
  6789. this.ent2 = (Entity) null;
  6790. this.anchorPos = (Vector3) null;
  6791. this.secAttachPos = (Vector3) null;
  6792. this.\u00365AAA = false;
  6793. this.anchorPos = pAnchorPos;
  6794. this.secAttachPos = pPos;
  6795. JC2.CA0A0.Add(this);
  6796. }
  6797.  
  6798. public void retract(bool bDontCalDist = false)
  6799. {
  6800. try
  6801. {
  6802. if ((!THelper.Exists(this.ent1) || !THelper.Exists(this.ent2)) && !false)
  6803. return;
  6804. Vector3 vector3 = Vector3.Normalize(Vector3.op_Subtraction(this.ent2.get_Position(), this.ent1.get_Position()));
  6805. double num1 = !THelper.isPed(this.ent1) ? Conversions.ToDouble(Operators.MultiplyObject(THelper.getMassCoef(this.ent1), (object) 0.5)) : 1.0;
  6806. if (!this.ent1.get_IsVisible())
  6807. num1 = 0.0;
  6808. double num2 = !THelper.isPed(this.ent2) ? Conversions.ToDouble(Operators.MultiplyObject(THelper.getMassCoef(this.ent2), (object) 0.5)) : 1.0;
  6809. if (!this.ent2.get_IsVisible())
  6810. num2 = 0.0;
  6811. double val2_1 = num1 + (num1 - num2);
  6812. double val2_2 = num2 + (num2 - val2_1);
  6813. double num3 = System.Math.Max(0.0, val2_1);
  6814. double num4 = System.Math.Max(0.0, val2_2);
  6815. double num5 = 1.0;
  6816. Vector3 position = this.ent1.get_Position();
  6817. // ISSUE: explicit reference operation
  6818. double num6 = (double) ((Vector3) @position).DistanceTo(this.ent2.get_Position());
  6819. double num7 = (double) System.Math.Max((float) num5, (float) num6);
  6820. if (this.\u00355AA0 > num7)
  6821. this.\u00355AA0 = num7;
  6822. if (!bDontCalDist)
  6823. {
  6824. if (!this.ent1.IsTouching(this.ent2) && !this.ent2.IsTouching(this.ent1))
  6825. {
  6826. if (this.\u00355AA0 < 1.0)
  6827. {
  6828. Entity ent1 = this.ent1;
  6829. ent1.set_Velocity(Vector3.op_Addition(ent1.get_Velocity(), Vector3.op_Multiply(Vector3.op_Subtraction(Vector3.op_Multiply(vector3, (float) num3), this.ent1.get_Velocity()), 0.1f)));
  6830. Entity ent2 = this.ent2;
  6831. ent2.set_Velocity(Vector3.op_Addition(ent2.get_Velocity(), Vector3.op_Multiply(Vector3.op_Subtraction(Vector3.op_Multiply(Vector3.op_Multiply(vector3, (float) num4), -1f), this.ent2.get_Velocity()), 0.1f)));
  6832. }
  6833. this.ent1.ApplyForce(Vector3.op_Multiply(vector3, (float) num3));
  6834. this.ent2.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(vector3, (float) num4), -1f));
  6835. }
  6836. THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", this.ent1, "");
  6837. THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", this.ent2, "");
  6838. if (this.\u00355AA0 < 50.0)
  6839. {
  6840. JC2.TEntityInRope tentityInRope = JC2.\u00383AAA(this.ent1, this.ent2);
  6841. if (tentityInRope != null)
  6842. JC2.attachEntitiesToRope(tentityInRope.rope, this.ent1, this.ent2, 1.0, this.\u00355AA0, tentityInRope.e1_offset, tentityInRope.e2_offset);
  6843. }
  6844. this.\u00365AAA = true;
  6845. this.\u00375AA0 = DateAndTime.Now;
  6846. }
  6847. else if (this.\u00365AAA && DateAndTime.Now.Subtract(this.\u00375AA0).TotalMilliseconds > 200.0)
  6848. {
  6849. this.\u00365AAA = false;
  6850. this.\u00375AA0 = DateAndTime.Now;
  6851. JC2.TEntityInRope tentityInRope1 = JC2.\u00383AAA(this.ent1, this.ent2);
  6852. Vector3 e1_Off = Vector3.get_Zero();
  6853. Vector3 e2_Off = Vector3.get_Zero();
  6854. if (tentityInRope1 != null)
  6855. {
  6856. e1_Off = tentityInRope1.e1_offset;
  6857. e2_Off = tentityInRope1.e2_offset;
  6858. tentityInRope1.remove();
  6859. }
  6860. Rope rope = JC2.createRope(this.ent1, this.ent2, 0.5, 0.0, (Bone) -1);
  6861. JC2.TEntityInRope tentityInRope2 = new JC2.TEntityInRope(this.ent1, this.ent2, rope, this.\u00355AA0, e1_Off, e2_Off);
  6862. JC2.attachEntitiesToRope(rope, this.ent1, this.ent2, 1.0, this.\u00355AA0, tentityInRope2.e1_offset, tentityInRope2.e2_offset);
  6863. }
  6864. }
  6865. catch (Exception ex)
  6866. {
  6867. ProjectData.SetProjectError(ex);
  6868. this.remove();
  6869. ProjectData.ClearProjectError();
  6870. }
  6871. }
  6872.  
  6873. public void remove()
  6874. {
  6875. JC2.CA0A0.Remove(this);
  6876. }
  6877.  
  6878. public void tick()
  6879. {
  6880. try
  6881. {
  6882. bool flag1 = THelper.Exists(this.ent1);
  6883. bool flag2 = THelper.Exists(this.ent2);
  6884. Vector3 vector3;
  6885. if (!flag1 && !flag2 && Vector3.op_Equality(this.anchorPos, vector3))
  6886. throw new Exception("gone");
  6887. if ((!flag1 || !flag2) && (Vector3.op_Equality(this.anchorPos, vector3) && Vector3.op_Equality(this.secAttachPos, vector3)))
  6888. throw new Exception("gone");
  6889. Vector3 position = this.ent1.get_Position();
  6890. // ISSUE: explicit reference operation
  6891. if (System.Math.Abs((double) ((Vector3) @position).DistanceTo(this.ent2.get_Position()) - this.\u00355AA0) <= 0.2)
  6892. return;
  6893. this.retract(true);
  6894. }
  6895. catch (Exception ex)
  6896. {
  6897. ProjectData.SetProjectError(ex);
  6898. this.remove();
  6899. ProjectData.ClearProjectError();
  6900. }
  6901. }
  6902. }
  6903. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement