Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Math;
- using GTA.Native;
- using Microsoft.VisualBasic;
- using Microsoft.VisualBasic.CompilerServices;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.IO;
- using System.Runtime.InteropServices;
- using System.Windows.Forms;
- public class JC2 : Script
- {
- private static List<Prop> \u00358AA0 = new List<Prop>();
- private static List<JC2.TGasObjects> \u00368AAA = new List<JC2.TGasObjects>();
- private static List<JC2.TEntityInRope> \u0035BAA0 = new List<JC2.TEntityInRope>();
- private static Model CBAA0 = (Model) null;
- private static List<JC2.ᙃ> BFAAA = new List<JC2.ᙃ>();
- private static Prop \u0036GAAA = (Prop) null;
- private static List<JC2.ᙄ> \u0038GAAA = new List<JC2.ᙄ>();
- private static List<JC2.ᙅ> CA0A0 = new List<JC2.ᙅ>();
- private string \u00385AAA;
- private string \u00395AA0;
- private string B5AAA;
- private string C5AA0;
- private static Random \u00306AAA;
- private CustomIniFile \u00316AA0;
- private CustomIniFile \u00326AAA;
- private DateTime \u00336AA0;
- private bool \u00346AAA;
- private TMenu \u00356AA0;
- private Keys \u00366AAA;
- private Keys \u00376AA0;
- private Keys \u00386AAA;
- private Keys \u00396AA0;
- private Keys B6AAA;
- private bool C6AA0;
- private bool \u00307AAA;
- private static Model \u00317AA0;
- private Model \u00327AAA;
- private Model \u00337AA0;
- private List<Prop> \u00347AAA;
- private DateTime \u00357AA0;
- private string \u00367AAA;
- private string \u00377AA0;
- private string \u00387AAA;
- private string \u00397AA0;
- private string B7AAA;
- private string C7AA0;
- private string \u00308AAA;
- private string \u00318AA0;
- private string \u00328AAA;
- private string \u00338AA0;
- private bool \u00348AAA;
- private Vehicle \u00378AA0;
- private DateTime \u00388AAA;
- private string \u00398AA0;
- private string B8AAA;
- private string C8AA0;
- private string \u00309AAA;
- private string \u00319AA0;
- private string \u00329AAA;
- private string \u00339AA0;
- private string \u00349AAA;
- private bool \u00359AA0;
- private Keys \u00369AAA;
- private object \u00379AA0;
- private double \u00389AAA;
- private Entity \u00399AA0;
- private Vector3 B9AAA;
- private Entity C9AA0;
- private Vector3 \u0030BAAA;
- private Vector3 \u0031BAA0;
- private DateTime \u0032BAAA;
- private Vector3 C3AA0;
- private Entity \u0034BAAA;
- private List<Entity> \u0036BAAA;
- private DateTime \u0037BAA0;
- private DateTime \u0038BAAA;
- private List<Entity> \u0039BAA0;
- private Prop BBAAA;
- private string \u0030CAAA;
- private bool \u0031CAA0;
- private Rope \u0032CAAA;
- private bool \u0033CAA0;
- private bool \u0034CAAA;
- private Vector3 \u0035CAA0;
- private Entity \u0036CAAA;
- private double \u0037CAA0;
- private THelper.TAnimDict \u0038CAAA;
- private THelper.TAnimDict \u0039CAA0;
- private string BCAAA;
- private string CCAA0;
- private double \u0030DAAA;
- private bool \u0031DAA0;
- private DateTime \u0032DAAA;
- private bool \u0033DAA0;
- private double \u0034DAAA;
- private bool \u0035DAA0;
- private bool \u0036DAAA;
- private int \u0037DAA0;
- private Entity \u0038DAAA;
- private Vector3 \u0039DAA0;
- private double BDAAA;
- private double CDAA0;
- private int \u0030EAAA;
- private Prop \u0031EAA0;
- private bool \u0032EAAA;
- private List<Entity> \u0033EAA0;
- private DateTime \u0034EAAA;
- private List<Entity> \u0035EAA0;
- private Entity \u0036EAAA;
- private Model \u0037EAA0;
- private bool \u0038EAAA;
- private double \u0039EAA0;
- private Vector3 BEAAA;
- private int CEAA0;
- private DateTime \u0030FAAA;
- private bool \u0031FAA0;
- private Vector3 \u0032FAAA;
- private bool \u0033FAA0;
- private static Model \u0034FAAA;
- private static Model \u0035FAA0;
- private static int \u0036FAAA;
- private static int \u0037FAA0;
- private static Vector3 \u0038FAAA;
- private bool \u0039FAA0;
- private Prop CFAA0;
- private List<Prop> \u0030GAAA;
- private Vector3 \u0031GAA0;
- private Vector3 \u0032GAAA;
- private Vector3 \u0033GAA0;
- private Vehicle \u0034GAAA;
- private bool \u0035GAA0;
- private static THelper.TAnimDict \u0037GAA0;
- private bool \u0039GAA0;
- private THelper.TAnimDict BGAAA;
- private THelper.TAnimDict CGAA0;
- private THelper.TAnimDict \u0030HAAA;
- private short \u0031HAA0;
- private string \u0032HAAA;
- private string \u0033HAA0;
- private int \u0034HAAA;
- private double \u0035HAA0;
- private Vector3 \u0036HAAA;
- private Vector3 \u0037HAA0;
- private double \u0038HAAA;
- private Model \u0039HAA0;
- private Prop BHAAA;
- private Vector3 CHAA0;
- private Vector3 \u0030A0AA;
- private DateTime \u0031A0A0;
- private double \u0032A0AA;
- private double \u0033A0A0;
- private double \u0034A0AA;
- private Vector3 \u0035A0A0;
- private Camera \u0036A0AA;
- private Vector3 \u0037A0A0;
- private bool \u0038A0AA;
- private bool \u0039A0A0;
- private DateTime BA0AA;
- public JC2()
- {
- base.\u002Ector();
- this.add_KeyDown(new KeyEventHandler(this.\u00310AA0));
- this.add_KeyUp(new KeyEventHandler(this.\u00330AA0));
- this.add_Tick(new EventHandler(this.\u00322AAA));
- this.\u00385AAA = "Just Cause 3 mod v1.2 by JulioNIB";
- this.\u00395AA0 = "jc3";
- this.B5AAA = "xxxxxxxxxx";
- this.C5AA0 = "";
- this.\u00346AAA = false;
- this.\u00366AAA = Keys.Space;
- this.\u00376AA0 = Keys.Z;
- this.\u00386AAA = Keys.H;
- this.\u00396AA0 = Keys.N;
- this.B6AAA = Keys.LControlKey;
- this.C6AA0 = true;
- this.\u00307AAA = true;
- this.\u00347AAA = new List<Prop>();
- this.\u00357AA0 = DateAndTime.Now;
- this.\u00367AAA = "misstrevor2ig_9a";
- this.\u00377AA0 = "get_on_plane_ped";
- this.\u00387AAA = "oddjobs@bailbond_mountain";
- this.\u00397AA0 = "base_jump_spot";
- this.B7AAA = "misstrevor3";
- this.C7AA0 = "biker_exit_2";
- this.\u00308AAA = "rcmnigel3_trunk";
- this.\u00318AA0 = "out_trunk_trevor";
- this.\u00328AAA = "missfinale_b_ig_5";
- this.\u00338AA0 = "hold_michael_loop_mic";
- this.\u00348AAA = false;
- this.\u00378AA0 = (Vehicle) null;
- this.\u00388AAA = DateAndTime.Now;
- this.\u00398AA0 = "veh@boat@jetski@front@ds";
- this.B8AAA = "dead_fall_out";
- this.C8AA0 = "missfinale_b_ig_5";
- this.\u00309AAA = "hold_michael_headbut_mic";
- this.\u00319AA0 = "veh@truck@mixer@ds@enter_exit";
- this.\u00329AAA = "jack_dead_perp";
- this.\u00339AA0 = "veh@plane@shamal@front@ps@enter_exit";
- this.\u00349AAA = "jack_dead_perp";
- this.\u00359AA0 = false;
- this.\u00369AAA = Keys.E;
- this.\u00379AA0 = (object) false;
- this.\u00389AAA = 0.0;
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- this.\u0032BAAA = DateAndTime.Now;
- this.\u0034BAAA = (Entity) null;
- this.\u0036BAAA = new List<Entity>();
- this.\u0037BAA0 = DateAndTime.Now;
- this.\u0038BAAA = DateAndTime.Now;
- this.\u0039BAA0 = new List<Entity>();
- this.BBAAA = (Prop) null;
- this.\u0030CAAA = "ng_proc_paintcan01a";
- this.\u0031CAA0 = false;
- this.\u0032CAAA = (Rope) null;
- this.\u0033CAA0 = false;
- this.\u0034CAAA = false;
- this.\u0035CAA0 = Vector3.get_Zero();
- this.\u0036CAAA = (Entity) null;
- this.\u0037CAA0 = 0.0;
- this.\u0038CAAA = (THelper.TAnimDict) null;
- this.\u0039CAA0 = (THelper.TAnimDict) null;
- this.\u0030DAAA = -1.0;
- this.\u0031DAA0 = false;
- this.\u0032DAAA = DateAndTime.Now;
- this.\u0033DAA0 = false;
- this.\u0034DAAA = 0.0;
- this.\u0035DAA0 = true;
- this.\u0036DAAA = false;
- this.\u0037DAA0 = -1;
- this.CDAA0 = 0.0;
- this.\u0030EAAA = 0;
- this.\u0031EAA0 = (Prop) null;
- this.\u0032EAAA = true;
- this.\u0033EAA0 = new List<Entity>();
- this.\u0034EAAA = DateAndTime.Now;
- this.\u0035EAA0 = new List<Entity>();
- this.\u0036EAAA = (Entity) null;
- this.\u0038EAAA = true;
- this.\u0039EAA0 = 0.0;
- this.BEAAA = Vector3.get_Zero();
- this.CEAA0 = -1;
- this.\u0030FAAA = DateAndTime.Now;
- this.\u0031FAA0 = false;
- this.\u0032FAAA = (Vector3) null;
- this.\u0033FAA0 = true;
- this.\u0039FAA0 = true;
- this.CFAA0 = (Prop) null;
- this.\u0030GAAA = new List<Prop>();
- this.\u0034GAAA = (Vehicle) null;
- this.\u0035GAA0 = false;
- this.\u0039GAA0 = false;
- this.BGAAA = (THelper.TAnimDict) null;
- this.CGAA0 = (THelper.TAnimDict) null;
- this.\u0030HAAA = (THelper.TAnimDict) null;
- this.\u0031HAA0 = (short) 1;
- this.\u0034HAAA = -1;
- this.\u0035HAA0 = -1.0;
- this.\u0038HAAA = 0.0;
- this.BHAAA = (Prop) null;
- this.\u0032A0AA = 0.0;
- this.\u0033A0A0 = 0.0;
- this.\u0034A0AA = 0.0;
- this.\u0035A0A0 = Vector3.get_Zero();
- this.\u0038A0AA = true;
- this.\u0039A0A0 = true;
- this.set_Interval(10);
- this.\u00336AA0 = DateAndTime.Now;
- }
- [DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true)]
- private static extern short GetAsyncKeyState(int vkey);
- private void \u0035AAA0()
- {
- if (DateAndTime.Now.Subtract(this.\u00336AA0).TotalMilliseconds <= 500.0)
- return;
- this.\u00346AAA = true;
- JC2.\u00306AAA = new Random(DateAndTime.Now.Millisecond);
- THelper.anim_requestDict(this.\u00367AAA);
- THelper.anim_requestDict(this.\u00387AAA);
- THelper.anim_requestDict(this.B7AAA);
- THelper.anim_requestDict(this.\u00308AAA);
- THelper.anim_requestDict(this.\u00328AAA);
- THelper.anim_requestDict(this.\u00398AA0);
- THelper.anim_requestDict(this.C8AA0);
- THelper.anim_requestDict(this.\u00319AA0);
- THelper.anim_requestDict(this.\u00339AA0);
- this.\u00316AA0 = new CustomIniFile("");
- this.C6AA0 = Operators.CompareString(this.\u00316AA0.settingsGetString("bEnabled", "general", "1", true), "1", false) == 0;
- this.\u0035DAA0 = Operators.CompareString(this.\u00316AA0.settingsGetString("v2_bUseRagdoll", "general", "0", true), "1", false) == 0;
- this.\u0036DAAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bDisableWindMill", "general", "0", true), "1", false) == 0;
- this.\u00307AAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bHookMode", "general", "1", true), "1", false) == 0;
- this.\u00386AAA = this.\u00316AA0.settingsGetKey("hkToggleHookMode", "hotkeys", this.\u00386AAA, true);
- this.\u00366AAA = this.\u00316AA0.settingsGetKey("hkParachute", "hotkeys", this.\u00366AAA, true);
- this.\u00376AA0 = this.\u00316AA0.settingsGetKey("hkReleaseHookInVeh", "hotkeys", this.\u00376AA0, true);
- StreamWriter streamWriter = new StreamWriter(".\\Scripts\\" + THelper.getScriptname() + ".nibmod");
- streamWriter.Write(this.\u00385AAA);
- streamWriter.Close();
- streamWriter.Dispose();
- this.\u00326AAA = new CustomIniFile(".\\scripts\\NIBScripts.ini");
- this.\u00396AA0 = this.\u00326AAA.settingsGetKey("hkShowMenu", "hotkeys", this.\u00396AA0, true);
- this.B6AAA = this.\u00326AAA.settingsGetKey("hkShowMenuKeyTwo", "hotkeys", this.B6AAA, true);
- this.\u00369AAA = this.\u00316AA0.settingsGetKey("hkTriggerBombs", "hotkeys", this.\u00369AAA, true);
- this.\u0038A0AA = Operators.CompareString(this.\u00316AA0.settingsGetString("bWingSuitEnabled", "general", "1", true), "1", false) == 0;
- this.\u0038EAAA = Operators.CompareString(this.\u00316AA0.settingsGetString("bCrosshairEnabled", "general", "1", true), "1", false) == 0;
- this.\u00356AA0 = new TMenu(this.\u00385AAA);
- this.\u00356AA0.addItem("bEnabled", "Enabled: ", Conversions.ToString(this.C6AA0), -1);
- this.\u00356AA0.addItem("bHookMode", "Hook mode (Ctrl + " + this.\u00386AAA.ToString() + "): ", Conversions.ToString(this.\u00307AAA), -1);
- this.\u00356AA0.addItem("bUseRagdoll", "Use ragdoll when moving to target: ", Conversions.ToString(this.\u0035DAA0), -1);
- this.\u00356AA0.addItem("bDisableWindMill", "Disable windmill feature: ", Conversions.ToString(this.\u0036DAAA), -1);
- this.\u00356AA0.addItem("bWingSuitEnabled", "Enable Wingsuit feature: ", Conversions.ToString(this.\u0038A0AA), -1);
- this.\u00356AA0.addItem("bCrosshairEnabled", "Enable crosshair: ", Conversions.ToString(this.\u0038EAAA), -1);
- this.\u00356AA0.addItem("close", "Close", "", -1);
- Function.Call((Hash) -5184338789570016586L, new InputArgument[1]
- {
- InputArgument.op_Implicit("scr_exile2")
- });
- this.\u0036AAAA();
- // ISSUE: explicit reference operation
- ((Model) @this.\u0037EAA0).\u002Ector((PedHash) -1011537562);
- // ISSUE: explicit reference operation
- ((Model) @this.\u0037EAA0).Request();
- Script.Wait(200);
- Ped[] nearbyPeds1 = World.GetNearbyPeds(Game.get_Player().get_Character(), 200f);
- int index1 = 0;
- while (index1 < nearbyPeds1.Length)
- {
- Ped ped1 = nearbyPeds1[index1];
- try
- {
- int num1;
- if (THelper.Exists((Entity) ped1))
- {
- Model model = ((Entity) ped1).get_Model();
- // ISSUE: explicit reference operation
- if (Model.op_Equality(Model.op_Implicit(((Model) @model).get_Hash()), this.\u0037EAA0) && !((Entity) ped1).get_IsVisible())
- {
- num1 = 1;
- goto label_7;
- }
- }
- num1 = 0;
- label_7:
- if (num1 != 0)
- {
- Ped[] nearbyPeds2 = World.GetNearbyPeds(ped1, 200f);
- int index2 = 0;
- while (index2 < nearbyPeds2.Length)
- {
- Ped ped2 = nearbyPeds2[index2];
- try
- {
- int num2;
- if (THelper.Exists((Entity) ped2))
- {
- Model model = ((Entity) ped2).get_Model();
- // ISSUE: explicit reference operation
- if (Model.op_Equality(Model.op_Implicit(((Model) @model).get_Hash()), this.\u0037EAA0) && !((Entity) ped2).get_IsVisible())
- {
- num2 = 1;
- goto label_14;
- }
- }
- num2 = 0;
- label_14:
- if (num2 != 0)
- {
- ((Entity) ped2).Detach();
- ((Entity) ped2).MarkAsNoLongerNeeded();
- ((Entity) ped2).Delete();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index2; }
- }
- ((Entity) ped1).Detach();
- ((Entity) ped1).MarkAsNoLongerNeeded();
- ((Entity) ped1).Delete();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index1; }
- }
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u00317AA0).\u002Ector("ng_proc_coffee_04b");
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u00317AA0).Request();
- JC2.\u0037GAA0 = new THelper.TAnimDict("weapons@projectile@", true);
- this.\u0038CAAA = new THelper.TAnimDict("missmic2@meat_hook", true);
- this.\u0038CAAA.request();
- this.\u0039CAA0 = new THelper.TAnimDict("MISSRAPPEL", true);
- this.\u0039CAA0.request();
- // ISSUE: explicit reference operation
- ((Model) @this.\u00327AAA).\u002Ector("s_prop_hdphones_1");
- // ISSUE: explicit reference operation
- ((Model) @this.\u00327AAA).Request();
- // ISSUE: explicit reference operation
- ((Model) @this.\u00337AA0).\u002Ector("p_parachute_s");
- // ISSUE: explicit reference operation
- ((Model) @this.\u00337AA0).Request();
- this.BGAAA = new THelper.TAnimDict("swimming@base", true);
- this.BGAAA.request();
- this.CGAA0 = new THelper.TAnimDict("swimming@scuba", true);
- this.CGAA0.request();
- this.\u0030HAAA = new THelper.TAnimDict("skydive@freefall", true);
- this.\u0030HAAA.request();
- // ISSUE: explicit reference operation
- ((Model) @this.\u0039HAA0).\u002Ector("prop_riot_shield");
- // ISSUE: explicit reference operation
- ((Model) @this.\u0039HAA0).Request();
- }
- private void \u0036AAAA()
- {
- DateTime now1 = DateAndTime.Now;
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u0034FAAA).\u002Ector("prop_pipes_conc_01");
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u0034FAAA).Request();
- // ISSUE: explicit reference operation
- while (!((Model) @JC2.\u0034FAAA).get_IsLoaded() & DateAndTime.Now.Subtract(now1).TotalMilliseconds < 1000.0)
- Script.Wait(100);
- try
- {
- // ISSUE: explicit reference operation
- JC2.\u0037FAA0 = ((Model) @JC2.\u0034FAAA).get_Hash();
- // ISSUE: explicit reference operation
- JC2.\u0038FAAA = ((Model) @JC2.\u0034FAAA).GetDimensions();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u0035FAA0).\u002Ector("prop_windmill_01");
- // ISSUE: explicit reference operation
- ((Model) @JC2.\u0035FAA0).Request();
- DateTime now2 = DateAndTime.Now;
- // ISSUE: explicit reference operation
- while (!((Model) @JC2.\u0035FAA0).get_IsLoaded() & DateAndTime.Now.Subtract(now2).TotalMilliseconds < 1000.0)
- Script.Wait(100);
- // ISSUE: explicit reference operation
- JC2.\u0036FAAA = ((Model) @JC2.\u0035FAA0).get_Hash();
- }
- private void \u0037AAA0()
- {
- if (DateAndTime.Now.Subtract(this.\u00357AA0).TotalMilliseconds <= 1000.0)
- return;
- this.\u00357AA0 = DateAndTime.Now;
- if (Operators.CompareString(this.\u00326AAA.settingsGetString("menu", "display", "", true), THelper.getScriptname(), false) == 0)
- {
- this.\u00326AAA.WriteINI("menu", "display", "");
- this.\u00356AA0.closeMenu();
- this.\u00356AA0.showMenu();
- }
- }
- 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)
- {
- int num1 = type;
- Vector3 vector3_1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector((float) position_x, (float) position_y, (float) position_z);
- Vector3 vector3_2 = vector3_1;
- Vector3 vector3_3;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_3).\u002Ector((float) angle_x, (float) angle_y, (float) angle_z);
- Vector3 vector3_4 = vector3_3;
- double num2 = length;
- double num3 = min_length;
- int num4 = breakable ? 1 : 0;
- return World.AddRope((RopeType) num1, vector3_2, vector3_4, (float) num2, (float) num3, num4 != 0);
- }
- public static Rope createRope(Entity ent1, Entity ent2, double distanceCoef = 1.0, double forcedDist = 0.0, Bone bActivatePhysics = -1)
- {
- if (THelper.isPed(ent1) && !THelper.Exists(ent2))
- {
- distanceCoef = 1.0;
- forcedDist = (double) World.GetDistance(ent1.get_Position(), ent2.get_Position());
- }
- return JC2.createRope(ent1.get_Position(), ent2.get_Position(), distanceCoef, forcedDist, (Bone) -1);
- }
- public static Rope createRope(Vector3 pos1, Vector3 pos2, double distanceCoef = 1.0, double forcedDist = 0.0, Bone bActivatePhysics = -1)
- {
- Vector3 vector3 = pos1;
- double num = (double) World.GetDistance(pos1, pos2) * distanceCoef;
- if (forcedDist > 0.0)
- num = forcedDist;
- else if (num <= 0.0)
- num = 1.0;
- InputArgument p16 = new InputArgument(0);
- Function.Call((Hash) -7237220984349894463L, new InputArgument[0]);
- Vector3 rotation = THelper.directionToRotation(Vector3.Normalize(Vector3.op_Subtraction(pos2, pos1)), 0.0);
- 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);
- Script.Wait(10);
- if (bActivatePhysics > 0)
- Function.Call((Hash) 8143371989984347952L, new InputArgument[1]
- {
- InputArgument.op_Implicit(rope.get_Handle())
- });
- return rope;
- }
- private void \u0038AAAA(Rope ᙂ, Entity \u0031AAAA, Vector3 ᙄ = null)
- {
- Vector3 boneCoord = Game.get_Player().get_Character().GetBoneCoord((Bone) 57005);
- Function.Call((Hash) 5424878668781820517L, new InputArgument[6]
- {
- InputArgument.op_Implicit(ᙂ.get_Handle()),
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit((float) boneCoord.X),
- InputArgument.op_Implicit((float) boneCoord.Y),
- InputArgument.op_Implicit((float) boneCoord.Z),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 6020487492214106537L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ᙂ.get_Handle())
- });
- }
- private Rope \u0039AAA0(Vector3 ᙂ, Entity \u0031AAAA, Entity ᙄ = null, short \u0033AAAA = 0, Vector3 \u0034AAAA = null)
- {
- DateTime now1 = DateAndTime.Now;
- if (THelper.Exists(ᙄ))
- ᙂ = ᙄ.get_Position();
- Entity prop = (Entity) World.CreateProp(JC2.CBAA0, Vector3.op_Addition(param1.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 100f)), true, false);
- Script.Wait(50);
- Rope r = (Rope) null;
- if (THelper.Exists(prop))
- {
- prop.set_IsVisible(false);
- Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
- {
- InputArgument.op_Implicit(prop),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false)
- });
- prop.set_FreezePosition(true);
- prop.set_Health(-1);
- if (!THelper.Exists(ᙄ))
- Function.Call((Hash) 469568048723526251L, new InputArgument[8]
- {
- InputArgument.op_Implicit(prop),
- InputArgument.op_Implicit((float) ᙂ.X),
- InputArgument.op_Implicit((float) ᙂ.Y),
- InputArgument.op_Implicit((double) ᙂ.Z - 1.2),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1)
- });
- else
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(prop),
- InputArgument.op_Implicit(ᙄ),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit((int) param3),
- InputArgument.op_Implicit((float) param4.X),
- InputArgument.op_Implicit((float) param4.Y),
- InputArgument.op_Implicit((float) param4.Z),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- if (THelper.isPed(param1))
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit(10000),
- InputArgument.op_Implicit(10000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- double distance1 = (double) World.GetDistance(param1.get_Position(), ᙂ);
- if (THelper.isPed(param1))
- {
- DateTime now2 = DateAndTime.Now;
- double distance2 = (double) World.GetDistance(param1.get_Position(), ᙂ);
- param1.ApplyForce(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ, param1.get_Position()), 2f));
- while ((double) World.GetDistance(param1.get_Position(), ᙂ) > distance2 * 0.3 && DateAndTime.Now.Subtract(now2).TotalMilliseconds < 2000.0)
- Script.Wait(10);
- distance1 = (double) World.GetDistance(param1.get_Position(), ᙂ);
- r = JC2.createRope(param1.get_Position(), ᙂ, 1.0, 0.0, (Bone) -1);
- Rope rope = r;
- Entity e1 = prop;
- Entity e2 = param1;
- double distCoef = 1.0;
- double forcedDist = distance1;
- Vector3 vector3;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3).\u002Ector(0.0f, 0.0f, (float) (double) (ᙂ.Z - prop.get_Position().Z) * 0.5f);
- Vector3 offset_E1 = vector3;
- Vector3 b9Aaa = this.B9AAA;
- JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
- }
- else
- {
- r = JC2.createRope(param1.get_Position(), ᙂ, 1.0, 0.0, (Bone) -1);
- this.B9AAA = Vector3.get_Zero();
- Vector3 velocity;
- Vector3 vector3_1;
- if (this.\u00348AAA)
- {
- Rope rope = r;
- Entity e1 = prop;
- Entity e2 = param1;
- double distCoef = 1.0;
- double forcedDist = 0.0;
- // ISSUE: explicit reference operation
- // ISSUE: variable of a reference type
- Vector3& local = @velocity;
- double num1 = 0.0;
- double num2 = 0.0;
- // ISSUE: variable of the null type
- __Null z1 = ᙂ.Z;
- vector3_1 = prop.get_Position();
- // ISSUE: variable of the null type
- __Null z2 = vector3_1.Z;
- double num3 = (double) ((float) (double) (z1 - z2) * 0.2f);
- ((Vector3) local).\u002Ector((float) num1, (float) num2, (float) num3);
- Vector3 offset_E1 = velocity;
- Vector3 b9Aaa = this.B9AAA;
- JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
- }
- else
- {
- Rope rope = r;
- Entity e1 = prop;
- Entity e2 = param1;
- double distCoef = 1.0;
- double forcedDist = 0.0;
- // ISSUE: explicit reference operation
- ((Vector3) @velocity).\u002Ector(0.0f, 0.0f, (float) (double) (ᙂ.Z - prop.get_Position().Z) * 0.5f);
- Vector3 offset_E1 = velocity;
- Vector3 b9Aaa = this.B9AAA;
- JC2.attachEntitiesToRope(rope, e1, e2, distCoef, forcedDist, offset_E1, b9Aaa);
- }
- Vector3 vector3_2 = Vector3.Normalize(Vector3.op_Subtraction(ᙂ, param1.get_Position()));
- vector3_1 = Vector3.op_Subtraction(vector3_2, Vector3.Normalize(param1.get_Velocity()));
- int num4;
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).Length() > 0.3)
- {
- velocity = param1.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() > 5.0)
- {
- Model model1 = param1.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBike())
- {
- Model model2 = param1.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBicycle())
- goto label_20;
- }
- num4 = 1;
- goto label_22;
- }
- }
- label_20:
- num4 = 0;
- label_22:
- if (num4 != 0)
- this.\u00360AAA((Vehicle) param1);
- Entity entity = param1;
- Vector3 vector3_3 = Vector3.op_Subtraction(vector3_2, Vector3.Normalize(param1.get_Velocity()));
- vector3_1 = param1.get_Velocity();
- // ISSUE: explicit reference operation
- double num5 = (double) ((Vector3) @vector3_1).Length();
- Vector3 vector3_4 = Vector3.op_Addition(Vector3.op_Multiply(Vector3.op_Multiply(vector3_3, (float) num5), 0.5f), Vector3.get_WorldUp());
- // ISSUE: explicit reference operation
- ((Vector3) @velocity).\u002Ector(1f, 1f, 1f);
- Vector3 vector3_5 = velocity;
- entity.ApplyForce(vector3_4, vector3_5);
- }
- this.\u00348AAA = false;
- this.\u0036BAAA.Add(prop);
- new JC2.TEntityInRope(param1, prop, r, distance1, this.B9AAA, ᙂ).pinCoord = ᙂ;
- }
- this.\u00348AAA = false;
- return r;
- }
- private bool BAAAA(Entity ᙂ, Entity \u0031AAAA)
- {
- List<JC2.TEntityInRope>.Enumerator enumerator;
- try
- {
- enumerator = JC2.\u0035BAA0.GetEnumerator();
- while (enumerator.MoveNext())
- {
- JC2.TEntityInRope current = enumerator.Current;
- 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, ᙂ)))
- return true;
- }
- }
- finally
- {
- enumerator.Dispose();
- }
- return false;
- }
- 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)
- {
- Vector3 vector3_1 = e1.get_Position();
- Vector3 vector3_2 = e2.get_Position();
- offset_E1 = Vector3.get_Zero();
- offset_E2 = Vector3.get_Zero();
- if (JC2.\u00320AAA(e1, e2) == null)
- {
- JC2.ᙅ ᙅ = new JC2.ᙅ(e1, e2);
- }
- if (THelper.isPed(e1))
- {
- vector3_1 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(false)
- });
- if (e1.get_Health() < 0)
- {
- Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
- {
- InputArgument.op_Implicit(e1)
- });
- e1.set_Health(100);
- }
- }
- if (THelper.isPed(e2))
- {
- vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(false)
- });
- if (e2.get_Health() < 0)
- {
- Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
- {
- InputArgument.op_Implicit(e2)
- });
- e2.set_Health(100);
- }
- }
- InputArgument inputArgument1 = new InputArgument(0);
- InputArgument inputArgument2 = new InputArgument(0);
- double num = (double) World.GetDistance(vector3_1, vector3_2) * distCoef;
- if (forcedDist > 0.0)
- num = forcedDist;
- else if (num <= 10.0)
- num = 10.0;
- Vector3 vector3_3;
- if (Vector3.op_Inequality(offset_E1, vector3_3))
- vector3_1 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
- {
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit((float) offset_E1.X),
- InputArgument.op_Implicit((float) offset_E1.Y),
- InputArgument.op_Implicit((float) offset_E1.Z)
- });
- if (Vector3.op_Inequality(offset_E2, vector3_3))
- vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit((float) offset_E2.X),
- InputArgument.op_Implicit((float) offset_E2.Y),
- InputArgument.op_Implicit((float) offset_E2.Z)
- });
- if (!THelper.isPed(e1))
- ;
- if (!THelper.isPed(e2))
- ;
- Function.Call((Hash) 4437713091426519747L, new InputArgument[14]
- {
- InputArgument.op_Implicit(rope.get_Handle()),
- InputArgument.op_Implicit(e1),
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit((float) vector3_1.X),
- InputArgument.op_Implicit((float) vector3_1.Y),
- InputArgument.op_Implicit((float) vector3_1.Z),
- InputArgument.op_Implicit((float) vector3_2.X),
- InputArgument.op_Implicit((float) vector3_2.Y),
- InputArgument.op_Implicit((float) vector3_2.Z),
- InputArgument.op_Implicit(num),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- inputArgument1,
- inputArgument2
- });
- JC2.gasObject(e1, e2);
- JC2.gasObject(e2, e1);
- THelper.missionEntity(e1, true, true);
- THelper.missionEntity(e2, true, true);
- return rope;
- }
- public static void gasObject(Entity ent, Entity er)
- {
- if (!THelper.isObject(ent))
- return;
- JC2.checkGasModelHash(ent, er, -1779825653);
- JC2.checkGasModelHash(ent, er, -1738103333);
- JC2.checkGasModelHash(ent, er, -1348598835);
- JC2.checkGasModelHash(ent, er, 1270590574);
- JC2.checkGasModelHash(ent, er, -921781850);
- JC2.checkGasModelHash(ent, er, -925511118);
- JC2.checkGasModelHash(ent, er, 2013608974);
- JC2.checkGasModelHash(ent, er, 1246158990);
- JC2.checkGasModelHash(ent, er, 782665360);
- JC2.checkGasModelHash(ent, er, 282166596);
- JC2.checkGasModelHash(ent, er, -260208501);
- JC2.checkGasModelHash(ent, er, 1652026494);
- JC2.checkGasModelHash(ent, er, 631304913);
- JC2.checkGasModelHash(ent, er, 344662182);
- JC2.checkGasModelHash(ent, er, -1920001264);
- JC2.checkGasModelHash(ent, er, 936543891);
- JC2.checkGasModelHash(ent, er, 1242409737);
- }
- public static void checkGasModelHash(Entity ent, Entity er, int hash)
- {
- Model model = ent.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() != hash)
- return;
- JC2.TGasObjects tgasObjects = new JC2.TGasObjects(ent, er);
- }
- private void CAAA0()
- {
- if (!this.\u00359AA0 && !this.\u0033CAA0)
- return;
- try
- {
- if (THelper.Exists((Entity) this.\u00378AA0))
- {
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- Ped pedOnSeat1 = this.\u00378AA0.GetPedOnSeat((VehicleSeat) -1);
- Model model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsPlane())
- {
- if (THelper.Exists((Entity) pedOnSeat1))
- {
- pedOnSeat1.get_Task().ClearAll();
- pedOnSeat1.get_Task().ClearSecondary();
- pedOnSeat1.set_AlwaysKeepTask(false);
- pedOnSeat1.set_AlwaysKeepTask(true);
- Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
- {
- InputArgument.op_Implicit(pedOnSeat1),
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(4096)
- });
- pedOnSeat1.set_CanRagdoll(true);
- if (((Entity) pedOnSeat1).get_Health() < 0)
- pedOnSeat1.get_Task().ClearAllImmediately();
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(pedOnSeat1),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- Game.get_Player().get_Character().get_Task().WarpIntoVehicle(this.\u00378AA0, (VehicleSeat) -1);
- this.\u00378AA0 = (Vehicle) null;
- return;
- }
- Vector3.get_Zero();
- Vector3 vector3_1;
- if (THelper.Exists((Entity) pedOnSeat1))
- {
- vector3_1 = ((Entity) pedOnSeat1).GetOffsetInWorldCoords(Vector3.get_Zero());
- }
- else
- {
- vector3_1 = THelper.getEntityBoneCoord((Entity) this.\u00378AA0, THelper.getEntityBoneIndexByName((Entity) this.\u00378AA0, "seat_dside_f"));
- if (Vector3.op_Equality(vector3_1, Vector3.get_Zero()))
- vector3_1 = THelper.getEntityBoneCoord((Entity) this.\u00378AA0, THelper.getEntityBoneIndexByName((Entity) this.\u00378AA0, "seat_f"));
- }
- Vector3 vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
- {
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit((float) vector3_1.X),
- InputArgument.op_Implicit((float) vector3_1.Y),
- InputArgument.op_Implicit((float) vector3_1.Z)
- });
- model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsHelicopter())
- {
- if (THelper.anim_requestDict(this.C8AA0))
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
- Vector3 vector3_3 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
- {
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit((float) position.X),
- InputArgument.op_Implicit((float) position.Y),
- InputArgument.op_Implicit((float) position.Z)
- });
- double num1 = (double) (vector3_3.Z - vector3_2.Z);
- double num2 = num1 * 0.02;
- vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X - 0.7f);
- vector3_2.Y = (__Null) (double) ((float) (double) vector3_2.Y - 0.05f);
- vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z + 0.3f);
- vector3_3.X = vector3_2.X;
- vector3_3.Y = vector3_2.Y;
- ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 8.0, THelper.animFlags.normal, false);
- Script.Wait(50);
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 0.1))
- {
- Script.Wait(10);
- Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- });
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 4.0);
- }
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 0.4))
- {
- Script.Wait(10);
- Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- });
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.C8AA0, this.\u00309AAA, 4.0);
- if (num1 < -1.5)
- {
- num1 -= num2 * 1.2;
- vector3_3.Z = (__Null) num1;
- vector3_3.X = (__Null) (double) ((float) (double) vector3_3.X - 0.005f);
- Ped character = Game.get_Player().get_Character();
- Vehicle vehicle = this.\u00378AA0;
- int num3 = 0;
- Vector3 vector3_4 = vector3_3;
- Vector3 vector3_5;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_5).\u002Ector(0.0f, 0.0f, 0.0f);
- Vector3 vector3_6 = vector3_5;
- ((Entity) character).AttachTo((Entity) vehicle, num3, vector3_4, vector3_6);
- }
- }
- Game.get_Player().get_Character().get_Task().ClearAnimation(this.C8AA0, this.\u00309AAA);
- }
- }
- else if (THelper.anim_requestDict(this.\u00398AA0))
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
- Vector3 vector3_3 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
- {
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit((float) position.X),
- InputArgument.op_Implicit((float) position.Y),
- InputArgument.op_Implicit((float) position.Z)
- });
- double num1 = (double) (vector3_3.Z - vector3_2.Z);
- double num2 = num1 * 0.02;
- vector3_3.X = vector3_2.X;
- vector3_3.Y = vector3_2.Y;
- vector3_3.Z = (__Null) (double) ((float) (double) vector3_3.Z - 0.5f);
- vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X - 0.7f);
- vector3_2.Y = (__Null) (double) ((float) (double) vector3_2.Y - 0.05f);
- vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z + 0.3f);
- ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 8.0, THelper.animFlags.normal, false);
- Script.Wait(50);
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 0.22))
- {
- Script.Wait(10);
- Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- });
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00398AA0, this.B8AAA, 2.0);
- if (num1 > 0.05)
- {
- ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_3, Vector3.get_Zero());
- num1 -= num2;
- vector3_3.Z = (__Null) num1;
- vector3_3.X = (__Null) (double) ((float) (double) vector3_3.X - 0.01f);
- }
- }
- Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00398AA0, this.B8AAA);
- }
- Function.Call((Hash) 8963811182594345058L, new InputArgument[4]
- {
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_2, Vector3.get_Zero());
- string str = this.\u00329AAA;
- model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).GetDimensions().Z > 2.0)
- {
- str = this.\u00349AAA;
- vector3_2.Z = (__Null) (double) ((float) (double) vector3_2.Z - 0.2f);
- }
- if (THelper.anim_requestDict(this.\u00319AA0))
- {
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 8.0, THelper.animFlags.normal, true);
- Script.Wait(50);
- this.\u00378AA0.SmashWindow((VehicleWindow) 0);
- if (!THelper.Exists((Entity) pedOnSeat1))
- THelper.anim_setAnimTime((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.45);
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.2))
- {
- Script.Wait(10);
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 2.0);
- }
- model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model).get_IsHelicopter())
- {
- if (THelper.Exists((Entity) pedOnSeat1))
- {
- pedOnSeat1.get_Task().ClearAll();
- pedOnSeat1.get_Task().ClearSecondary();
- pedOnSeat1.set_AlwaysKeepTask(false);
- pedOnSeat1.set_AlwaysKeepTask(true);
- Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
- {
- InputArgument.op_Implicit(pedOnSeat1),
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(4096)
- });
- pedOnSeat1.set_CanRagdoll(true);
- if (((Entity) pedOnSeat1).get_Health() < 0)
- pedOnSeat1.get_Task().ClearAllImmediately();
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(pedOnSeat1),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- }
- else
- {
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.35))
- {
- Script.Wait(10);
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 2.0);
- }
- if (THelper.Exists((Entity) pedOnSeat1))
- {
- pedOnSeat1.get_Task().ClearAllImmediately();
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(pedOnSeat1),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- }
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 0.65))
- {
- Script.Wait(10);
- vector3_2.X = (__Null) (double) ((float) (double) vector3_2.X + 0.01f);
- ((Entity) Game.get_Player().get_Character()).AttachTo((Entity) this.\u00378AA0, 0, vector3_2, Vector3.get_Zero());
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00319AA0, this.\u00329AAA, 1.5);
- }
- }
- Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(-1)
- });
- Script.Wait(200);
- DateTime now = DateAndTime.Now;
- while (!Entity.op_Equality((Entity) Game.get_Player().get_Character().get_CurrentVehicle(), (Entity) this.\u00378AA0) & DateAndTime.Now.Subtract(now).TotalMilliseconds < 1000.0)
- {
- Game.get_Player().get_Character().get_Task().WarpIntoVehicle(this.\u00378AA0, (VehicleSeat) -1);
- Script.Wait(100);
- }
- Script.Wait(100);
- if (THelper.Exists((Entity) pedOnSeat1) && Entity.op_Equality((Entity) pedOnSeat1.get_CurrentVehicle(), (Entity) this.\u00378AA0))
- pedOnSeat1.get_Task().ClearAllImmediately();
- model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsHelicopter())
- {
- short num = 0;
- do
- {
- Ped pedOnSeat2 = this.\u00378AA0.GetPedOnSeat((VehicleSeat) (int) num);
- if (THelper.Exists((Entity) pedOnSeat2) && ((Entity) pedOnSeat2).get_Health() >= 0)
- {
- pedOnSeat2.get_Task().ClearAll();
- pedOnSeat2.get_Task().ClearSecondary();
- pedOnSeat2.set_AlwaysKeepTask(false);
- pedOnSeat2.set_AlwaysKeepTask(true);
- Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
- {
- InputArgument.op_Implicit(pedOnSeat2),
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(4096)
- });
- pedOnSeat2.set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(pedOnSeat2),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- ++num;
- }
- while ((int) num <= 10);
- }
- Game.get_Player().get_Character().set_CanRagdoll(true);
- this.\u00378AA0 = (Vehicle) null;
- }
- }
- catch (Exception ex1)
- {
- ProjectData.SetProjectError(ex1);
- try
- {
- Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(this.\u00378AA0),
- InputArgument.op_Implicit(-1)
- });
- }
- catch (Exception ex2)
- {
- ProjectData.SetProjectError(ex2);
- ProjectData.ClearProjectError();
- }
- ProjectData.ClearProjectError();
- }
- this.\u00371AA0();
- }
- private void \u00300AAA()
- {
- List<JC2.ᙄ>.Enumerator enumerator;
- try
- {
- enumerator = JC2.\u0038GAAA.GetEnumerator();
- while (enumerator.MoveNext())
- enumerator.Current.trigger();
- }
- finally
- {
- enumerator.Dispose();
- }
- }
- private void \u00310AA0(object ᙂ, KeyEventArgs \u0031AAAA)
- {
- if (param1.KeyCode == Keys.None)
- return;
- if (param1.KeyCode == this.\u00396AA0 && (this.B6AAA == Keys.None || THelper._iskeyPressed(this.B6AAA)))
- this.\u00356AA0.closeMenu();
- if (param1.KeyCode == this.\u00369AAA)
- this.\u00300AAA();
- if (this.\u00356AA0.keyDown(param1.KeyCode) == TMenu.menuResult.selectItem)
- {
- if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bEnabled", false) == 0)
- this.\u00381AAA();
- else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bHookMode", false) == 0)
- this.\u00391AA0();
- else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bUseRagdoll", false) == 0)
- {
- this.\u0035DAA0 = !this.\u0035DAA0;
- this.\u00316AA0.WriteINIBool("v2_bUseRagdoll", "general", this.\u0035DAA0);
- this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0035DAA0);
- }
- else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bDisableWindMill", false) == 0)
- {
- this.\u0036DAAA = !this.\u0036DAAA;
- this.\u00316AA0.WriteINIBool("bDisableWindMill", "general", this.\u0036DAAA);
- this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0036DAAA);
- }
- else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bWingSuitEnabled", false) == 0)
- {
- this.\u0038A0AA = !this.\u0038A0AA;
- this.\u00316AA0.WriteINIBool("bWingSuitEnabled", "general", this.\u0038A0AA);
- this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0038A0AA);
- }
- else if (Operators.CompareString(this.\u00356AA0.selectedItem().name, "bCrosshairEnabled", false) == 0)
- {
- this.\u0038EAAA = !this.\u0038EAAA;
- this.\u00316AA0.WriteINIBool("bCrosshairEnabled", "general", this.\u0038EAAA);
- this.\u00356AA0.selectedItem().value = Conversions.ToString(this.\u0038EAAA);
- }
- }
- if (this.C6AA0)
- {
- if (param1.KeyCode == this.\u00386AAA && THelper._iskeyPressed(Keys.ControlKey))
- this.\u00391AA0();
- if (param1.KeyCode == this.\u00376AA0 && JC2.\u0035BAA0.Count > 0)
- {
- JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)];
- try
- {
- JC2.ᙅ ᙅ = JC2.\u00320AAA(tentityInRope.p1, tentityInRope.p2);
- if (ᙅ != null)
- ᙅ.remove();
- try
- {
- 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()))
- tentityInRope.p1.MarkAsNoLongerNeeded();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- 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()))
- tentityInRope.p2.MarkAsNoLongerNeeded();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)].rope.Delete();
- JC2.finishEntityInRope(JC2.\u0035BAA0[checked (JC2.\u0035BAA0.Count - 1)]);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- }
- private static JC2.ᙅ \u00320AAA(Entity ᙂ, Entity \u0031AAAA)
- {
- List<JC2.ᙅ>.Enumerator enumerator;
- try
- {
- enumerator = JC2.CA0A0.GetEnumerator();
- while (enumerator.MoveNext())
- {
- JC2.ᙅ current = enumerator.Current;
- try
- {
- 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())
- return current;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- enumerator.Dispose();
- }
- return (JC2.ᙅ) null;
- }
- private void \u00330AA0(object ᙂ, KeyEventArgs \u0031AAAA)
- {
- }
- private void \u00340AAA()
- {
- int index = checked (JC2.\u0035BAA0.Count - 1);
- while (index >= 0)
- {
- JC2.TEntityInRope ᙂ = JC2.\u0035BAA0[index];
- try
- {
- ᙂ.pedTick();
- if ((!THelper.Exists(ᙂ.p1) || !THelper.Exists(ᙂ.p2)) && !false)
- throw new Exception("not exists " + Conversions.ToString(THelper.Exists(ᙂ.p1)) + " " + Conversions.ToString(THelper.Exists(ᙂ.p2)));
- int num1;
- if (!ᙂ.p1.IsAttached() && (!ᙂ.isVehicle_p1 || ᙂ.isVehicle_p2 && Entity.op_Equality(ᙂ.p2, (Entity) Game.get_Player().get_Character().get_CurrentVehicle())))
- {
- Vector3 velocity1 = ᙂ.p2.get_Velocity();
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @velocity1).Length();
- Vector3 velocity2 = ᙂ.p1.get_Velocity();
- // ISSUE: explicit reference operation
- double num3 = (double) System.Math.Max(((Vector3) @velocity2).Length(), 1f);
- if (num2 > num3)
- {
- Vector3 position = ᙂ.p2.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(ᙂ.p1.get_Position()) > ᙂ.dist * 0.98)
- {
- if (ᙂ.isObject_p2)
- {
- Vector3 velocity3 = ᙂ.p2.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity3).Length() <= 0.02)
- goto label_8;
- }
- num1 = 1;
- goto label_10;
- }
- }
- }
- label_8:
- num1 = 0;
- label_10:
- if (num1 != 0)
- {
- ᙂ.p1.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ.p2.get_Position(), ᙂ.p1.get_Position()), 0.2f), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p1))));
- }
- else
- {
- int num2;
- if (!ᙂ.p2.IsAttached() && (!ᙂ.isVehicle_p2 || ᙂ.isVehicle_p1 && Entity.op_Equality(ᙂ.p1, (Entity) Game.get_Player().get_Character().get_CurrentVehicle())))
- {
- Vector3 velocity1 = ᙂ.p1.get_Velocity();
- // ISSUE: explicit reference operation
- double num3 = (double) ((Vector3) @velocity1).Length();
- Vector3 velocity2 = ᙂ.p2.get_Velocity();
- // ISSUE: explicit reference operation
- double num4 = (double) System.Math.Max(((Vector3) @velocity2).Length(), 1f);
- if (num3 > num4)
- {
- Vector3 position = ᙂ.p2.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(ᙂ.p1.get_Position()) > ᙂ.dist * 0.98)
- {
- if (ᙂ.isObject_p1)
- {
- Vector3 velocity3 = ᙂ.p1.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity3).Length() <= 0.02)
- goto label_17;
- }
- num2 = 1;
- goto label_19;
- }
- }
- }
- label_17:
- num2 = 0;
- label_19:
- if (num2 != 0)
- ᙂ.p2.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.op_Subtraction(ᙂ.p1.get_Position(), ᙂ.p2.get_Position()), 0.2f), Conversions.ToSingle(THelper.getMassCoef(ᙂ.p2))));
- }
- try
- {
- if (THelper.Exists(ᙂ.p1))
- {
- 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())
- {
- ᙂ.p1.MarkAsNoLongerNeeded();
- ᙂ.p1 = (Entity) null;
- try
- {
- if (THelper.Exists(ᙂ.p2))
- ᙂ.p2.MarkAsNoLongerNeeded();
- ᙂ.p2 = (Entity) null;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- throw new Exception("away " + Conversions.ToString(World.GetDistance(ᙂ.p1.get_Position(), GameplayCamera.get_Position())));
- }
- if (this.\u0030EAAA % 100 == 0 && THelper.Exists(ᙂ.p2))
- {
- double distance = (double) World.GetDistance(ᙂ.p1.get_Position(), ᙂ.p2.get_Position());
- Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ᙂ.rope.get_Handle()),
- InputArgument.op_Implicit(distance * 0.8)
- });
- }
- int num2;
- if (THelper.Exists(ᙂ.p2) && ᙂ.isObject_p2 && ᙂ.p2.IsAttached())
- {
- Model model = ᙂ.p2.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() == JC2.\u0037FAA0)
- {
- Vector3 position = ᙂ.p1.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(ᙂ.p2.get_Position()) >= ᙂ.dist * 0.9)
- {
- num2 = 1;
- goto label_38;
- }
- }
- }
- num2 = 0;
- label_38:
- if (num2 != 0)
- {
- ᙂ.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()));
- Model model1 = ᙂ.p1.get_Model();
- int num3;
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBicycle())
- {
- Model model2 = ᙂ.p1.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBike())
- {
- num3 = 0;
- goto label_43;
- }
- }
- num3 = 1;
- label_43:
- if (num3 != 0)
- {
- this.\u00360AAA((Vehicle) ᙂ.p1);
- }
- else
- {
- Model model2 = ᙂ.p1.get_Model();
- int num4;
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsHelicopter())
- {
- model1 = ᙂ.p1.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsPlane())
- {
- num4 = 0;
- goto label_49;
- }
- }
- num4 = 1;
- label_49:
- if (num4 != 0)
- Function.Call((Hash) 5041455353683427057L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ᙂ.p1),
- InputArgument.op_Implicit(-1.0)
- });
- }
- }
- int num5;
- if (THelper.Exists(ᙂ.p1) && THelper.Exists(ᙂ.p2) && (ᙂ.isObject_p1 && ᙂ.p1.IsAttached()))
- {
- Model model = ᙂ.p1.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() == JC2.\u0037FAA0)
- {
- Vector3 position = ᙂ.p1.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(ᙂ.p2.get_Position()) >= ᙂ.dist * 0.9)
- {
- num5 = 1;
- goto label_57;
- }
- }
- }
- num5 = 0;
- label_57:
- if (num5 != 0)
- {
- ᙂ.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()));
- Model model1 = ᙂ.p2.get_Model();
- int num3;
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBicycle())
- {
- Model model2 = ᙂ.p2.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBike())
- {
- num3 = 0;
- goto label_62;
- }
- }
- num3 = 1;
- label_62:
- if (num3 != 0)
- {
- this.\u00360AAA((Vehicle) ᙂ.p2);
- }
- else
- {
- model1 = ᙂ.p2.get_Model();
- int num4;
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsHelicopter())
- {
- Model model2 = ᙂ.p2.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsPlane())
- {
- num4 = 0;
- goto label_68;
- }
- }
- num4 = 1;
- label_68:
- if (num4 != 0)
- Function.Call((Hash) 5041455353683427057L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ᙂ.p2),
- InputArgument.op_Implicit(-1.0)
- });
- }
- }
- this.\u00350AA0(ᙂ, ᙂ.p1, ᙂ.p2, ᙂ.isObject_p1, ᙂ.isObject_p2, ᙂ.isVehicle_p1, ᙂ.isVehicle_p2);
- this.\u00350AA0(ᙂ, ᙂ.p2, ᙂ.p1, ᙂ.isObject_p2, ᙂ.isObject_p1, ᙂ.isVehicle_p2, ᙂ.isVehicle_p1);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- throw new Exception("error: " + ex.Message);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ᙂ.remove();
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- }
- public static void finishEntityInRope(JC2.TEntityInRope er)
- {
- JC2.\u0035BAA0.Remove(er);
- }
- private void \u00350AA0(JC2.TEntityInRope ᙂ, Entity \u0031AAAA, Entity ᙄ, bool \u0033AAAA, bool \u0034AAAA, bool \u0035AAAA, bool \u0036AAAA)
- {
- try
- {
- Vector3 vector3_1;
- int num1;
- if (DateAndTime.Now.Subtract(ᙂ.timerSinceAttach).TotalMilliseconds > 1000.0 && param4)
- {
- vector3_1 = ᙄ.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).Length() <= 0.01 && param5)
- {
- num1 = 1;
- goto label_5;
- }
- }
- num1 = 0;
- label_5:
- if (num1 == 0)
- return;
- Vehicle vehicle = (Vehicle) param1;
- vector3_1 = param1.get_Velocity();
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @vector3_1).Length();
- Model model1 = ((Entity) vehicle).get_Model();
- Model model2;
- int num3;
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsHelicopter())
- {
- model2 = ((Entity) vehicle).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsPlane())
- {
- num3 = 0;
- goto label_10;
- }
- }
- num3 = 1;
- label_10:
- bool flag = num3 != 0;
- Vector3 vector3_2;
- if (Entity.op_Inequality(param1, ᙂ.p1))
- vector3_2 = (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ᙂ.rope.get_Handle()),
- InputArgument.op_Implicit(0)
- });
- else
- vector3_2 = (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ᙂ.rope.get_Handle())
- });
- if ((double) World.GetDistance(ᙄ.get_Position(), vector3_2) >= ᙂ.dist * 0.95 && num2 > 5.0 && (vehicle.get_IsOnAllWheels() || flag))
- {
- Vector3 vector3_3 = Vector3.Normalize(Vector3.op_Subtraction(vector3_2, param1.get_Position()));
- Vector3 worldUp = Vector3.get_WorldUp();
- if (flag && num2 > 30.0 && (double) vehicle.get_EngineHealth() > 10.0)
- {
- vehicle.set_EngineHealth(0.0f);
- throw new Exception("done");
- }
- vector3_3.Z = (__Null) 0.0;
- if (param5)
- {
- vector3_1 = Vector3.op_Subtraction(vector3_3, Vector3.Normalize(param1.get_Velocity()));
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).Length() > 0.3 && num2 > 10.0)
- {
- model2 = param1.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model2).get_IsBike())
- goto label_22;
- }
- Model model3 = param1.get_Model();
- int num4;
- // ISSUE: explicit reference operation
- if (!((Model) @model3).get_IsBicycle())
- {
- num4 = 0;
- goto label_23;
- }
- label_22:
- num4 = 1;
- label_23:
- if (num4 != 0)
- this.\u00360AAA((Vehicle) param1);
- if (num2 > 25.0)
- {
- short num5 = 0;
- do
- {
- Function.Call((Hash) -6509560484236316856L, new InputArgument[2]
- {
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit((int) num5)
- });
- ++num5;
- }
- while ((int) num5 <= 6);
- short num6 = 0;
- do
- {
- Function.Call((Hash) -7035926307279134119L, new InputArgument[2]
- {
- InputArgument.op_Implicit(param1),
- InputArgument.op_Implicit((int) num6)
- });
- ++num6;
- }
- while ((int) num6 <= 7);
- Function.Call((Hash) 7882527888856013523L, new InputArgument[1]
- {
- InputArgument.op_Implicit(param1)
- });
- }
- }
- Entity entity = param1;
- 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);
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(1f, 1f, 1f);
- Vector3 vector3_5 = vector3_1;
- entity.ApplyForce(vector3_4, vector3_5);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- private void \u00360AAA(Vehicle ᙂ)
- {
- short num = -1;
- do
- {
- Ped pedOnSeat = ᙂ.GetPedOnSeat((VehicleSeat) (int) num);
- if (THelper.Exists((Entity) pedOnSeat))
- {
- pedOnSeat.get_Task().ClearAll();
- Function.Call((Hash) -3180721793039024638L, new InputArgument[3]
- {
- InputArgument.op_Implicit(pedOnSeat),
- InputArgument.op_Implicit(ᙂ),
- InputArgument.op_Implicit(4096)
- });
- pedOnSeat.set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(pedOnSeat),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((Entity) pedOnSeat).ApplyForce(Vector3.op_Addition(Vector3.op_Multiply(((Entity) ᙂ).get_Velocity(), 0.8f), Vector3.op_Multiply(Vector3.get_WorldUp(), 2f)), Vector3.get_WorldNorth());
- }
- ++num;
- }
- while ((int) num <= 7);
- }
- private void \u00370AA0()
- {
- if (DateAndTime.Now.Subtract(this.\u0037BAA0).TotalMilliseconds <= 1000.0)
- return;
- this.\u0037BAA0 = DateAndTime.Now;
- int index = checked (this.\u0036BAAA.Count - 1);
- while (index >= 0)
- {
- try
- {
- if (THelper.Exists(this.\u0036BAAA[index]))
- {
- if ((double) World.GetDistance(this.\u0036BAAA[index].get_Position(), GameplayCamera.get_Position()) > 1000.0)
- this.\u0036BAAA[index].MarkAsNoLongerNeeded();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- }
- private void \u00380AAA()
- {
- if (this.\u0036BAAA.Count > 0)
- {
- int index = checked (this.\u0036BAAA.Count - 1);
- while (index >= 0)
- {
- try
- {
- this.\u0036BAAA[index].MarkAsNoLongerNeeded();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- this.\u0036BAAA.Clear();
- }
- if (JC2.\u0035BAA0.Count > 0)
- {
- int index = checked (JC2.\u0035BAA0.Count - 1);
- while (index >= 0)
- {
- try
- {
- if (THelper.Exists(JC2.\u0035BAA0[index].p1))
- JC2.\u0035BAA0[index].p1.MarkAsNoLongerNeeded();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- if (THelper.Exists(JC2.\u0035BAA0[index].p2))
- JC2.\u0035BAA0[index].p2.MarkAsNoLongerNeeded();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- JC2.\u0035BAA0.Clear();
- }
- if (JC2.CA0A0.Count <= 0)
- return;
- int index1 = checked (JC2.CA0A0.Count - 1);
- while (index1 >= 0)
- {
- JC2.CA0A0[index1].remove();
- checked { index1 += -1; }
- }
- }
- private Entity \u00390AA0(Vector3 ᙂ, ref Vector3 \u0031AAAA)
- {
- bool flag1 = false;
- Entity e1 = (Entity) null;
- param1 = Vector3.get_Zero();
- this.\u0039BAA0.Clear();
- try
- {
- foreach (Entity e2 in this.\u0033EAA0)
- {
- try
- {
- if (THelper.Exists(e2))
- {
- Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(true)
- });
- if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
- {
- InputArgument.op_Implicit(e2),
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- }))
- {
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(e2)
- });
- int num;
- if (!flag1)
- {
- if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
- {
- InputArgument.op_Implicit(e2)
- }) != null)
- {
- num = 1;
- goto label_9;
- }
- }
- num = 0;
- label_9:
- if (num != 0)
- {
- Model model = e2.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsVehicle() && Entity.op_Inequality(e2, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- {
- e1 = e2;
- break;
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Entity>.Enumerator enumerator;
- enumerator.Dispose();
- }
- if (!THelper.Exists(e1))
- {
- Vehicle[] nearbyVehicles = World.GetNearbyVehicles(Game.get_Player().get_Character(), 100f);
- int index = 0;
- while (index < nearbyVehicles.Length)
- {
- Vehicle vehicle = nearbyVehicles[index];
- try
- {
- if (THelper.Exists((Entity) vehicle))
- {
- Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
- {
- InputArgument.op_Implicit(vehicle),
- InputArgument.op_Implicit(true)
- });
- if (!this.\u0039BAA0.Contains((Entity) vehicle))
- this.\u0039BAA0.Add((Entity) vehicle);
- if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
- {
- InputArgument.op_Implicit(vehicle),
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- }))
- {
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(vehicle)
- });
- int num1;
- if (!flag1)
- {
- if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
- {
- InputArgument.op_Implicit(vehicle)
- }) != null)
- {
- double distance = (double) World.GetDistance(((Entity) vehicle).get_Position(), ᙂ);
- Model model = ((Entity) vehicle).get_Model();
- // ISSUE: explicit reference operation
- Vector3 dimensions = ((Model) @model).GetDimensions();
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @dimensions).Length() * 0.5;
- if (distance < num2)
- {
- num1 = 1;
- goto label_30;
- }
- }
- }
- num1 = 0;
- label_30:
- if (num1 != 0 && Entity.op_Inequality((Entity) vehicle, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- {
- e1 = (Entity) vehicle;
- param1 = (Vector3) Function.Call<Vector3>((Hash) 2482816124249826099L, new InputArgument[4]
- {
- InputArgument.op_Implicit(vehicle),
- InputArgument.op_Implicit((float) ᙂ.X),
- InputArgument.op_Implicit((float) ᙂ.Y),
- InputArgument.op_Implicit((float) ᙂ.Z)
- });
- flag1 = true;
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index; }
- }
- }
- if (!THelper.Exists(e1))
- {
- bool flag2 = false;
- Ped[] nearbyPeds = World.GetNearbyPeds(Game.get_Player().get_Character(), 100f);
- int index = 0;
- while (index < nearbyPeds.Length)
- {
- Ped ped = nearbyPeds[index];
- try
- {
- if (THelper.Exists((Entity) ped) && ((Entity) ped).get_Health() >= 0)
- {
- Function.Call((Hash) 1684627360525536614L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ped),
- InputArgument.op_Implicit(true)
- });
- if (!this.\u0039BAA0.Contains((Entity) ped))
- this.\u0039BAA0.Add((Entity) ped);
- if ((bool) Function.Call<bool>((Hash) -4004430328424792840L, new InputArgument[2]
- {
- InputArgument.op_Implicit(ped),
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- }))
- {
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ped)
- });
- int num;
- if (!flag2)
- {
- if (Function.Call<bool>((Hash) 5176593366545292405L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ped)
- }) != null && (double) World.GetDistance(((Entity) ped).get_Position(), ᙂ) < 2.0)
- {
- num = 1;
- goto label_48;
- }
- }
- num = 0;
- label_48:
- if (num != 0 && !THelper.Exists((Entity) ped.get_CurrentVehicle()))
- {
- e1 = (Entity) ped;
- // ISSUE: explicit reference operation
- ((Vector3) @param1).\u002Ector(0.0f, 0.0f, -0.25f);
- flag2 = true;
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index; }
- }
- }
- if (!THelper.Exists(e1))
- e1 = Game.get_Player().GetTargetedEntity();
- if (Entity.op_Equality(e1, (Entity) Game.get_Player().get_Character()) || Entity.op_Equality(e1, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- e1 = (Entity) null;
- return e1;
- }
- private Rope B0AAA(Entity ᙂ, Prop \u0031AAAA, Vector3 ᙄ = null, Vector3 \u0033AAAA = null)
- {
- Rope ᙂ1 = (Rope) null;
- Vector3 ᙄ1;
- if (THelper.Exists(ᙂ))
- {
- ᙂ.get_Position();
- ᙂ1 = JC2.createRope((Entity) Game.get_Player().get_Character(), ᙂ, 0.4, 0.0, (Bone) -1);
- if (THelper.Exists((Entity) param1))
- {
- this.\u0038AAAA(ᙂ1, (Entity) param1, param3);
- }
- else
- {
- Vector3 vector3 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(28422),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- vector3.Z = (__Null) (double) ((float) (double) vector3.Z + 0.01f);
- this.\u0038AAAA(ᙂ1, (Entity) Game.get_Player().get_Character(), ᙄ1);
- }
- }
- else if (Vector3.op_Inequality(ᙄ, ᙄ1))
- {
- Vector3 pos2 = ᙄ;
- ᙂ1 = JC2.createRope(((Entity) Game.get_Player().get_Character()).get_Position(), pos2, 0.4, 0.0, (Bone) -1);
- int num = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ᙂ1.get_Handle())
- }) - 1);
- if (THelper.Exists((Entity) param1))
- {
- this.\u0038AAAA(ᙂ1, (Entity) param1, param3);
- }
- else
- {
- Vector3 vector3 = (Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(28422),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- vector3.Z = (__Null) (double) ((float) (double) vector3.Z + 0.01f);
- this.\u0038AAAA(ᙂ1, (Entity) Game.get_Player().get_Character(), ᙄ1);
- }
- Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
- {
- InputArgument.op_Implicit(ᙂ1.get_Handle()),
- InputArgument.op_Implicit(num),
- InputArgument.op_Implicit((float) pos2.X),
- InputArgument.op_Implicit((float) pos2.Y),
- InputArgument.op_Implicit((float) pos2.Z)
- });
- }
- return ᙂ1;
- }
- private bool C0AA0()
- {
- if (!THelper.Exists((Entity) this.BBAAA))
- {
- // ISSUE: explicit reference operation
- ((Model) @JC2.CBAA0).\u002Ector((int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u0030CAAA)
- }));
- // ISSUE: explicit reference operation
- ((Model) @JC2.CBAA0).Request();
- DateTime now = DateAndTime.Now;
- // ISSUE: explicit reference operation
- while (!((Model) @JC2.CBAA0).get_IsLoaded() & DateAndTime.Now.Subtract(now).TotalMilliseconds < 500.0)
- Script.Wait(50);
- 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);
- }
- return THelper.Exists((Entity) this.BBAAA);
- }
- private void \u00301AAA()
- {
- if (!THelper.Exists((Entity) this.BBAAA))
- return;
- ((Entity) this.BBAAA).set_IsVisible(false);
- Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 7753999234533660383L, new InputArgument[15]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0.05),
- InputArgument.op_Implicit(-1.075),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false)
- });
- }
- private void \u00311AA0()
- {
- if (!THelper.Exists((Entity) this.BBAAA))
- return;
- ((Entity) this.BBAAA).Detach();
- ((Entity) this.BBAAA).Delete();
- this.BBAAA = (Prop) null;
- }
- private void \u00321AAA(Entity ᙂ, ref Vector3 \u0031AAAA = null, Vector3 ᙄ = null)
- {
- Vector3 vector3_1;
- if (!THelper.Exists(ᙂ) && Vector3.op_Equality(param1, vector3_1))
- return;
- this.C0AA0();
- Script.Wait(50);
- this.\u00301AAA();
- if (Vector3.op_Inequality(param1, vector3_1))
- {
- Vector3 vector3_2 = param1;
- Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- double num = 0.05;
- Vector3 pos1 = Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction, (float) num));
- Vector3 vector3_3;
- while (true)
- {
- // ISSUE: explicit reference operation
- // ISSUE: variable of a reference type
- Vector3& local = @vector3_2;
- vector3_3 = THelper.getGroundPos(Vector3.op_Addition(pos1, Vector3.op_Multiply(Vector3.get_WorldUp(), 100f)));
- // ISSUE: variable of the null type
- __Null z = vector3_3.Z;
- // ISSUE: explicit reference operation
- (^local).Z = z;
- // ISSUE: explicit reference operation
- if (vector3_2.Z >= param1.Z && (double) ((Vector3) @vector3_2).DistanceTo(param1) < 2.0)
- {
- param1 = vector3_2;
- break;
- }
- vector3_2 = param1;
- pos1 = Vector3.op_Addition(pos1, Vector3.op_Multiply(direction, (float) num));
- if (THelper.getDistance2D(pos1, param1) > 3.0)
- break;
- }
- param1 = Vector3.op_Addition(param1, Vector3.op_Multiply(Vector3.get_WorldUp(), 0.8f));
- if (this.\u0032CAAA != null)
- {
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- }
- Entity ᙂ1 = ᙂ;
- Prop bbaaa = this.BBAAA;
- Vector3 ᙄ1 = vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_3).\u002Ector(-0.05f, -0.05f, 1.1f);
- Vector3 vector3_4 = vector3_3;
- this.\u0032CAAA = this.B0AAA(ᙂ1, bbaaa, ᙄ1, vector3_4);
- this.\u0031CAA0 = (int) THelper.getParachuteState() < 1;
- this.\u0034CAAA = !this.\u0031CAA0;
- this.\u0035CAA0 = vector3_2;
- this.\u0036CAAA = ᙂ;
- if (THelper.Exists(ᙂ))
- {
- vector3_3 = ᙂ.get_Position();
- // ISSUE: explicit reference operation
- this.\u0037CAA0 = (double) ((Vector3) @vector3_3).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
- }
- else
- {
- // ISSUE: explicit reference operation
- this.\u0037CAA0 = (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
- }
- }
- else if (Entity.op_Inequality(ᙂ, (Entity) null))
- {
- if (this.\u0032CAAA != null)
- {
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- }
- Entity ᙂ1 = ᙂ;
- Prop bbaaa = this.BBAAA;
- Vector3 ᙄ1 = vector3_1;
- Vector3 vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector(0.0f, 0.0f, 1.15f);
- Vector3 vector3_3 = Vector3.op_Addition(vector3_2, ᙄ);
- this.\u0032CAAA = this.B0AAA(ᙂ1, bbaaa, ᙄ1, vector3_3);
- this.\u0031CAA0 = (int) THelper.getParachuteState() < 1;
- this.\u0034CAAA = !this.\u0031CAA0;
- this.\u0035CAA0 = Vector3.get_Zero();
- this.\u0036CAAA = ᙂ;
- if (THelper.Exists(ᙂ))
- {
- Vector3 position = ᙂ.get_Position();
- // ISSUE: explicit reference operation
- this.\u0037CAA0 = (double) ((Vector3) @position).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
- }
- else
- {
- // ISSUE: explicit reference operation
- this.\u0037CAA0 = (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
- }
- }
- }
- private void \u00331AA0(bool ᙂ = false)
- {
- ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
- if (this.\u0031CAA0)
- {
- THelper.play3DSound(".\\scripts\\jc3 files\\hook_end.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
- if (ᙂ)
- {
- Vector3 direction = THelper.HeadingToDirection(this.BDAAA);
- direction.Z = (__Null) 0.0;
- 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());
- // ISSUE: explicit reference operation
- if (!((RaycastResult) @raycastResult).get_DitHitAnything())
- {
- ((Entity) Game.get_Player().get_Character()).set_FreezePosition(true);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- Script.Wait(10);
- 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());
- bool flag1 = false;
- bool flag2 = true;
- // ISSUE: explicit reference operation
- if (!((RaycastResult) @raycastResult).get_DitHitAnything())
- {
- 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());
- // ISSUE: explicit reference operation
- flag1 = ((RaycastResult) @raycastResult).get_DitHitAnything();
- }
- THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation());
- // ISSUE: explicit reference operation
- if (flag2 && ((RaycastResult) @raycastResult).get_DitHitAnything())
- {
- this.\u00341AAA();
- // ISSUE: explicit reference operation
- Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(((RaycastResult) @raycastResult).get_HitCoords(), ((Entity) Game.get_Player().get_Character()).get_Position()));
- dir.Z = (__Null) 0.0;
- ((Entity) Game.get_Player().get_Character()).set_Rotation(THelper.directionToRotation(dir, 0.0));
- if (flag1)
- {
- this.BCAAA = "michael_meat_hook_react_c";
- this.CCAA0 = this.\u0038CAAA.dict;
- this.\u0030DAAA = 0.539;
- // ISSUE: explicit reference operation
- ((Entity) Game.get_Player().get_Character()).set_Position(Vector3.op_Addition(((RaycastResult) @raycastResult).get_HitCoords(), Vector3.op_Multiply(Vector3.get_WorldDown(), 2f)));
- }
- else
- {
- this.BCAAA = "Rappel_Jump_a";
- this.CCAA0 = this.\u0039CAA0.dict;
- this.\u0030DAAA = 0.969;
- // ISSUE: explicit reference operation
- ((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)));
- }
- THelper.anim_playPedAnim(this.CCAA0, this.BCAAA, 8.0, THelper.animFlags.normal, false);
- while (!THelper.anim_isPlayingPedAnim(this.CCAA0, this.BCAAA, 1.0))
- Script.Wait(10);
- THelper.anim_setAnimSpeed(this.CCAA0, this.BCAAA, 0.0);
- THelper.anim_setAnimTime(this.CCAA0, this.BCAAA, this.\u0030DAAA);
- Script.Wait(100);
- this.\u0031CAA0 = false;
- this.\u0031DAA0 = true;
- if (this.\u0032CAAA != null)
- {
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- }
- this.\u00311AA0();
- Vector3 pos1;
- Vector3 pos2;
- if (flag1)
- {
- 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));
- // ISSUE: explicit reference operation
- 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));
- }
- else
- {
- 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));
- // ISSUE: explicit reference operation
- 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));
- }
- // ISSUE: explicit reference operation
- double forcedDist = (double) ((Vector3) @pos1).DistanceTo(pos2) * 0.5;
- this.\u0032CAAA = JC2.createRope(pos1, pos2, 1.0, forcedDist, (Bone) -1);
- int num1 = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle())
- }) - 1);
- Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit(num1),
- InputArgument.op_Implicit((float) pos1.X),
- InputArgument.op_Implicit((float) pos1.Y),
- InputArgument.op_Implicit((float) pos1.Z)
- });
- Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit((float) pos2.X),
- InputArgument.op_Implicit((float) pos2.Y),
- InputArgument.op_Implicit((float) pos2.Z)
- });
- if (flag1)
- return;
- Vector3 vector3 = Vector3.op_Division(Vector3.Normalize(Vector3.op_Subtraction(pos2, pos1)), (float) checked (num1 - 1));
- pos2 = pos1;
- int num2 = 0;
- int num3 = checked (num1 - 2);
- int num4 = num2;
- while (num4 <= num3)
- {
- Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit(num4),
- InputArgument.op_Implicit((float) pos2.X),
- InputArgument.op_Implicit((float) pos2.Y),
- InputArgument.op_Implicit((float) pos2.Z)
- });
- pos2 = Vector3.op_Addition(pos2, vector3);
- checked { ++num4; }
- }
- return;
- }
- ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
- this.\u0031DAA0 = false;
- ((Entity) Game.get_Player().get_Character()).ResetAlpha();
- if (!flag2)
- ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Subtraction(((Entity) Game.get_Player().get_Character()).get_Position(), this.\u0039DAA0));
- }
- this.\u0031DAA0 = false;
- ((Entity) Game.get_Player().get_Character()).ResetAlpha();
- this.\u00341AAA();
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- if (THelper.anim_requestDict(this.B7AAA))
- {
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 8.0, THelper.animFlags.normal, false);
- Script.Wait(100);
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 2.0);
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.B7AAA, this.C7AA0, 0.35))
- Script.Wait(100);
- Game.get_Player().get_Character().get_Task().ClearAnimation(this.B7AAA, this.C7AA0);
- }
- Game.get_Player().get_Character().set_CanRagdoll(true);
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
- }
- else
- {
- this.\u00341AAA();
- ((Entity) Game.get_Player().get_Character()).ResetAlpha();
- this.\u0031DAA0 = false;
- }
- }
- }
- private void \u00341AAA()
- {
- this.\u0031CAA0 = false;
- this.\u00311AA0();
- if (this.\u0032CAAA == null)
- return;
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- }
- private void \u00351AA0(Entity ᙂ, Vector3 \u0031AAAA = null)
- {
- try
- {
- this.\u0031BAA0 = (Vector3) null;
- this.\u0038DAAA = (Entity) null;
- this.\u00371AA0();
- Vector3 vector3_1;
- 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)
- this.\u00331AA0(false);
- 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)
- {
- this.\u00331AA0(false);
- }
- else
- {
- DateTime now1 = DateAndTime.Now;
- Prop prop1 = (Prop) null;
- if (this.\u0035DAA0)
- prop1 = this.BBAAA;
- double heading = (double) ((Entity) Game.get_Player().get_Character()).get_Heading();
- DateTime now2;
- if ((!((Entity) Game.get_Player().get_Character()).get_IsInAir() || this.\u00359AA0) && (!this.\u0033CAA0 && !this.\u0031DAA0) && THelper.anim_requestDict(this.\u00387AAA))
- {
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 8.0, THelper.animFlags.normal, false);
- Script.Wait(100);
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 1.5);
- DateTime now3 = DateAndTime.Now;
- while (true)
- {
- int num1 = THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00387AAA, this.\u00397AA0, 0.55) ? 1 : 0;
- now2 = DateAndTime.Now;
- int num2 = now2.Subtract(now3).TotalMilliseconds < 1000.0 ? 1 : 0;
- if ((num1 & num2) != 0)
- {
- ((Entity) Game.get_Player().get_Character()).ApplyForce(Vector3.get_WorldUp());
- Script.Wait(10);
- }
- else
- break;
- }
- }
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- if (Game.get_Player().get_Character().get_IsRagdoll() || ((Entity) Game.get_Player().get_Character()).get_IsInAir())
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- }
- List<Prop> propList = new List<Prop>();
- Prop prop2 = (Prop) null;
- Prop prop3 = (Prop) null;
- Prop prop4 = (Prop) null;
- if (this.\u0035DAA0)
- {
- 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);
- 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);
- 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);
- }
- if (THelper.Exists((Entity) prop2))
- {
- propList.Add(prop2);
- ((Entity) prop2).set_IsVisible(false);
- }
- if (THelper.Exists((Entity) prop1))
- {
- propList.Add(prop1);
- ((Entity) prop1).set_IsVisible(false);
- }
- if (THelper.Exists((Entity) prop3))
- {
- propList.Add(prop3);
- ((Entity) prop3).set_IsVisible(false);
- }
- if (THelper.Exists((Entity) prop4))
- {
- propList.Add(prop4);
- ((Entity) prop4).set_IsVisible(false);
- }
- if (!this.\u0035DAA0 && THelper.anim_requestDict(this.\u00328AAA))
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00328AAA, this.\u00338AA0, 6.0, THelper.animFlags.repeat, true);
- if (THelper.Exists((Entity) prop2))
- {
- try
- {
- foreach (Prop prop5 in propList)
- {
- try
- {
- ((Entity) prop5).set_IsVisible(false);
- Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
- {
- InputArgument.op_Implicit(prop5),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false)
- });
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Prop>.Enumerator enumerator;
- enumerator.Dispose();
- }
- Game.get_Player().get_Character().set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Script.Wait(200);
- ((Entity) prop2).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(31086),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- }));
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(prop2),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 31086)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- if (THelper.Exists((Entity) prop1))
- {
- ((Entity) prop1).Detach();
- ((Entity) prop1).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(28422),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- }));
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(prop1),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- }
- if (THelper.Exists((Entity) prop3))
- {
- ((Entity) prop3).set_Position(Vector3.op_Addition((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(57717),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- }), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.1f)));
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(prop3),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 57717)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- }
- if (THelper.Exists((Entity) prop4))
- {
- ((Entity) prop4).set_Position(Vector3.op_Addition((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(24806),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- }), Vector3.op_Multiply(Vector3.get_WorldUp(), 0.1f)));
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(prop4),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 24806)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- }
- }
- if (THelper.Exists(ᙂ))
- param1 = ᙂ.get_Position();
- this.\u0039DAA0 = param1;
- Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(param1, ((Entity) Game.get_Player().get_Character()).get_Position()));
- Vector3 vector3_2 = Vector3.op_Addition(param1, dir);
- double distance1 = (double) World.GetDistance(((Entity) Game.get_Player().get_Character()).get_Position(), param1);
- double distance2 = (double) World.GetDistance(((Entity) Game.get_Player().get_Character()).get_Position(), vector3_2);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, true, true, false, false, false);
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
- {
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(true)
- });
- }
- Vector3 vector3_3;
- if (!this.\u0035DAA0)
- {
- ((Entity) this.BBAAA).Detach();
- Vector3 rotation = ((Entity) Game.get_Player().get_Character()).get_Rotation();
- rotation.X = (__Null) (rotation.X + 90.0);
- ((Entity) this.BBAAA).set_Rotation(rotation);
- Ped character = Game.get_Player().get_Character();
- Prop bbaaa = this.BBAAA;
- int num = 0;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_3).\u002Ector(0.1f, 0.11f, -1.2f);
- Vector3 vector3_4 = vector3_3;
- Vector3 zero = Vector3.get_Zero();
- ((Entity) character).AttachTo((Entity) bbaaa, num, vector3_4, zero);
- Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- }
- bool flag1 = false;
- DateTime now4 = DateAndTime.Now;
- int num3 = 0;
- if (THelper.Exists((Entity) prop1))
- ((Entity) prop1).set_Velocity(Vector3.op_Multiply(dir, 10f));
- int num4;
- if (THelper.Exists(ᙂ) && THelper.isVehicle(ᙂ))
- {
- Model model = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsHelicopter())
- {
- num4 = 1;
- goto label_52;
- }
- }
- num4 = 0;
- label_52:
- bool flag2 = num4 != 0;
- Vector3 vector3_5 = Vector3.get_Zero();
- double num5 = 0.5;
- Vector3 vector3_6;
- if (THelper.Exists(ᙂ))
- {
- num5 = 1.5;
- Model model1 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- vector3_3 = ((Model) @model1).GetDimensions();
- double z1 = (double) vector3_3.Z;
- double num1;
- if (flag2)
- {
- num5 = 3.0;
- num1 = z1 * 1.5;
- }
- else
- num1 = z1 <= 2.0 ? z1 * 1.5 : z1 * 0.85;
- int num2;
- if (flag2)
- {
- vector3_3 = ᙂ.get_Position();
- // ISSUE: variable of the null type
- __Null z2 = vector3_3.Z;
- vector3_6 = THelper.getGroundPos(ᙂ.get_Position());
- // ISSUE: variable of the null type
- __Null z3 = vector3_6.Z;
- if (z2 - z3 > 2.0)
- {
- num2 = 1;
- goto label_60;
- }
- }
- num2 = 0;
- label_60:
- if (num2 != 0)
- vector3_5 = Vector3.op_Multiply(Vector3.get_WorldDown(), (float) num1);
- else if (!flag2)
- {
- Model model2 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model2).get_IsPlane())
- {
- vector3_5 = Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num1), 0.6f);
- }
- else
- {
- Model model3 = ᙂ.get_Model();
- int num6;
- // ISSUE: explicit reference operation
- if (!((Model) @model3).get_IsBicycle())
- {
- Model model4 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model4).get_IsBike())
- {
- Model model5 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model5).get_Hash() != 2166734073L)
- {
- Model model6 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model6).get_Hash() != 4246935337L)
- {
- Model model7 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model7).get_Hash() != 3025077634L)
- {
- Model model8 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model8).get_Hash() != 3757070668L)
- {
- num6 = 0;
- goto label_73;
- }
- }
- }
- }
- }
- }
- num6 = 1;
- label_73:
- 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);
- }
- }
- else
- flag2 = false;
- }
- bool flag3 = false;
- double num7 = 0.0;
- double num8 = 1.0;
- double num9 = 1.0;
- if (this.\u0037DAA0 == -1)
- this.\u0037DAA0 = (int) Function.Call<int>((Hash) 4828851653567843141L, new InputArgument[0]);
- if (this.\u0037DAA0 > -1)
- Function.Call((Hash) -1846684210194370067L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.\u0037DAA0),
- InputArgument.op_Implicit("helicopter_wind_idle"),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit("basejumps_sounds"),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- GameplayCamera.Shake((CameraShake) 8, 2f);
- short num10 = 0;
- if (!this.\u0035DAA0)
- {
- if (THelper.Exists((Entity) this.BBAAA))
- ((Entity) this.BBAAA).set_IsVisible(false);
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(false);
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- }
- this.CDAA0 = 1000.0;
- try
- {
- while (distance1 > num5 && distance1 < distance2 && ((Entity) Game.get_Player().get_Character()).get_Health() > 0)
- {
- bool flag4 = false;
- vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- // ISSUE: explicit reference operation
- double num1 = (double) ((Vector3) @vector3_6).Length();
- if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
- {
- vector3_6 = ((Entity) this.BBAAA).get_Velocity();
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @vector3_6).Length();
- }
- now2 = DateAndTime.Now;
- TimeSpan timeSpan = now2.Subtract(now4);
- if ((timeSpan.TotalMilliseconds <= 5000.0 || num1 >= 10.0) && !false)
- {
- this.BDAAA = THelper.directionToHeading(dir);
- now2 = DateAndTime.Now;
- timeSpan = now2.Subtract(now4);
- if (timeSpan.TotalMilliseconds > 250.0 && !THelper.Exists(ᙂ))
- {
- if (distance1 < this.CDAA0)
- this.CDAA0 = distance1;
- else
- break;
- }
- if (THelper.Exists(ᙂ))
- {
- if (!this.\u0035DAA0)
- {
- Model model1 = ᙂ.get_Model();
- int num2;
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsPlane())
- {
- Model model2 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsHelicopter())
- {
- num2 = 0;
- goto label_98;
- }
- }
- num2 = 1;
- label_98:
- if (num2 != 0)
- {
- double val1_1 = 3.0;
- double val1_2 = 1.0;
- vector3_6 = ᙂ.get_Velocity();
- // ISSUE: explicit reference operation
- double val2_1 = System.Math.Max((double) ((Vector3) @vector3_6).Length() * 0.7, distance1) * 0.05;
- double val2_2 = System.Math.Max(val1_2, val2_1);
- num9 = System.Math.Min(val1_1, val2_2);
- }
- else
- num9 = System.Math.Min(3.0, System.Math.Max(1.0, distance1 * 0.05));
- if (THelper.Exists((Entity) this.BBAAA))
- Function.Call((Hash) 1028689870813569457L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(distance1 * num9)
- });
- }
- else
- {
- double val1_1 = num9 * 0.8;
- double val1_2 = 1.2;
- vector3_6 = ᙂ.get_Velocity();
- // ISSUE: explicit reference operation
- double val2_1 = System.Math.Max((double) ((Vector3) @vector3_6).Length() * 0.1, 1.0);
- double val2_2 = System.Math.Min(val1_2, val2_1);
- num9 = System.Math.Max(val1_1, val2_2);
- }
- }
- else if (!this.\u0035DAA0)
- {
- num9 = System.Math.Max(num9 * 0.8, System.Math.Min(3.0, System.Math.Max(1.0, distance1 * 0.05)));
- if (THelper.Exists((Entity) this.BBAAA))
- Function.Call((Hash) 1028689870813569457L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(distance1 * num9)
- });
- }
- else
- num9 = 1.0;
- if (this.\u0035DAA0 && THelper.Exists((Entity) prop2))
- {
- ((Entity) prop2).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 45f), (float) num9));
- flag4 = true;
- Vector3 rotation = ((Entity) Game.get_Player().get_Character()).get_Rotation();
- rotation.Y = (__Null) num7;
- rotation.X = (__Null) (double) ((float) (double) rotation.X + (float) (num7 * 0.1));
- rotation.Z = (__Null) (double) ((float) (double) rotation.Z + (float) (num7 * 0.1));
- num7 += num8 * 0.25;
- if (num7 > 5.0)
- num8 = -1.0;
- else if (num7 < -5.0)
- num8 = 1.0;
- ((Entity) Game.get_Player().get_Character()).set_Rotation(rotation);
- try
- {
- foreach (Prop prop5 in propList)
- {
- try
- {
- if (Entity.op_Equality((Entity) prop5, (Entity) prop1))
- {
- vector3_6 = ((Entity) prop5).get_Velocity();
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @vector3_6).Length();
- vector3_3 = ((Entity) prop2).get_Velocity();
- // ISSUE: explicit reference operation
- double num6 = (double) ((Vector3) @vector3_3).Length() * 0.9;
- if (num2 < num6)
- ((Entity) prop5).ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(dir, 10f), (float) num9));
- else
- ((Entity) prop5).set_Velocity(((Entity) prop2).get_Velocity());
- }
- else if (Entity.op_Equality((Entity) prop5, (Entity) prop3))
- {
- Vector3 vector3_4 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(-1.0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((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()));
- }
- else if (Entity.op_Equality((Entity) prop5, (Entity) prop4))
- {
- Vector3 vector3_4 = (Vector3) Function.Call<Vector3>((Hash) 1772715284438788168L, new InputArgument[4]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(1.0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((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()));
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Prop>.Enumerator enumerator;
- enumerator.Dispose();
- }
- }
- else
- {
- Vector3 rotation1 = THelper.directionToRotation(dir, 0.0);
- rotation1.X = (__Null) (rotation1.X - 90.0);
- rotation1.Z = (__Null) (rotation1.Z - 10.0);
- Vector3 rotation2 = ((Entity) this.BBAAA).get_Rotation();
- rotation2.X = (__Null) (double) ((float) (double) rotation2.X + (float) (double) (rotation1.X - rotation2.X) * 0.05f);
- rotation2.Z = rotation1.Z;
- ((Entity) this.BBAAA).set_Rotation(rotation1);
- ((Entity) this.BBAAA).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 45f), (float) num9));
- }
- if (!flag4)
- ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Multiply(Vector3.op_Multiply(dir, 35f), (float) num9));
- Vector3 vector3_7;
- if (THelper.Exists(ᙂ))
- {
- vector3_7 = Vector3.op_Addition(ᙂ.get_Position(), vector3_5);
- dir = Vector3.Normalize(Vector3.op_Subtraction(vector3_7, ((Entity) Game.get_Player().get_Character()).get_Position()));
- heading = THelper.directionToHeading(dir);
- if (((Entity) Game.get_Player().get_Character()).IsTouching(ᙂ))
- break;
- }
- else if (Vector3.op_Inequality(param1, vector3_1))
- vector3_7 = param1;
- Vector3 vector3_8 = Vector3.op_Addition(vector3_7, dir);
- vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
- // ISSUE: explicit reference operation
- distance1 = (double) ((Vector3) @vector3_6).DistanceTo(vector3_7);
- vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
- // ISSUE: explicit reference operation
- distance2 = (double) ((Vector3) @vector3_6).DistanceTo(vector3_8);
- int num11;
- if (num1 >= 10.0)
- {
- if (Function.Call<bool>((Hash) -8382040100735967724L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- }) == null)
- {
- if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
- {
- if (Function.Call<bool>((Hash) -8382040100735967724L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.BBAAA)
- }) != null)
- goto label_141;
- }
- num11 = 0;
- goto label_142;
- }
- }
- label_141:
- num11 = 1;
- label_142:
- bool flag5 = num11 != 0;
- if (flag5)
- checked { ++num10; }
- if (flag5)
- {
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- if (!this.\u0035DAA0 && THelper.Exists((Entity) this.BBAAA))
- {
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 743271985761492581L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(true)
- });
- }
- }
- flag1 = false;
- now2 = DateAndTime.Now;
- timeSpan = now2.Subtract(now4);
- if ((timeSpan.TotalMilliseconds <= 500.0 || (int) num10 <= 25) && !false)
- {
- if (num1 > 15.0)
- num10 = (short) 0;
- flag3 = this.C2AA0();
- this.\u0039GAA0 = this.\u00313AA0();
- if (flag3 || this.\u0039GAA0)
- {
- this.\u0034DAAA = num1 * 0.5;
- if (this.\u0034DAAA > 20.0)
- this.\u0034DAAA = 20.0;
- this.\u0035A0A0 = Vector3.op_Multiply(((Entity) this.BBAAA).get_Velocity(), 0.05f);
- break;
- }
- THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
- checked { num3 += 10; }
- if (num3 % 50 == 0)
- {
- if (THelper.Exists(ᙂ))
- this.\u00361AAA(ᙂ);
- else
- Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit(distance1 * 0.5)
- });
- }
- Script.Wait(10);
- }
- else
- break;
- }
- else
- break;
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- GameplayCamera.StopShaking();
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(false);
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- Function.Call((Hash) -4679285206957010997L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit((int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
- {
- InputArgument.op_Implicit("GADGET_PARACHUTE")
- })),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1)
- });
- if (this.\u0037DAA0 > -1)
- Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u0037DAA0)
- });
- if (this.\u0035DAA0 || ((Entity) Game.get_Player().get_Character()).IsAttached())
- {
- Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- ((Entity) Game.get_Player().get_Character()).Detach();
- vector3_6 = ((Entity) Game.get_Player().get_Character()).get_Position();
- if ((double) (vector3_6.Z - THelper.getGroundPos(((Entity) Game.get_Player().get_Character()).get_Position()).Z) < 0.25)
- {
- Ped character = Game.get_Player().get_Character();
- ((Entity) character).set_Position(Vector3.op_Addition(((Entity) character).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1f)));
- }
- if (!flag3)
- ((Entity) Game.get_Player().get_Character()).set_Velocity(dir);
- if (this.\u0039GAA0)
- this.CHAA0 = Vector3.op_Multiply(((Entity) this.BBAAA).get_Velocity(), 0.3f);
- this.\u00311AA0();
- }
- try
- {
- foreach (Prop prop5 in propList)
- {
- try
- {
- if (THelper.Exists((Entity) prop5) && Entity.op_Inequality((Entity) prop5, (Entity) this.BBAAA))
- {
- ((Entity) prop5).Detach();
- ((Entity) prop5).Delete();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Prop>.Enumerator enumerator;
- enumerator.Dispose();
- }
- if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00328AAA, this.\u00338AA0, 1.0))
- Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00328AAA, this.\u00338AA0);
- if (flag3)
- this.\u00303AAA();
- else if (this.\u0039GAA0)
- ((Entity) Game.get_Player().get_Character()).set_Velocity(Vector3.op_Multiply(dir, 5f));
- else if ((int) num10 > 25 || ((Entity) Game.get_Player().get_Character()).get_Health() <= 0)
- {
- if (this.\u0035DAA0)
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(10),
- InputArgument.op_Implicit(10),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- else
- {
- ((Entity) Game.get_Player().get_Character()).Detach();
- if ((double) (((Entity) Game.get_Player().get_Character()).get_Position().Z - THelper.getGroundPos(((Entity) Game.get_Player().get_Character()).get_Position()).Z) < 0.25)
- {
- Ped character = Game.get_Player().get_Character();
- ((Entity) character).set_Position(Vector3.op_Addition(((Entity) character).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1f)));
- }
- Script.Wait(50);
- }
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
- ((Entity) Game.get_Player().get_Character()).set_Heading((float) heading);
- this.\u00331AA0(true);
- }
- else
- {
- int num1;
- if (THelper.Exists(ᙂ))
- {
- Model model1 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model1).get_IsHelicopter())
- {
- Model model2 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model2).get_IsPlane())
- {
- Model model3 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model3).get_IsVehicle())
- goto label_199;
- }
- }
- num1 = 1;
- goto label_201;
- }
- label_199:
- num1 = 0;
- label_201:
- if (num1 != 0)
- {
- Vehicle[] nearbyVehicles = World.GetNearbyVehicles(Game.get_Player().get_Character(), 50f);
- int index = 0;
- while (index < nearbyVehicles.Length)
- {
- Vehicle vehicle = nearbyVehicles[index];
- try
- {
- int num2;
- if (THelper.Exists((Entity) vehicle))
- {
- if (((Entity) vehicle).get_Handle() != ᙂ.get_Handle())
- {
- vector3_6 = ((Entity) vehicle).get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_6).DistanceTo(ᙂ.get_Position()) >= 1.0)
- goto label_207;
- }
- num2 = 1;
- goto label_209;
- }
- label_207:
- num2 = 0;
- label_209:
- if (num2 != 0)
- {
- ᙂ = (Entity) vehicle;
- break;
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index; }
- }
- }
- if (THelper.Exists(ᙂ))
- {
- this.\u0033CAA0 = flag2;
- try
- {
- this.\u00378AA0 = (Vehicle) ᙂ;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- this.\u00388AAA = DateAndTime.Now;
- if (!flag2)
- {
- Model model1 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBicycle())
- {
- Model model2 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBike())
- {
- Model model3 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model3).get_Hash() != 2166734073L)
- {
- Model model4 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model4).get_Hash() != 4246935337L)
- {
- Model model5 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model5).get_Hash() != 3025077634L)
- {
- Model model6 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if ((long) ((Model) @model6).get_Hash() != 3757070668L)
- goto label_226;
- }
- }
- }
- }
- }
- int num2;
- if (THelper.Exists((Entity) ((Vehicle) ᙂ).GetPedOnSeat((VehicleSeat) -1)))
- {
- num2 = 1;
- goto label_228;
- }
- label_226:
- num2 = 0;
- label_228:
- if (num2 != 0)
- {
- this.\u00360AAA((Vehicle) ᙂ);
- try
- {
- Function.Call((Hash) -7314680237977635196L, new InputArgument[3]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(ᙂ),
- InputArgument.op_Implicit(-1)
- });
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- else
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- ((Entity) Game.get_Player().get_Character()).set_Heading((float) heading);
- this.\u00331AA0(false);
- Model model2 = ᙂ.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model2).get_IsPlane())
- ((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)));
- else
- ((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)));
- }
- }
- else
- {
- Game.get_Player().get_Character().set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- this.\u00331AA0(false);
- this.\u00311AA0();
- this.C0AA0();
- this.\u00301AAA();
- ((Entity) this.BBAAA).Detach();
- Function.Call((Hash) 1914599121192125055L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false)
- });
- Script.Wait(100);
- this.\u0032CAAA = JC2.createRope((Entity) Game.get_Player().get_Character(), ᙂ, 0.5, 0.0, (Bone) -1);
- if (THelper.Exists((Entity) this.BBAAA))
- {
- ((Entity) this.BBAAA).set_Position((Vector3) Function.Call<Vector3>((Hash) 1711508347870014286L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(31086),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- }));
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 31086)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(-0.15),
- InputArgument.op_Implicit(-0.45),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 28422)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) -4366425103069638407L, new InputArgument[19]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(this.BBAAA),
- InputArgument.op_Implicit(THelper.getPedBoneIndex(Game.get_Player().get_Character(), 60309)),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(false),
- InputArgument.op_Implicit(0)
- });
- }
- Ped character1 = Game.get_Player().get_Character();
- ((Entity) character1).set_Velocity(Vector3.op_Multiply(((Entity) character1).get_Velocity(), 0.2f));
- Rope rope = this.\u0032CAAA;
- Ped character2 = Game.get_Player().get_Character();
- Entity e2 = ᙂ;
- double distCoef = 1.0;
- double forcedDist = 0.0;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_6).\u002Ector(-0.1f, -0.1f, 2.3f);
- Vector3 offset_E1 = vector3_6;
- Vector3 offset_E2 = vector3_1;
- JC2.attachEntitiesToRope(rope, (Entity) character2, e2, distCoef, forcedDist, offset_E1, offset_E2);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- this.\u0038DAAA = ᙂ;
- }
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
- }
- else
- this.\u00331AA0(true);
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- Exception exception = ex;
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- UI.ShowSubtitle("Error when moving to target: " + exception.Message, 10000);
- ProjectData.ClearProjectError();
- }
- }
- private void \u00361AAA(Entity ᙂ)
- {
- Function.Call((Hash) -3455959274601850085L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit((double) World.GetDistance(ᙂ.get_Position(), ((Entity) Game.get_Player().get_Character()).get_Position()) * 0.5)
- });
- int num = checked (Function.Call<int>((Hash) 3915305126917632181L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle())
- }) - 1);
- Vector3 position = ᙂ.get_Position();
- Function.Call((Hash) 3112564522788239002L, new InputArgument[5]
- {
- InputArgument.op_Implicit(this.\u0032CAAA.get_Handle()),
- InputArgument.op_Implicit(num),
- InputArgument.op_Implicit((float) position.X),
- InputArgument.op_Implicit((float) position.Y),
- InputArgument.op_Implicit((float) position.Z)
- });
- }
- private void \u00371AA0()
- {
- if (!this.\u0033CAA0)
- return;
- this.\u0033CAA0 = false;
- this.\u0038DAAA = (Entity) null;
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(100),
- InputArgument.op_Implicit(100),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- this.\u00311AA0();
- }
- private void \u00381AAA()
- {
- this.C6AA0 = !this.C6AA0;
- try
- {
- this.\u00331AA0(false);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- this.\u00371AA0();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- this.\u00380AAA();
- this.\u00356AA0.findItem("bEnabled").value = Conversions.ToString(this.C6AA0);
- this.\u00316AA0.WriteINIBool("bEnabled", "general", this.C6AA0);
- UI.ShowSubtitle("Just Cause 3 Mod enabled: " + Conversions.ToString(this.C6AA0));
- }
- private void \u00391AA0()
- {
- if (!this.C6AA0)
- return;
- this.\u00307AAA = !this.\u00307AAA;
- try
- {
- this.\u00331AA0(false);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- this.\u00371AA0();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- this.\u00380AAA();
- this.\u00316AA0.WriteINIBool("bHookMode", "general", this.\u00307AAA);
- this.\u00356AA0.findItem("bHookMode").value = Conversions.ToString(this.\u00307AAA);
- UI.ShowSubtitle("Just Cause 3 mod - Hook On: " + Conversions.ToString(this.\u00307AAA));
- }
- private void B1AAA()
- {
- if (!Game.get_Player().get_IsAiming() || DateAndTime.Now.Subtract(this.\u0034EAAA).TotalMilliseconds <= 1000.0)
- return;
- this.\u0034EAAA = DateAndTime.Now;
- try
- {
- while (this.\u0035EAA0.Count < 4)
- {
- 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)));
- Script.Wait(10);
- if (THelper.Exists((Entity) ped))
- this.\u0035EAA0.Add((Entity) ped);
- }
- try
- {
- foreach (Entity e in this.\u0033EAA0)
- {
- try
- {
- if (THelper.Exists(e))
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(e)
- });
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Entity>.Enumerator enumerator;
- enumerator.Dispose();
- }
- this.\u0033EAA0.Clear();
- short num1 = 1;
- try
- {
- foreach (Ped ped1 in this.\u0035EAA0)
- {
- try
- {
- if (Entity.op_Inequality((Entity) ped1, (Entity) Game.get_Player().get_Character()))
- {
- ((Entity) ped1).set_Health(-1);
- Ped ped2 = ped1;
- Ped character = Game.get_Player().get_Character();
- int num2 = 28422;
- Vector3 vector3_1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(-5f, (float) checked ((int) num1 * 20), -2f);
- Vector3 vector3_2 = vector3_1;
- Vector3 zero = Vector3.get_Zero();
- ((Entity) ped2).AttachTo((Entity) character, num2, vector3_2, zero);
- Function.Call((Hash) 4945100874290747328L, new InputArgument[3]
- {
- InputArgument.op_Implicit(ped1),
- InputArgument.op_Implicit(10),
- InputArgument.op_Implicit(0)
- });
- checked { ++num1; }
- }
- Ped[] nearbyPeds = World.GetNearbyPeds(ped1, 100f);
- int index1 = 0;
- while (index1 < nearbyPeds.Length)
- {
- Ped ped2 = nearbyPeds[index1];
- try
- {
- 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()))
- {
- this.\u0033EAA0.Add((Entity) ped2);
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(ped2)
- });
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index1; }
- }
- Vehicle[] nearbyVehicles = World.GetNearbyVehicles(ped1, 100f);
- int index2 = 0;
- while (index2 < nearbyVehicles.Length)
- {
- Vehicle vehicle = nearbyVehicles[index2];
- try
- {
- if (THelper.Exists((Entity) vehicle) && !this.\u0033EAA0.Contains((Entity) vehicle) && Entity.op_Inequality((Entity) vehicle, (Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- {
- this.\u0033EAA0.Add((Entity) vehicle);
- Function.Call((Hash) -6400501506836665158L, new InputArgument[1]
- {
- InputArgument.op_Implicit(vehicle)
- });
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { ++index2; }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Entity>.Enumerator enumerator;
- enumerator.Dispose();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- private void C1AA0()
- {
- this.\u0039EAA0 = this.\u0039EAA0 + 1.0;
- if (this.\u0039EAA0 > 180.0)
- this.\u0039EAA0 = this.\u0039EAA0 % 180.0;
- if (THelper.isButtonPressed(THelper.controls.INPUT_AIM))
- {
- Vector3 direction = GameplayCamera.get_Direction();
- Vector3 vector3 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction, 2f));
- RaycastResult raycastResult = World.Raycast(vector3, Vector3.op_Addition(vector3, Vector3.op_Multiply(direction, 1000f)), (IntersectOptions) 1, (Entity) Game.get_Player().get_Character());
- // ISSUE: explicit reference operation
- if (((RaycastResult) @raycastResult).get_DitHitAnything())
- {
- double num1 = 1.0;
- // ISSUE: explicit reference operation
- Vector3 hitCoords = ((RaycastResult) @raycastResult).get_HitCoords();
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @hitCoords).DistanceTo(vector3) / 1000.0;
- double num3 = num1 - num2;
- // ISSUE: explicit reference operation
- this.BEAAA = ((RaycastResult) @raycastResult).get_HitCoords();
- if ((!this.\u00307AAA || !this.\u0038EAAA) && !false)
- return;
- string sFile = ".\\scripts\\jc3 files\\crosshair_hook.png";
- Vector2 vector2_1;
- // ISSUE: explicit reference operation
- ((Vector2) @vector2_1).\u002Ector(0.5f, 0.5f);
- Vector2 pos = vector2_1;
- Vector2 vector2_2;
- // ISSUE: explicit reference operation
- ((Vector2) @vector2_2).\u002Ector((float) (0.03 * num3), (float) (0.03 * num3));
- Vector2 size = vector2_2;
- double rotation = this.\u0039EAA0;
- Color white = Color.White;
- int num4 = 100;
- int num5 = 0;
- int num6 = 0;
- double aspectRatio = 1.0;
- Vector2 vector2_3;
- Vector2 centerOffset = vector2_3;
- THelper.drawTextureAuxSpinSizeFix(sFile, pos, size, rotation, white, (short) num4, (short) num5, (short) num6, aspectRatio, centerOffset);
- }
- else
- this.BEAAA = Vector3.get_Zero();
- }
- else
- this.BEAAA = Vector3.get_Zero();
- }
- private void \u00302AAA()
- {
- short parachuteState = THelper.getParachuteState();
- Prop prop1 = (Prop) null;
- if ((int) parachuteState > 0)
- {
- if (this.CEAA0 == -1)
- this.CEAA0 = (int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
- {
- InputArgument.op_Implicit("p_parachute1_sp_s")
- });
- Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
- int ceaA0 = this.CEAA0;
- prop1 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
- {
- InputArgument.op_Implicit((float) position.X),
- InputArgument.op_Implicit((float) position.Y),
- InputArgument.op_Implicit((float) position.Z),
- InputArgument.op_Implicit(5.0),
- InputArgument.op_Implicit(ceaA0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(1)
- });
- }
- if (!this.\u0034CAAA)
- return;
- if (THelper.Exists(this.\u0036CAAA))
- this.\u0035CAA0 = this.\u0036CAAA.get_Position();
- if (THelper.Exists((Entity) prop1))
- {
- THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation()).Z = (__Null) 0.0;
- Vector3 dir = Vector3.Normalize(Vector3.op_Subtraction(this.\u0035CAA0, ((Entity) Game.get_Player().get_Character()).get_Position()));
- bool flag = THelper.Exists(this.\u0036CAAA);
- // ISSUE: explicit reference operation
- if (!flag || this.\u0037CAA0 < (double) ((Vector3) @this.\u0035CAA0).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position()))
- {
- ((Entity) prop1).ApplyForce(Vector3.op_Multiply(dir, 0.25f));
- if (flag)
- {
- Vector3 velocity1 = this.\u0036CAAA.get_Velocity();
- Vector3 velocity2 = ((Entity) prop1).get_Velocity();
- // ISSUE: explicit reference operation
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity2).Length() < (double) ((Vector3) @velocity1).Length())
- {
- Prop prop2 = prop1;
- ((Entity) prop2).set_Velocity(Vector3.op_Addition(((Entity) prop2).get_Velocity(), Vector3.op_Multiply(Vector3.op_Subtraction(velocity1, ((Entity) prop1).get_Velocity()), 0.25f)));
- // ISSUE: explicit reference operation
- this.\u0036CAAA.set_MaxSpeed(((Vector3) @velocity1).Length() * 1.5f);
- }
- this.\u00361AAA(this.\u0036CAAA);
- }
- }
- if (!flag)
- {
- THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
- THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", (Entity) Game.get_Player().get_Character(), "");
- }
- 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))
- {
- THelper.play3DSound(".\\scripts\\jc3 files\\hook_end.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
- this.\u0034CAAA = false;
- this.\u00311AA0();
- if (this.\u0032CAAA != null)
- {
- this.\u0032CAAA.Delete();
- this.\u0032CAAA = (Rope) null;
- }
- }
- }
- else
- {
- this.\u0031CAA0 = true;
- this.\u0034CAAA = false;
- Game.get_Player().get_Character().set_CanRagdoll(false);
- }
- }
- private void \u00312AA0()
- {
- if (!this.\u0031DAA0)
- return;
- THelper.anim_setAnimSpeed(this.CCAA0, this.BCAAA, 0.0);
- THelper.anim_setAnimTime(this.CCAA0, this.BCAAA, this.\u0030DAAA);
- Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- RaycastResult raycastResult = World.Raycast(GameplayCamera.get_Position(), Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(GameplayCamera.get_Direction(), 2f)), (IntersectOptions) -1);
- // ISSUE: explicit reference operation
- // ISSUE: explicit reference operation
- // ISSUE: explicit reference operation
- 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())
- ((Entity) Game.get_Player().get_Character()).set_Alpha(50);
- else
- ((Entity) Game.get_Player().get_Character()).ResetAlpha();
- if (((Entity) Game.get_Player().get_Character()).get_IsDead() || THelper.isButtonJustPressed(THelper.controls.INPUT_JUMP))
- {
- this.\u0031DAA0 = false;
- ((Entity) Game.get_Player().get_Character()).ResetAlpha();
- this.\u00331AA0(false);
- this.\u00341AAA();
- ((Entity) Game.get_Player().get_Character()).set_FreezePosition(false);
- THelper.anim_stopPedAnim(this.CCAA0, this.BCAAA, 2.0);
- Vector3 direction = THelper.RotationToDirection(((Entity) Game.get_Player().get_Character()).get_Rotation());
- Vector3 vector3_1 = Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), 1.5f));
- Vector3 groundPos = THelper.getGroundPos(vector3_1);
- Vector3 vector3_2;
- while (THelper.getDistance2D(vector3_1, ((Entity) Game.get_Player().get_Character()).get_Position()) < 1.5)
- {
- vector3_1 = Vector3.op_Addition(vector3_1, Vector3.op_Multiply(direction, 0.2f));
- groundPos = THelper.getGroundPos(vector3_1);
- Script.Wait(0);
- int num;
- if (groundPos.Z - ((Entity) Game.get_Player().get_Character()).get_Position().Z < 2.0)
- {
- // ISSUE: variable of the null type
- __Null z1 = groundPos.Z;
- vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Position();
- // ISSUE: variable of the null type
- __Null z2 = vector3_2.Z;
- if (z1 > z2)
- {
- num = 1;
- goto label_10;
- }
- }
- num = 0;
- label_10:
- if (num != 0)
- break;
- }
- // ISSUE: variable of the null type
- __Null z3 = groundPos.Z;
- vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Position();
- // ISSUE: variable of the null type
- __Null z4 = vector3_2.Z;
- if (z3 - z4 < 2.0 && groundPos.Z > ((Entity) Game.get_Player().get_Character()).get_Position().Z)
- {
- Script.Wait(10);
- THelper.resetTimeOut();
- while (!THelper.timedOut(200))
- {
- vector3_2 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_2).Length() < 5.0)
- ((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()));
- Script.Wait(10);
- }
- }
- }
- }
- private void \u00322AAA(object ᙂ, EventArgs \u0031AAAA)
- {
- if (!this.\u00346AAA)
- {
- this.\u0035AAA0();
- }
- else
- {
- THelper.helper_tick();
- this.\u00312AA0();
- int index1 = checked (JC2.CA0A0.Count - 1);
- while (index1 >= 0)
- {
- if (THelper._iskeyPressed(Keys.X) || THelper.usingController() && THelper.isButtonPressed(THelper.controls.INPUT_FRONTEND_RIGHT))
- JC2.CA0A0[index1].retract(false);
- JC2.CA0A0[index1].tick();
- checked { index1 += -1; }
- }
- this.\u00302AAA();
- this.\u00373AA0();
- this.\u0037AAA0();
- this.\u00356AA0.menuTick();
- this.B2AAA();
- if (!this.C6AA0)
- return;
- this.C1AA0();
- this.B1AAA();
- if (this.\u00359AA0 && THelper.isButtonJustPressed(THelper.controls.INPUT_ENTER))
- this.CAAA0();
- if (this.\u0030EAAA % 500 == 0)
- {
- try
- {
- foreach (Ped ped in this.\u0035EAA0)
- {
- try
- {
- if (Entity.op_Inequality((Entity) ped, (Entity) Game.get_Player().get_Character()))
- {
- ((Entity) ped).set_Health(-1);
- ((Entity) ped).set_IsVisible(false);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Entity>.Enumerator enumerator;
- enumerator.Dispose();
- }
- }
- TimeSpan timeSpan;
- if (THelper.Exists((Entity) this.\u00378AA0))
- {
- if (this.\u0030EAAA % 100 == 0)
- {
- int num1;
- if (!this.\u0033CAA0 && !((Entity) this.\u00378AA0).IsTouching((Entity) Game.get_Player().get_Character()))
- {
- timeSpan = DateAndTime.Now.Subtract(this.\u00388AAA);
- if (timeSpan.TotalMilliseconds > 2000.0)
- {
- num1 = 1;
- goto label_25;
- }
- }
- num1 = 0;
- label_25:
- if (num1 != 0)
- {
- 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());
- // ISSUE: explicit reference operation
- // ISSUE: explicit reference operation
- if (!THelper.Exists(((RaycastResult) @raycastResult).get_HitEntity()) || Entity.op_Inequality(((RaycastResult) @raycastResult).get_HitEntity(), (Entity) this.\u00378AA0))
- {
- this.\u00378AA0 = (Vehicle) null;
- this.\u00359AA0 = false;
- }
- }
- if (THelper.Exists((Entity) this.\u00378AA0))
- {
- Ped pedOnSeat = this.\u00378AA0.GetPedOnSeat((VehicleSeat) -1);
- if (!THelper.Exists((Entity) pedOnSeat))
- {
- this.\u00359AA0 = true;
- }
- else
- {
- Vector3 offsetInWorldCoords = ((Entity) pedOnSeat).GetOffsetInWorldCoords(Vector3.get_Zero());
- int num2;
- if (!this.\u0033CAA0)
- {
- Model model = ((Entity) this.\u00378AA0).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsTrain() || THelper.getDistance2D(offsetInWorldCoords, ((Entity) Game.get_Player().get_Character()).get_Position()) >= 1.0)
- {
- num2 = 0;
- goto label_36;
- }
- }
- num2 = 1;
- label_36:
- this.\u00359AA0 = num2 != 0;
- if (this.\u00359AA0)
- UI.ShowSubtitle("Press Enter Vehicle button to steal the vehicle...", 150);
- }
- }
- }
- }
- else if (this.\u0030EAAA % 200 == 0)
- this.\u00359AA0 = false;
- int index2 = checked (JC2.\u00368AAA.Count - 1);
- while (index2 >= 0)
- {
- try
- {
- JC2.\u00368AAA[index2].tick();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index2 += -1; }
- }
- this.\u0030EAAA = checked (this.\u0030EAAA + 10);
- if (this.\u0030EAAA > 1000)
- this.\u0030EAAA = 0;
- if (this.\u0030EAAA % 500 == 0)
- this.\u00372AA0();
- this.\u00370AA0();
- if (((Entity) Game.get_Player().get_Character()).get_Health() <= 0)
- {
- this.\u00331AA0(false);
- this.\u00371AA0();
- this.\u00380AAA();
- }
- else
- {
- Vector3 vector3_1;
- if (this.\u0033DAA0)
- {
- int parachuteState = (int) THelper.getParachuteState();
- timeSpan = DateAndTime.Now.Subtract(this.\u0032DAAA);
- double totalMilliseconds = timeSpan.TotalMilliseconds;
- Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- direction.Z = (__Null) 0.0;
- if (!THelper.Exists((Entity) this.\u0031EAA0))
- {
- Vector3 position = ((Entity) Game.get_Player().get_Character()).get_Position();
- int num = (int) Function.Call<int>((Hash) -3292914402564945716L, new InputArgument[1]
- {
- InputArgument.op_Implicit("p_parachute1_sp_s")
- });
- this.\u0031EAA0 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
- {
- InputArgument.op_Implicit((float) position.X),
- InputArgument.op_Implicit((float) position.Y),
- InputArgument.op_Implicit((float) position.Z),
- InputArgument.op_Implicit(5.0),
- InputArgument.op_Implicit(num),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(1)
- });
- this.\u0032EAAA = true;
- }
- if (totalMilliseconds < 3000.0)
- {
- if (parachuteState == 1 && this.\u0032EAAA && THelper.Exists((Entity) this.\u0031EAA0))
- {
- vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
- this.\u0032EAAA = vector3_1.Z < 1.0;
- Prop prop = this.\u0031EAA0;
- ((Entity) prop).set_Velocity(Vector3.op_Addition(((Entity) prop).get_Velocity(), Vector3.op_Multiply(Vector3.get_WorldUp(), 10f)));
- }
- int num;
- if (parachuteState == 1)
- {
- vector3_1 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).Length() < this.\u0034DAAA * 0.4)
- {
- num = 1;
- goto label_64;
- }
- }
- num = 0;
- label_64:
- if (num != 0)
- ((Entity) Game.get_Player().get_Character()).ApplyForce(direction);
- }
- else
- this.\u0033DAA0 = false;
- }
- if (THelper.Exists((Entity) this.\u0031EAA0))
- {
- if (!THelper.isButtonPressed(THelper.controls.INPUT_MOVE_UP_ONLY))
- {
- vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
- if ((double) vector3_1.Z < -2.5)
- ((Entity) this.\u0031EAA0).ApplyForce(Vector3.get_WorldUp());
- }
- vector3_1 = ((Entity) this.\u0031EAA0).get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).Length() < this.\u0034DAAA * 0.4 && !THelper.isButtonPressed(THelper.controls.INPUT_MOVE_DOWN_ONLY))
- ((Entity) this.\u0031EAA0).ApplyForce(THelper.RotationToDirection(((Entity) this.\u0031EAA0).get_Rotation()));
- }
- else
- this.\u0031EAA0 = (Prop) null;
- if (this.\u0033CAA0)
- {
- try
- {
- if (Game.IsKeyPressed(this.\u00376AA0))
- {
- this.\u00371AA0();
- }
- else
- {
- int num;
- if (THelper.Exists(this.\u0038DAAA))
- {
- Model model = this.\u0038DAAA.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsHelicopter())
- {
- num = 1;
- goto label_83;
- }
- }
- num = 0;
- label_83:
- if (num != 0)
- {
- Entity entity1 = this.\u0038DAAA;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(0.0f, 0.0f, -2f);
- Vector3 vector3_2 = vector3_1;
- Vector3 offsetInWorldCoords = entity1.GetOffsetInWorldCoords(vector3_2);
- Entity entity2 = this.\u0038DAAA;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(0.0f, 0.0f, -2f);
- Vector3 vector3_3 = vector3_1;
- entity2.GetOffsetInWorldCoords(vector3_3);
- if (THelper.Exists((Entity) this.BBAAA))
- ((Entity) this.BBAAA).set_Velocity(Vector3.op_Multiply(Vector3.op_Subtraction(offsetInWorldCoords, ((Entity) this.BBAAA).get_Position()), 4f));
- if (this.\u0030EAAA % 100 != 0)
- ;
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- this.\u00371AA0();
- ProjectData.ClearProjectError();
- }
- }
- else
- {
- if (THelper.Exists(this.\u00399AA0) && (double) World.GetDistance(this.\u00399AA0.get_Position(), GameplayCamera.get_Position()) < 200.0)
- {
- int num;
- if (THelper.isPed(this.\u00399AA0))
- {
- if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00399AA0)
- }) == null)
- {
- num = 1;
- goto label_96;
- }
- }
- num = 0;
- label_96:
- if (num != 0)
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(5000),
- InputArgument.op_Implicit(5000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(false)
- });
- }
- }
- if (THelper.Exists(this.C9AA0) && (double) World.GetDistance(this.C9AA0.get_Position(), GameplayCamera.get_Position()) < 200.0)
- {
- int num;
- if (THelper.isPed(this.C9AA0))
- {
- if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.C9AA0)
- }) == null)
- {
- num = 1;
- goto label_104;
- }
- }
- num = 0;
- label_104:
- if (num != 0)
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.C9AA0),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.C9AA0),
- InputArgument.op_Implicit(5000),
- InputArgument.op_Implicit(5000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.C9AA0),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.C9AA0),
- InputArgument.op_Implicit(false)
- });
- }
- }
- if (this.\u0031CAA0)
- {
- if (!THelper.isButtonPressed(THelper.controls.INPUT_AIM) || this.\u0031DAA0)
- {
- if (Game.get_Player().get_Character().get_IsRagdoll())
- {
- this.\u00331AA0(false);
- return;
- }
- Vector3 vector3_2;
- if (THelper.Exists(this.\u00399AA0))
- {
- if (THelper.isPed(this.\u00399AA0))
- {
- if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- {
- Vehicle currentVehicle = Game.get_Player().get_Character().get_CurrentVehicle();
- this.\u00331AA0(false);
- vector3_1 = this.\u00399AA0.get_Position();
- // ISSUE: explicit reference operation
- double pDist = (double) ((Vector3) @vector3_1).DistanceTo(((Entity) currentVehicle).get_Position());
- Rope rope = JC2.createRope((Entity) currentVehicle, this.\u00399AA0, 1.0, 0.0, (Bone) -1);
- JC2.attachEntitiesToRope(rope, this.\u00399AA0, (Entity) currentVehicle, 1.0, 0.0, vector3_2, vector3_2);
- JC2.TEntityInRope tentityInRope = new JC2.TEntityInRope(this.\u00399AA0, (Entity) currentVehicle, rope, pDist, Vector3.get_Zero(), Vector3.get_Zero());
- if (THelper.isObject(this.\u00399AA0))
- this.\u00399AA0.ApplyForce(Vector3.op_Subtraction(((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Position(), this.\u00399AA0.get_Position()));
- this.\u00399AA0 = (Entity) null;
- }
- else
- {
- DateTime now = DateAndTime.Now;
- if (THelper.isPed(this.\u00399AA0))
- {
- while (true)
- {
- int num1 = Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00399AA0)
- }) == 0 ? 1 : 0;
- timeSpan = DateAndTime.Now.Subtract(now);
- int num2 = timeSpan.TotalMilliseconds < 1000.0 ? 1 : 0;
- if ((num1 & num2) != 0)
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.\u00399AA0),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(3000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- else
- break;
- }
- }
- if (!this.\u0031DAA0)
- {
- if (THelper.anim_requestDict(this.\u00308AAA))
- {
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 8.0, THelper.animFlags.normal, false);
- Script.Wait(100);
- if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 1.0))
- {
- THelper.anim_setAnimTime((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.01);
- THelper.anim_setAnimSpeed((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 4.0);
- }
- }
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.05))
- Script.Wait(10);
- }
- this.\u00331AA0(false);
- GameplayCamera.Shake((CameraShake) 1, 0.1f);
- double num3 = 15.0;
- double num4 = 10.0;
- vector3_1 = this.\u00399AA0.get_Position();
- // ISSUE: explicit reference operation
- double num5 = (double) ((Vector3) @vector3_1).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position());
- double num6 = (double) System.Math.Max((float) num4, (float) num5);
- double num7 = (double) System.Math.Min((float) num3, (float) num6);
- Vector3 vector3_3 = Vector3.op_Addition(((Entity) Game.get_Player().get_Character()).get_Position(), Vector3.op_Multiply(Vector3.get_WorldUp(), (float) num7));
- Vector3 position = this.\u00399AA0.get_Position();
- while (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), this.\u00308AAA, this.\u00318AA0, 0.085))
- {
- int num1;
- if (THelper.Exists(this.\u00399AA0))
- {
- vector3_1 = this.\u00399AA0.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @vector3_1).DistanceTo(vector3_3) > 2.0)
- {
- num1 = 1;
- goto label_132;
- }
- }
- num1 = 0;
- label_132:
- if (num1 != 0)
- this.\u00399AA0.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(Vector3.Normalize(Vector3.op_Subtraction(vector3_3, position)), (float) num7), 0.1f), Vector3.get_WorldNorth());
- Script.Wait(10);
- }
- GameplayCamera.StopShaking();
- Game.get_Player().get_Character().get_Task().ClearAnimation(this.\u00308AAA, this.\u00318AA0);
- }
- }
- else
- {
- if (THelper.isObject(this.\u00399AA0))
- 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()));
- this.\u00351AA0(this.\u00399AA0, vector3_2);
- }
- }
- else
- this.\u00351AA0((Entity) null, this.\u0031BAA0);
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- }
- else if (this.\u0030EAAA % 50 == 0 && THelper.Exists(this.\u00399AA0))
- this.\u00361AAA(this.\u00399AA0);
- }
- this.\u00340AAA();
- this.\u00332AA0();
- }
- }
- }
- }
- private void \u00332AA0()
- {
- try
- {
- if (!this.\u00307AAA)
- return;
- bool flag1 = this.\u0039FAA0 && !this.\u0031DAA0;
- if (flag1)
- {
- int num;
- switch ((ulong) Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash())
- {
- case 2725352035:
- case 126349499:
- case 615608432:
- case 4256991824:
- case 2508868239:
- case 741814745:
- case 2874559379:
- case 883325847:
- case 1737195953:
- case 2578778090:
- case 1317494643:
- case 4191993645:
- case 1141786504:
- case 101631238:
- case 2138347493:
- case 2460120199:
- case 2227010557:
- case 2694266206:
- case 2481070269:
- num = 1;
- break;
- default:
- num = 0;
- break;
- }
- if (num != 0)
- return;
- }
- OutputArgument outputArgument = new OutputArgument();
- bool flag2 = false;
- bool flag3 = !flag1 && THelper.isButtonPressed(THelper.controls.INPUT_AIM) && THelper.isButtonJustPressed(THelper.controls.INPUT_ATTACK);
- if (flag1 && Game.get_Player().get_Character().get_IsShooting() || flag3)
- {
- this.\u0030FAAA = DateAndTime.Now;
- this.\u0031FAA0 = true;
- }
- Vector3 vector3_1 = Vector3.get_Zero();
- Prop prop1 = (Prop) null;
- Entity entity1 = (Entity) null;
- Vector3 zero = Vector3.get_Zero();
- Vector3 ᙂ1 = Vector3.get_Zero();
- Vector3 direction1 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- int num1;
- if (!flag3)
- {
- if (flag1)
- {
- if (Function.Call<bool>((Hash) 7803898169126431682L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- (InputArgument) outputArgument
- }) != null)
- goto label_13;
- }
- num1 = 0;
- goto label_14;
- }
- label_13:
- num1 = 1;
- label_14:
- if (num1 != 0)
- {
- if (!flag3)
- {
- ᙂ1 = Vector3.op_Addition((Vector3) outputArgument.GetResult<Vector3>(), direction1);
- outputArgument.Dispose();
- }
- else
- ᙂ1 = this.BEAAA;
- entity1 = this.\u00390AA0(ᙂ1, ref zero);
- if (!THelper.Exists(entity1))
- entity1 = (Entity) this.\u00362AAA(ᙂ1);
- if (flag1 && !THelper.Exists(entity1) && this.\u0033FAA0)
- {
- this.\u0033FAA0 = false;
- Vector3 direction2 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- Vector3 vector3_2 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction2, 10f));
- Vector3 vector3_3 = Vector3.op_Addition(vector3_2, Vector3.op_Multiply(direction2, 500f));
- int hash = checked ((int) Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash());
- Function.Call((Hash) -8757719191175270612L, new InputArgument[13]
- {
- InputArgument.op_Implicit((float) vector3_2.X),
- InputArgument.op_Implicit((float) vector3_2.Y),
- InputArgument.op_Implicit((float) vector3_2.Z),
- InputArgument.op_Implicit((float) vector3_3.X),
- InputArgument.op_Implicit((float) vector3_3.Y),
- InputArgument.op_Implicit((float) vector3_3.Z),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(hash),
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(0)
- });
- return;
- }
- flag2 = THelper.Exists(entity1);
- this.\u0033FAA0 = true;
- }
- if (this.\u0033FAA0 && !flag2 && (DateAndTime.Now.Subtract(this.\u0030FAAA).TotalMilliseconds < 200.0 && this.\u0031FAA0))
- {
- this.\u0030FAAA = DateAndTime.Now.Subtract(new TimeSpan(1, 1, 1));
- this.\u0031FAA0 = false;
- entity1 = this.\u00390AA0(((Entity) Game.get_Player().get_Character()).get_Position(), ref zero);
- if (!THelper.Exists(entity1))
- {
- Vector3 direction2 = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- Vector3 vector3_2 = Vector3.op_Addition(GameplayCamera.get_Position(), direction2);
- short num2 = 0;
- do
- {
- 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);
- if (!THelper.Exists((Entity) prop1))
- num2 += (short) 100;
- else
- break;
- }
- while ((int) num2 <= 2000);
- if (!THelper.Exists((Entity) prop1))
- {
- short num3 = 0;
- do
- {
- 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);
- if (!Vector3.op_Inequality(vector3_1, Vector3.get_Zero()))
- num3 += (short) 100;
- else
- break;
- }
- while ((int) num3 <= 500);
- }
- if (Vector3.op_Equality(vector3_1, Vector3.get_Zero()))
- vector3_1 = this.BEAAA;
- flag2 = Vector3.op_Inequality(vector3_1, Vector3.get_Zero()) || THelper.Exists((Entity) prop1);
- }
- else
- flag2 = true;
- }
- if (flag2 && DateAndTime.Now.Subtract(this.\u0038BAAA).TotalMilliseconds > 200.0)
- {
- this.\u0038BAAA = DateAndTime.Now;
- THelper.play3DSound(".\\scripts\\jc3 files\\hook_start.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
- if (Vector3.op_Inequality(vector3_1, Vector3.get_Zero()))
- ᙂ1 = vector3_1;
- else if (THelper.Exists((Entity) prop1))
- {
- ᙂ1 = ((Entity) prop1).get_Position();
- try
- {
- entity1 = (Entity) prop1;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- Entity entity2;
- if (!this.\u0036DAAA && THelper.Exists(entity1))
- {
- int num2;
- if (Entity.op_Inequality(entity1, (Entity) this.CFAA0))
- {
- Model model = entity1.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
- {
- num2 = 1;
- goto label_52;
- }
- }
- num2 = 0;
- label_52:
- if (num2 != 0)
- {
- this.CFAA0 = (Prop) entity1;
- this.\u00382AAA(entity1);
- }
- Prop prop2 = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
- {
- InputArgument.op_Implicit((float) ᙂ1.X),
- InputArgument.op_Implicit((float) ᙂ1.Y),
- InputArgument.op_Implicit((float) ᙂ1.Z),
- InputArgument.op_Implicit((float) (JC2.\u0038FAAA.Y * 5.0)),
- InputArgument.op_Implicit(JC2.\u0037FAA0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- if (THelper.Exists((Entity) prop2) && ((Entity) prop2).IsAttached() && !((Entity) prop2).get_IsVisible())
- {
- entity1 = (Entity) prop2;
- }
- else
- {
- Model model = entity1.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
- {
- entity2 = (Entity) null;
- return;
- }
- }
- }
- this.\u0032BAAA = DateAndTime.Now;
- if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()) && THelper.Exists(entity1) && (!THelper.isVehicle(entity1) && THelper.Exists(this.\u00399AA0)))
- {
- this.\u00399AA0 = (Entity) Game.get_Player().get_Character().get_CurrentVehicle();
- this.C9AA0 = (Entity) null;
- }
- Vector3 ᙄ;
- if (THelper.Exists(entity1))
- {
- this.\u0032BAAA = DateAndTime.Now;
- if (this.\u0031CAA0 && !THelper.Exists(this.\u00399AA0))
- {
- this.\u00399AA0 = entity1;
- this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.\u0031BAA0, this.\u00399AA0.get_Position()));
- this.\u00331AA0(false);
- this.\u00348AAA = true;
- this.\u0039AAA0(this.\u0031BAA0, this.\u00399AA0, (Entity) null, (short) 0, ᙄ);
- entity2 = (Entity) null;
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- }
- else
- {
- if (THelper.isPed(entity1))
- {
- Ped ped = (Ped) entity1;
- if (THelper.Exists((Entity) ped.get_CurrentVehicle()))
- entity1 = (Entity) ped.get_CurrentVehicle();
- }
- if (!THelper.Exists(this.\u00399AA0))
- {
- if (Entity.op_Inequality(entity1, this.\u00399AA0))
- {
- this.\u00399AA0 = entity1;
- this.C9AA0 = (Entity) null;
- this.B9AAA = zero;
- this.\u0031BAA0 = (Vector3) null;
- Entity ᙂ2 = this.\u00399AA0;
- Vector3 vector3_2 = ᙄ;
- // ISSUE: explicit reference operation
- // ISSUE: variable of a reference type
- Vector3& local = @vector3_2;
- Vector3 offsetFromWorldCoords = this.\u00399AA0.GetOffsetFromWorldCoords(this.BEAAA);
- this.\u00321AAA(ᙂ2, local, offsetFromWorldCoords);
- }
- }
- else
- {
- this.C9AA0 = entity1;
- this.\u0030BAAA = zero;
- this.\u00331AA0(false);
- this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.C9AA0.get_Position(), this.\u00399AA0.get_Position()));
- double distance = (double) World.GetDistance(this.C9AA0.get_Position(), this.\u00399AA0.get_Position());
- Rope rope = JC2.createRope(this.\u00399AA0, this.C9AA0, 1.0, distance, (Bone) -1);
- if (Entity.op_Inequality(this.\u00399AA0, this.C9AA0) && !this.BAAAA(this.\u00399AA0, this.C9AA0))
- {
- int num2;
- if (THelper.isObject(this.\u00399AA0))
- {
- Vector3 velocity = this.\u00399AA0.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() < 0.05)
- {
- num2 = 1;
- goto label_76;
- }
- }
- num2 = 0;
- label_76:
- if (num2 != 0)
- {
- this.\u00399AA0.set_FreezePosition(false);
- this.\u00399AA0.ApplyForce(Vector3.op_Subtraction(this.C9AA0.get_Position(), this.\u00399AA0.get_Position()), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
- }
- int num3;
- if (THelper.isObject(this.C9AA0))
- {
- Vector3 velocity = this.C9AA0.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() < 0.05)
- {
- num3 = 1;
- goto label_82;
- }
- }
- num3 = 0;
- label_82:
- if (num3 != 0)
- {
- this.C9AA0.set_FreezePosition(false);
- this.C9AA0.ApplyForce(Vector3.op_Subtraction(this.\u00399AA0.get_Position(), this.C9AA0.get_Position()), Vector3.op_Addition(Vector3.get_WorldNorth(), Vector3.get_WorldEast()));
- }
- if (THelper.isPed(this.\u00399AA0) || THelper.isObject(this.\u00399AA0))
- JC2.attachEntitiesToRope(rope, this.\u00399AA0, this.C9AA0, 1.0, 0.0, this.\u0030BAAA, this.B9AAA);
- else
- JC2.attachEntitiesToRope(rope, this.C9AA0, this.\u00399AA0, 1.0, 0.0, this.\u00342AAA(this.C9AA0), this.\u00342AAA(this.\u00399AA0));
- if (THelper.isPed(this.\u00399AA0) || THelper.isObject(this.\u00399AA0))
- this.\u00399AA0.ApplyForce(Vector3.op_Multiply(this.C3AA0, (float) distance));
- JC2.TEntityInRope tentityInRope = new JC2.TEntityInRope(this.\u00399AA0, this.C9AA0, rope, distance, this.\u0030BAAA, this.B9AAA);
- if (THelper.isPed(this.C9AA0) || THelper.isObject(this.C9AA0))
- this.C9AA0.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(this.C3AA0, (float) distance), -1f));
- this.C9AA0 = (Entity) null;
- this.\u00399AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- }
- else
- {
- this.C9AA0 = (Entity) null;
- this.\u00399AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- }
- }
- }
- }
- else
- {
- this.\u0031BAA0 = ᙂ1;
- if (!THelper.Exists(this.\u00399AA0))
- {
- if (this.\u0031CAA0)
- {
- this.\u0031BAA0 = (Vector3) null;
- this.\u00331AA0(false);
- }
- else
- this.\u00321AAA((Entity) null, ref this.\u0031BAA0, ᙄ);
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- }
- else
- {
- this.C3AA0 = Vector3.Normalize(Vector3.op_Subtraction(this.\u0031BAA0, this.\u00399AA0.get_Position()));
- this.\u00331AA0(false);
- this.\u0039AAA0(this.\u0031BAA0, this.\u00399AA0, (Entity) null, (short) 0, ᙄ);
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- UI.ShowSubtitle("Hook creation error: " + ex.Message);
- this.\u00331AA0(false);
- this.\u00399AA0 = (Entity) null;
- this.C9AA0 = (Entity) null;
- this.\u0031BAA0 = (Vector3) null;
- ProjectData.ClearProjectError();
- }
- }
- private Vector3 \u00342AAA(Entity ᙂ)
- {
- int index = checked (JC2.BFAAA.Count - 1);
- while (index >= 0)
- {
- try
- {
- if (JC2.BFAAA[index].ent.get_Handle() == ᙂ.get_Handle())
- return JC2.BFAAA[index].offset;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- return Vector3.get_Zero();
- }
- private static void \u00352AA0(Entity ᙂ)
- {
- int index = checked (JC2.BFAAA.Count - 1);
- while (index >= 0)
- {
- try
- {
- if (JC2.BFAAA[index].ent.get_Handle() == ᙂ.get_Handle())
- throw new Exception("finish");
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- JC2.BFAAA.RemoveAt(index);
- ProjectData.ClearProjectError();
- }
- checked { index += -1; }
- }
- }
- private Prop \u00362AAA(Vector3 ᙂ)
- {
- OutputArgument outputArgument = new OutputArgument();
- int num = (int) Function.Call<int>((Hash) 5730343094349521110L, new InputArgument[0]);
- try
- {
- if ((bool) Function.Call<bool>((Hash) 2987514272108589712L, new InputArgument[2]
- {
- InputArgument.op_Implicit(num),
- (InputArgument) outputArgument
- }))
- {
- Prop result = (Prop) outputArgument.GetResult<Prop>();
- if (THelper.Exists((Entity) result))
- return result;
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- return (Prop) null;
- }
- private void \u00372AA0()
- {
- if (this.\u0036DAAA)
- return;
- try
- {
- if (Game.get_Player().get_IsAiming())
- {
- OutputArgument outputArgument = new OutputArgument();
- if ((bool) Function.Call<bool>((Hash) 2987514272108589712L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player()),
- (InputArgument) outputArgument
- }))
- {
- Prop result = (Prop) outputArgument.GetResult<Prop>();
- int num;
- if (THelper.Exists((Entity) result))
- {
- Model model = ((Entity) result).get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_Hash() == JC2.\u0036FAAA)
- {
- num = 1;
- goto label_7;
- }
- }
- num = 0;
- label_7:
- if (num != 0 && Entity.op_Inequality((Entity) this.CFAA0, (Entity) result))
- {
- this.CFAA0 = result;
- this.\u00382AAA((Entity) result);
- }
- }
- else
- {
- Vector3 direction = THelper.RotationToDirection(GameplayCamera.get_Rotation());
- Vector3 vector3_1 = Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(direction, 30f));
- Vector3 vector3_2 = vector3_1;
- Prop prop = (Prop) null;
- // ISSUE: explicit reference operation
- for (; (double) ((Vector3) @vector3_1).DistanceTo(vector3_2) < 50.0; vector3_1 = Vector3.op_Addition(vector3_1, Vector3.op_Multiply(direction, 4f)))
- {
- Vector3 groundPos = THelper.getGroundPos(Vector3.op_Addition(vector3_1, Vector3.op_Multiply(Vector3.get_WorldUp(), 50f)));
- prop = (Prop) Function.Call<Prop>((Hash) -2214651566572027031L, new InputArgument[8]
- {
- InputArgument.op_Implicit((float) groundPos.X),
- InputArgument.op_Implicit((float) groundPos.Y),
- InputArgument.op_Implicit((float) groundPos.Z),
- InputArgument.op_Implicit(5.0),
- InputArgument.op_Implicit(JC2.\u0036FAAA),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(1)
- });
- if (THelper.Exists((Entity) prop))
- break;
- }
- if (THelper.Exists((Entity) prop) && Entity.op_Inequality((Entity) this.CFAA0, (Entity) prop))
- {
- this.CFAA0 = prop;
- this.\u00382AAA((Entity) prop);
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- private void \u00382AAA(Entity ᙂ)
- {
- if (this.\u0036DAAA)
- return;
- List<Prop> propList = new List<Prop>();
- int index1 = checked (this.\u0030GAAA.Count - 1);
- while (index1 >= 0)
- {
- try
- {
- Prop prop = this.\u0030GAAA[index1];
- int num;
- if (THelper.Exists((Entity) prop) && ((Entity) prop).IsAttached())
- {
- if (Function.Call<bool>((Hash) -1171374017519995096L, new InputArgument[2]
- {
- InputArgument.op_Implicit(prop),
- InputArgument.op_Implicit(ᙂ)
- }) != null)
- {
- num = 1;
- goto label_7;
- }
- }
- num = 0;
- label_7:
- if (num != 0)
- {
- int index2 = checked (JC2.\u0035BAA0.Count - 1);
- while (index2 >= 0)
- {
- JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[index2];
- if (Entity.op_Equality(tentityInRope.p1, (Entity) prop) || Entity.op_Equality(tentityInRope.p2, (Entity) prop))
- tentityInRope.remove();
- checked { index2 += -1; }
- }
- ((Entity) prop).Detach();
- propList.Add(prop);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- checked { index1 += -1; }
- }
- THelper.requestModel("", (long) JC2.\u0037FAA0, (short) 500, true);
- Vector3 position = ᙂ.get_Position();
- // ISSUE: explicit reference operation
- Vector3 vector3_1 = Vector3.op_Addition(((Vector3) @position).Around(15f), Vector3.op_Multiply(Vector3.get_WorldDown(), 35f));
- bool flag = false;
- short num1 = 1;
- Vector3 vector3_2;
- do
- {
- Prop prop1;
- if (propList.Count > 0)
- {
- prop1 = propList[0];
- propList.RemoveAt(0);
- }
- else
- prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
- Script.Wait(10);
- if (THelper.Exists((Entity) prop1))
- {
- this.\u0030GAAA.Add(prop1);
- ((Entity) prop1).set_IsVisible(flag);
- Prop prop2 = prop1;
- Prop cfaA0 = this.CFAA0;
- int num2 = 1;
- // ISSUE: explicit reference operation
- ((Vector3) @position).\u002Ector(0.0f, 0.0f, (float) (JC2.\u0038FAAA.Y * (double) num1 - (double) JC2.\u0038FAAA.Y * 0.5));
- Vector3 vector3_3 = position;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector(90f, 0.0f, 0.0f);
- Vector3 vector3_4 = vector3_2;
- ((Entity) prop2).AttachTo((Entity) cfaA0, num2, vector3_3, vector3_4);
- Script.Wait(10);
- }
- num1 += (short) 2;
- }
- while ((int) num1 <= 7);
- short num3 = 1;
- do
- {
- Prop prop1;
- if (propList.Count > 0)
- {
- prop1 = propList[0];
- propList.RemoveAt(0);
- }
- else
- prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
- Script.Wait(10);
- if (THelper.Exists((Entity) prop1))
- {
- this.\u0030GAAA.Add(prop1);
- ((Entity) prop1).set_IsVisible(flag);
- double num2 = JC2.\u0038FAAA.Y * (double) num3 - (double) JC2.\u0038FAAA.Y * 0.5;
- Prop prop2 = prop1;
- Prop cfaA0 = this.CFAA0;
- int num4 = 1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector((float) (num2 * 0.9), 0.0f, (float) (num2 * -0.6));
- Vector3 vector3_3 = vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @position).\u002Ector(90f, 120f, 0.0f);
- Vector3 vector3_4 = position;
- ((Entity) prop2).AttachTo((Entity) cfaA0, num4, vector3_3, vector3_4);
- Script.Wait(10);
- }
- num3 += (short) 2;
- }
- while ((int) num3 <= 7);
- short num5 = 1;
- do
- {
- Prop prop1;
- if (propList.Count > 0)
- {
- prop1 = propList[0];
- propList.RemoveAt(0);
- }
- else
- prop1 = World.CreateProp(Model.op_Implicit(JC2.\u0037FAA0), vector3_1, false, false);
- Script.Wait(10);
- if (THelper.Exists((Entity) prop1))
- {
- this.\u0030GAAA.Add(prop1);
- ((Entity) prop1).set_IsVisible(flag);
- double num2 = JC2.\u0038FAAA.Y * (double) num5 - (double) JC2.\u0038FAAA.Y * 0.5;
- Prop prop2 = prop1;
- Prop cfaA0 = this.CFAA0;
- int num4 = 1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector((float) (num2 * -0.9), 0.0f, (float) (num2 * -0.6));
- Vector3 vector3_3 = vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @position).\u002Ector(90f, 240f, 0.0f);
- Vector3 vector3_4 = position;
- ((Entity) prop2).AttachTo((Entity) cfaA0, num4, vector3_3, vector3_4);
- Script.Wait(10);
- }
- num5 += (short) 2;
- }
- while ((int) num5 <= 7);
- }
- private void \u00392AA0()
- {
- if (!this.\u0035GAA0)
- {
- if (!THelper.Exists((Entity) JC2.\u0036GAAA))
- return;
- ((Entity) JC2.\u0036GAAA).Delete();
- JC2.\u0036GAAA = (Prop) null;
- }
- else
- {
- if (!THelper.Exists((Entity) JC2.\u0036GAAA))
- {
- JC2.\u0036GAAA = World.CreateProp(JC2.\u00317AA0, THelper.getCreationPos(15.0, 15.0), false, false);
- Script.Wait(10);
- }
- if (THelper.Exists((Entity) JC2.\u0036GAAA))
- {
- Prop prop = JC2.\u0036GAAA;
- Ped character = Game.get_Player().get_Character();
- int boneIndexEnt1 = 0;
- int boneIndex = Game.get_Player().get_Character().GetBoneIndex((Bone) 57005);
- Vector3 vector3_1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(0.12f, 0.02f, -0.06f);
- Vector3 offset = vector3_1;
- Vector3 vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector(40f, 0.0f, 40f);
- Vector3 rot = vector3_2;
- int num1 = 0;
- int num2 = 0;
- int num3 = 0;
- int num4 = 0;
- int num5 = 1;
- THelper.attachEntToEnt((Entity) prop, (Entity) character, boneIndexEnt1, boneIndex, offset, rot, num1 != 0, num2 != 0, num3 != 0, num4 != 0, num5 != 0);
- }
- }
- }
- private void B2AAA()
- {
- int index = checked (JC2.\u0038GAAA.Count - 1);
- while (index >= 0)
- {
- JC2.\u0038GAAA[index].tick();
- checked { index += -1; }
- }
- if (!this.C6AA0)
- return;
- if (THelper.isButtonJustPressed(THelper.controls.INPUT_SELECT_WEAPON_UNARMED) && Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash() == -1569615261)
- {
- this.\u0035GAA0 = !this.\u0035GAA0;
- this.\u00392AA0();
- }
- if (this.\u0035GAA0)
- {
- if (Game.get_Player().get_Character().get_Weapons().get_Current().get_Hash() != -1569615261)
- {
- this.\u0035GAA0 = false;
- this.\u00392AA0();
- }
- else
- {
- 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());
- // ISSUE: explicit reference operation
- if (((RaycastResult) @raycastResult).get_DitHitEntity())
- {
- // ISSUE: explicit reference operation
- Entity hitEntity = ((RaycastResult) @raycastResult).get_HitEntity();
- Vector2 pos2dOffset;
- // ISSUE: explicit reference operation
- THelper.draw3dText("X", ((RaycastResult) @raycastResult).get_HitCoords(), pos2dOffset, Color.CornflowerBlue, true, true, 0.3, 0);
- // ISSUE: explicit reference operation
- Vector3 hitCoords = ((RaycastResult) @raycastResult).get_HitCoords();
- // ISSUE: explicit reference operation
- Vector3 surfaceNormal = ((RaycastResult) @raycastResult).get_SurfaceNormal();
- Vector3.op_Addition(hitCoords, surfaceNormal);
- Vector3 pos = hitCoords;
- double num = 0.0;
- do
- {
- pos = Vector3.op_Addition(pos, Vector3.op_Multiply(surfaceNormal, 0.1f));
- THelper.draw3dText("o", pos, pos2dOffset, Color.CornflowerBlue, true, true, 0.3 - num * 0.25, 0);
- num += 0.1;
- }
- while (num <= 0.5);
- if (THelper.isButtonJustPressed(THelper.controls.INPUT_ATTACK))
- {
- JC2.ᙄ ᙄ = new JC2.ᙄ(hitEntity, hitCoords, surfaceNormal);
- UI.ShowSubtitle("Press " + this.\u00369AAA.ToString() + " to trigger the C4 bomb");
- }
- }
- }
- }
- }
- private bool C2AA0()
- {
- if (!THelper._iskeyPressed(this.\u00366AAA) && !THelper.isButtonPressed(THelper.controls.INPUT_JUMP) || !true)
- return false;
- Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- // ISSUE: explicit reference operation
- this.\u0034DAAA = (double) ((Vector3) @velocity).Length() * 0.5;
- if (this.\u0034DAAA > 20.0)
- this.\u0034DAAA = 20.0;
- return true;
- }
- private void \u00303AAA()
- {
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
- this.\u00331AA0(false);
- Function.Call((Hash) -4679285206957010997L, new InputArgument[5]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(THelper.parachuteHash()),
- InputArgument.op_Implicit(1),
- InputArgument.op_Implicit(100),
- InputArgument.op_Implicit(100)
- });
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- ((Entity) Game.get_Player().get_Character()).set_Heading((float) THelper.directionToHeading(THelper.RotationToDirection(GameplayCamera.get_Rotation())));
- 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));
- Function.Call((Hash) -5530938096517132230L, new InputArgument[4]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit((float) vector3.X),
- InputArgument.op_Implicit((float) vector3.Y),
- InputArgument.op_Implicit((float) vector3.Z)
- });
- this.\u0033DAA0 = true;
- this.\u0032DAAA = DateAndTime.Now;
- ((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)));
- }
- private bool \u00313AA0()
- {
- if (this.\u0033CAA0 || !this.\u0038A0AA)
- return false;
- Vehicle currentVehicle = Game.get_Player().get_Character().get_CurrentVehicle();
- if (THelper.Exists((Entity) currentVehicle))
- {
- Model model1 = ((Entity) currentVehicle).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBicycle())
- {
- Model model2 = ((Entity) currentVehicle).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBike())
- goto label_6;
- }
- }
- int num;
- if (THelper._iskeyPressed(Keys.E) || THelper.usingController() && THelper.isButtonJustPressed(THelper.controls.INPUT_SPRINT))
- {
- num = 1;
- goto label_8;
- }
- label_6:
- num = 0;
- label_8:
- return num != 0;
- }
- private void \u00323AAA()
- {
- this.\u0030A0AA = Vector3.get_Zero();
- this.CHAA0 = Vector3.get_Zero();
- ((Entity) Game.get_Player().get_Character()).Detach();
- this.BHAAA = World.CreateProp(this.\u0039HAA0, THelper.getCreationPos(15.0, 15.0), false, false);
- Script.Wait(10);
- THelper.getSoundID(ref this.\u0034HAAA);
- THelper.setEntityProofs((Entity) Game.get_Player().get_Character(), false, false, false, false, false, false, false, false);
- if (!THelper.Exists((Entity) this.BHAAA))
- return;
- ((Entity) this.BHAAA).set_IsVisible(false);
- Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- Vector3 rotation = GameplayCamera.get_Rotation();
- rotation.X = (__Null) 0.0;
- rotation.Y = (__Null) 0.0;
- ((Entity) this.BHAAA).AttachTo((Entity) Game.get_Player().get_Character(), 0);
- Script.Wait(10);
- ((Entity) this.BHAAA).Detach();
- Script.Wait(10);
- ((Entity) this.BHAAA).set_Rotation(rotation);
- this.\u0036HAAA = ((Entity) this.BHAAA).get_Rotation();
- this.\u0038HAAA = 0.0;
- Ped character = Game.get_Player().get_Character();
- Prop bhaaa = this.BHAAA;
- int boneIndexEnt1 = 0;
- int boneIndexEnt2 = 0;
- Vector3 vector3_1;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_1).\u002Ector(0.0f, -0.15f, 0.0f);
- Vector3 offset = vector3_1;
- Vector3 vector3_2;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_2).\u002Ector(0.0f, 0.0f, 0.0f);
- Vector3 rot = vector3_2;
- int num1 = 0;
- int num2 = 0;
- int num3 = 0;
- int num4 = 1;
- int num5 = 1;
- THelper.attachEntToEnt((Entity) character, (Entity) bhaaa, boneIndexEnt1, boneIndexEnt2, offset, rot, num1 != 0, num2 != 0, num3 != 0, num4 != 0, num5 != 0);
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- Game.get_Player().get_Character().set_CanRagdoll(false);
- Game.get_Player().get_Character().set_CanRagdoll(true);
- THelper.anim_playPedAnim(this.CGAA0.dict, "dive_walk_start", 8.0, THelper.animFlags.repeat | THelper.animFlags.enablePlCtrl, true);
- THelper.play3DSound(".\\scripts\\jc3 files\\wingsuit_start.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
- THelper.setEntRecordsCollision((Entity) this.BHAAA, false);
- THelper.setEntRecordsCollision((Entity) this.BHAAA, true);
- ((Entity) this.BHAAA).set_IsVisible(false);
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- // ISSUE: explicit reference operation
- ((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)));
- if (this.\u0034HAAA > -1)
- THelper.playSoundFromEntity(this.\u0034HAAA, "Plane_Wind", (Entity) this.BHAAA, "DLC_Pilot_Chase_Parachute_Sounds");
- this.\u00333AA0();
- Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- });
- this.\u0031A0A0 = DateAndTime.Now;
- }
- private void \u00333AA0()
- {
- // ISSUE: explicit reference operation
- THelper.clearObjects(((Model) @this.\u00327AAA).get_Hash(), ((Entity) Game.get_Player().get_Character()).get_Position(), 3.0, (Entity) null);
- // ISSUE: explicit reference operation
- THelper.clearObjects(((Model) @this.\u00337AA0).get_Hash(), ((Entity) Game.get_Player().get_Character()).get_Position(), 3.0, (Entity) null);
- Vector3 offset;
- // ISSUE: explicit reference operation
- ((Vector3) @offset).\u002Ector(0.26f, 0.01f, -0.15f);
- Vector3 rot;
- // ISSUE: explicit reference operation
- ((Vector3) @rot).\u002Ector(-80f, -4f, 14f);
- Prop prop1 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
- if (THelper.Exists((Entity) prop1))
- {
- this.\u00347AAA.Add(prop1);
- 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);
- }
- Prop prop2 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
- if (THelper.Exists((Entity) prop2))
- {
- this.\u00347AAA.Add(prop2);
- // ISSUE: explicit reference operation
- ((Vector3) @offset).\u002Ector(0.419f, 0.06f, -0.1f);
- // ISSUE: explicit reference operation
- ((Vector3) @rot).\u002Ector(-87f, -10f, 25f);
- 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);
- }
- Prop prop3 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
- if (THelper.Exists((Entity) prop3))
- {
- this.\u00347AAA.Add(prop3);
- // ISSUE: explicit reference operation
- ((Vector3) @offset).\u002Ector(0.399f, 0.08f, 0.11f);
- // ISSUE: explicit reference operation
- ((Vector3) @rot).\u002Ector(-113f, 7f, 25f);
- 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);
- }
- Prop prop4 = World.CreateProp(this.\u00327AAA, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
- if (THelper.Exists((Entity) prop4))
- {
- this.\u00347AAA.Add(prop4);
- // ISSUE: explicit reference operation
- ((Vector3) @offset).\u002Ector(0.219f, 0.0099f, 0.14f);
- // ISSUE: explicit reference operation
- ((Vector3) @rot).\u002Ector(-113f, 9f, 15f);
- 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);
- }
- Prop prop5 = World.CreateProp(this.\u00337AA0, Vector3.op_Addition(GameplayCamera.get_Position(), Vector3.op_Multiply(Vector3.get_WorldDown(), 50f)), false, false);
- if (!THelper.Exists((Entity) prop5))
- return;
- this.\u00347AAA.Add(prop5);
- // ISSUE: explicit reference operation
- ((Vector3) @offset).\u002Ector(0.08f, -0.159f, 0.0f);
- // ISSUE: explicit reference operation
- ((Vector3) @rot).\u002Ector(180f, -90f, 0.0f);
- 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);
- }
- private void \u00343AAA()
- {
- this.\u0039GAA0 = false;
- Function.Call((Hash) -6222817867460529944L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(0)
- });
- if (this.\u0034HAAA > -1)
- THelper.stopSound(this.\u0034HAAA);
- if (Operators.CompareString(this.\u0032HAAA, "", false) != 0)
- THelper.anim_stopPedAnim(this.\u0033HAA0, this.\u0032HAAA, 2.0);
- GameplayCamera.StopShaking();
- try
- {
- foreach (Prop prop in this.\u00347AAA)
- {
- try
- {
- if (THelper.Exists((Entity) prop))
- {
- ((Entity) prop).Detach();
- ((Entity) prop).Delete();
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- List<Prop>.Enumerator enumerator;
- enumerator.Dispose();
- }
- this.\u00347AAA.Clear();
- if (!THelper.Exists((Entity) this.BHAAA))
- return;
- Vector3 velocity = ((Entity) this.BHAAA).get_Velocity();
- ((Entity) Game.get_Player().get_Character()).Detach();
- ((Entity) this.BHAAA).Delete();
- this.BHAAA = (Prop) null;
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- ((Entity) Game.get_Player().get_Character()).set_Velocity(velocity);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() > 15.0)
- THelper.setPedToRagdoll(Game.get_Player().get_Character(), (short) 1000, (short) 1000, (short) 0, true, true, false);
- }
- private void \u00353AA0()
- {
- if (this.\u0036A0AA == null)
- {
- this.\u0036A0AA = World.CreateCamera(GameplayCamera.get_Position(), GameplayCamera.get_Rotation(), 70f);
- this.\u0037A0A0 = Vector3.Normalize(((Entity) Game.get_Player().get_Character()).GetOffsetFromWorldCoords(GameplayCamera.get_Position()));
- }
- else
- {
- World.set_RenderingCamera(this.\u0036A0AA);
- 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));
- this.\u0036A0AA.AttachTo(Game.get_Player().get_Character(), 0, Vector3.op_Multiply(this.\u0037A0A0, 4f));
- this.\u0036A0AA.PointAt((Entity) Game.get_Player().get_Character());
- }
- }
- private void \u00363AAA()
- {
- if (this.\u0036A0AA == null)
- return;
- World.set_RenderingCamera((Camera) null);
- this.\u0036A0AA.Destroy();
- this.\u0036A0AA = (Camera) null;
- }
- private void \u00373AA0()
- {
- if (!this.C6AA0 || !this.\u0038A0AA)
- return;
- if (!this.\u0039GAA0)
- {
- this.\u00363AAA();
- if ((int) THelper.getParachuteState() > 0)
- {
- if (!this.\u00313AA0())
- return;
- Function.Call((Hash) 5231435679784720824L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(THelper.parachuteHash())
- });
- this.\u0035A0A0 = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- this.\u0039GAA0 = true;
- return;
- }
- }
- if (this.C2AA0() && this.\u0039GAA0)
- {
- Vector3 vector3 = !THelper.Exists((Entity) this.BHAAA) ? ((Entity) Game.get_Player().get_Character()).get_Velocity() : ((Entity) this.BHAAA).get_Velocity();
- this.\u00343AAA();
- this.\u00303AAA();
- ((Entity) Game.get_Player().get_Character()).set_Velocity(vector3);
- }
- else
- {
- if (this.\u0039GAA0)
- {
- this.\u00353AA0();
- Function.Call((Hash) -5134454549476615409L, new InputArgument[1]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character())
- });
- Function.Call((Hash) -6222817867460529944L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(1)
- });
- Function.Call((Hash) 8028090550332432527L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(true)
- });
- if ((bool) Function.Call<bool>((Hash) -8220001501650343748L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(THelper.parachuteHash())
- }))
- Function.Call((Hash) 5231435679784720824L, new InputArgument[2]
- {
- InputArgument.op_Implicit(Game.get_Player().get_Character()),
- InputArgument.op_Implicit(THelper.parachuteHash())
- });
- if (!THelper.Exists((Entity) this.BHAAA))
- {
- this.\u00323AAA();
- return;
- }
- ((Entity) this.BHAAA).set_IsVisible(false);
- ((Entity) Game.get_Player().get_Character()).set_IsVisible(true);
- Vector3 velocity = ((Entity) this.BHAAA).get_Velocity();
- velocity.Z = (__Null) 0.0;
- 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();
- if (!this.\u0039GAA0)
- {
- this.\u00343AAA();
- return;
- }
- bool flag1 = THelper.isButtonPressed(THelper.controls.INPUT_MOVE_UP_ONLY);
- bool flag2 = THelper.isButtonPressed(THelper.controls.INPUT_MOVE_DOWN_ONLY);
- bool flag3 = THelper.isButtonPressed(THelper.controls.INPUT_VEH_MOVE_LEFT_ONLY);
- bool flag4 = THelper.isButtonPressed(THelper.controls.INPUT_VEH_MOVE_RIGHT_ONLY);
- Vector3 rotation = ((Entity) this.BHAAA).get_Rotation();
- rotation.X = (__Null) 0.0;
- rotation.Y = (__Null) 0.0;
- Vector3 direction1 = THelper.RotationToDirection(rotation);
- direction1.Z = (__Null) 0.0;
- string sAnim = "free_forward";
- THelper.TAnimDict tanimDict = this.\u0030HAAA;
- double num1 = -1.0;
- Vector3 vector3_1 = Vector3.op_Multiply(direction1, 0.1f);
- Vector3 vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 0.5f);
- if (flag1)
- {
- vector3_1 = Vector3.op_Multiply(vector3_1, 0.5f);
- vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 2.5f);
- this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((-55.0 - this.\u0037HAA0.X) * 0.05));
- if (this.\u0032A0AA < 10.0)
- this.\u0032A0AA = this.\u0032A0AA + 0.3;
- }
- else if (flag2)
- {
- if (this.\u0032A0AA > 0.0)
- {
- vector3_2 = Vector3.op_Multiply(Vector3.op_Multiply(Vector3.get_WorldDown(), -1.5f), (float) (this.\u0032A0AA / 10.0));
- this.\u0030A0AA.Z = (__Null) (1.5 * (this.\u0032A0AA / 10.0));
- this.\u0032A0AA = this.\u0032A0AA - 0.1;
- }
- else
- {
- vector3_1 = Vector3.op_Multiply(vector3_1, 0.35f);
- vector3_2 = Vector3.op_Multiply(Vector3.get_WorldDown(), 0.8f);
- }
- this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((45.0 - this.\u0037HAA0.X) * 0.05));
- }
- else
- {
- this.\u0037HAA0.X = (__Null) (double) ((float) (double) this.\u0037HAA0.X + (float) ((5.0 - this.\u0037HAA0.X) * 0.05));
- if (this.\u0032A0AA < 10.0)
- this.\u0032A0AA = this.\u0032A0AA + 0.1;
- }
- this.\u0037HAA0.Z = this.\u0036HAAA.Z;
- if (flag3)
- {
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 11.5f);
- if (flag1)
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 2.5f);
- else if (flag2)
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z + 0.5f);
- if (this.\u0038HAAA > -10.0)
- this.\u0038HAAA = this.\u0038HAAA - 1.5;
- else if (this.\u0038HAAA > -45.0)
- this.\u0038HAAA = this.\u0038HAAA - 3.0;
- Vector3 rot = ((Entity) this.BHAAA).get_Rotation();
- rot.Y = (__Null) 0.0;
- rot.X = (__Null) 0.0;
- rot.Z = (__Null) (rot.Z + 90.0);
- rot = THelper.RotationToDirection(rot);
- ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(rot, 1f));
- }
- else if (flag4)
- {
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 11.5f);
- if (flag1)
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 2.5f);
- else if (flag2)
- this.\u0037HAA0.Z = (__Null) (double) ((float) (double) this.\u0037HAA0.Z - 0.5f);
- if (this.\u0038HAAA < 15.0)
- this.\u0038HAAA = this.\u0038HAAA + 1.5;
- else if (this.\u0038HAAA < 45.0)
- this.\u0038HAAA = this.\u0038HAAA + 3.0;
- Vector3 rot = ((Entity) this.BHAAA).get_Rotation();
- rot.Y = (__Null) 0.0;
- rot.X = (__Null) 0.0;
- rot.Z = (__Null) (rot.Z - 90.0);
- rot = THelper.RotationToDirection(rot);
- ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(rot, 1f));
- }
- else if (System.Math.Abs(this.\u0038HAAA) > 1.0)
- {
- this.\u0038HAAA = this.\u0038HAAA * 0.95;
- if (this.\u0038HAAA > 10.0)
- this.\u0037HAA0.Z = (__Null) (this.\u0037HAA0.Z - 2.0);
- else if (this.\u0038HAAA < -10.0)
- this.\u0037HAA0.Z = (__Null) (this.\u0037HAA0.Z + 2.0);
- }
- else
- this.\u0038HAAA = 0.0;
- this.\u0032HAAA = sAnim;
- this.\u0033HAA0 = tanimDict.dict;
- Ped character = Game.get_Player().get_Character();
- Prop bhaaa = this.BHAAA;
- int boneIndexEnt1 = 0;
- int boneIndexEnt2 = 0;
- Vector3 vector3_3;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_3).\u002Ector(0.0f, -0.15f, 0.0f);
- Vector3 offset = vector3_3;
- Vector3 vector3_4;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_4).\u002Ector((float) this.\u0033A0A0, 0.0f, 0.0f);
- Vector3 rot1 = vector3_4;
- int num2 = 0;
- int num3 = 0;
- int num4 = 0;
- int num5 = 1;
- int num6 = 1;
- THelper.attachEntToEnt((Entity) character, (Entity) bhaaa, boneIndexEnt1, boneIndexEnt2, offset, rot1, num2 != 0, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
- if (!THelper.anim_isPlayingPedAnim(tanimDict.dict, sAnim, 1.0))
- {
- if (!THelper.anim_isPlayingPedAnim(this.CGAA0.dict, "dive_walk_start", 0.5))
- {
- if (THelper.timeSinceLastAnimPlay() > 200.0)
- THelper.anim_playPedAnim(tanimDict.dict, sAnim, 7.0, THelper.animFlags.repeat | THelper.animFlags.enablePlCtrl, true);
- }
- else
- {
- this.\u0033A0A0 = -25.0;
- THelper.anim_setAnimSpeed(this.CGAA0.dict, "dive_walk_start", 1.3);
- if (THelper.anim_getAnimTime(this.CGAA0.dict, "dive_walk_start") < 0.2)
- THelper.anim_setAnimTime(this.CGAA0.dict, "dive_walk_start", 0.2);
- }
- }
- else
- {
- if (this.\u0033A0A0 < 0.0)
- this.\u0033A0A0 = this.\u0033A0A0 + 2.0;
- double num7 = THelper.anim_getAnimTime(tanimDict.dict, sAnim);
- if (num1 > -1.0)
- {
- if (num7 < num1 - 0.015 || num7 < 0.0)
- this.\u0031HAA0 = (short) 1;
- else if (num7 > num1 + 0.015 || num7 > 1.0)
- this.\u0031HAA0 = (short) -1;
- if (System.Math.Abs(num7 - num1) > 0.1)
- num7 = num1;
- double time = num7 + (0.0001 + JC2.\u00306AAA.NextDouble() * 0.0001) * (double) this.\u0031HAA0;
- THelper.anim_setAnimTime(tanimDict.dict, sAnim, time);
- THelper.anim_setAnimSpeed(tanimDict.dict, sAnim, 0.0);
- }
- }
- Vector3 direction2 = THelper.RotationToDirection(this.\u0036HAAA);
- Vector3 direction3 = THelper.RotationToDirection(this.\u0037HAA0);
- this.\u0036HAAA = THelper.directionToRotation(Vector3.op_Addition(direction2, Vector3.op_Multiply(Vector3.op_Subtraction(direction3, direction2), 0.1f)), 0.0);
- rotation = this.\u0036HAAA;
- rotation.Y = (__Null) this.\u0038HAAA;
- ((Entity) this.BHAAA).set_Rotation(rotation);
- // ISSUE: explicit reference operation
- // ISSUE: explicit reference operation
- double num8 = (double) ((Vector3) @velocity).Length() >= 20.0 ? ((double) ((Vector3) @velocity).Length() >= 40.0 ? 1.0 : 0.5) : 0.1;
- if (this.\u0035HAA0 != num8)
- {
- this.\u0035HAA0 = num8;
- GameplayCamera.Shake((CameraShake) 8, (float) this.\u0035HAA0);
- }
- 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));
- 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));
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @this.\u0035A0A0).Length() > 0.5)
- {
- // ISSUE: explicit reference operation
- ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(THelper.RotationToDirection(((Entity) this.BHAAA).get_Rotation()), ((Vector3) @this.\u0035A0A0).Length()));
- this.\u0035A0A0 = Vector3.op_Multiply(this.\u0035A0A0, 0.98f);
- }
- else
- {
- ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(this.CHAA0, 20f), (float) this.\u0034A0AA));
- ((Entity) this.BHAAA).ApplyForce(Vector3.op_Multiply(this.\u0030A0AA, (float) this.\u0034A0AA));
- }
- if (this.\u0034A0AA < 1.0)
- {
- this.\u0034A0AA = this.\u0034A0AA + 0.005;
- if (this.\u0034A0AA > 1.0)
- this.\u0034A0AA = 1.0;
- }
- this.\u0039A0A0 = true;
- }
- else
- {
- this.\u0034A0AA = 0.0;
- int num;
- 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)))
- {
- Vector3 velocity = ((Entity) Game.get_Player().get_Character()).get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() > 15.0)
- {
- if (THelper.Exists((Entity) Game.get_Player().get_Character().get_CurrentVehicle()))
- {
- Model model1 = ((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model1).get_IsBicycle())
- {
- Model model2 = ((Entity) Game.get_Player().get_Character().get_CurrentVehicle()).get_Model();
- // ISSUE: explicit reference operation
- if (!((Model) @model2).get_IsBike())
- goto label_87;
- }
- }
- num = 1;
- goto label_89;
- }
- }
- label_87:
- num = 0;
- label_89:
- if (num != 0)
- {
- if (this.\u0039A0A0)
- {
- this.\u0039A0A0 = false;
- this.BA0AA = DateAndTime.Now;
- }
- if (this.\u00313AA0())
- {
- this.\u0039GAA0 = true;
- this.\u0035A0A0 = Vector3.op_Multiply(((Entity) Game.get_Player().get_Character()).get_Velocity(), 0.1f);
- }
- }
- else
- this.\u0039A0A0 = true;
- }
- if (this.\u0038A0AA && !this.\u0039A0A0 && !this.\u0033CAA0 && DateAndTime.Now.Subtract(this.BA0AA).TotalMilliseconds < 5000.0)
- {
- if (THelper.usingController())
- UI.ShowSubtitle("Prees A to use the Wingsuit", 100);
- else
- UI.ShowSubtitle("Prees E to use the Wingsuit", 100);
- }
- }
- }
- private static JC2.TEntityInRope \u00383AAA(Entity ᙂ, Entity \u0031AAAA)
- {
- int index = checked (JC2.\u0035BAA0.Count - 1);
- while (index >= 0)
- {
- JC2.TEntityInRope tentityInRope = JC2.\u0035BAA0[index];
- 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())
- return tentityInRope;
- checked { index += -1; }
- }
- return (JC2.TEntityInRope) null;
- }
- public class TGasObjects
- {
- private DateTime \u00393AA0;
- private Prop B3AAA;
- private Vector3 C3AA0;
- private int \u00304AAA;
- private int \u00314AA0;
- private int \u00324AAA;
- private Entity \u00334AA0;
- private DateTime \u00344AAA;
- public TGasObjects(Entity o, Entity e2)
- {
- this.\u00393AA0 = DateAndTime.Now;
- this.B3AAA = (Prop) null;
- this.\u00304AAA = 0;
- this.\u00314AA0 = -1;
- this.\u00324AAA = -1;
- this.\u00334AA0 = (Entity) null;
- this.\u00344AAA = DateAndTime.Now;
- try
- {
- if (!THelper.isObject(o))
- throw new Exception("");
- if (JC2.\u00358AA0.Contains((Prop) o))
- throw new Exception("");
- if (!THelper.isObject(o))
- return;
- this.\u00334AA0 = e2;
- this.B3AAA = (Prop) o;
- this.\u00393AA0 = DateAndTime.Now;
- // ISSUE: explicit reference operation
- ((Vector3) @this.C3AA0).\u002Ector((float) JC2.\u00306AAA.NextDouble(), (float) JC2.\u00306AAA.NextDouble(), 1f);
- Function.Call((Hash) 7798175403732277905L, new InputArgument[1]
- {
- InputArgument.op_Implicit("scr_exile2")
- });
- this.\u00314AA0 = (int) Function.Call<int>((Hash) 1937722214304277783L, new InputArgument[12]
- {
- InputArgument.op_Implicit("scr_ex2_jeep_engine_fire"),
- InputArgument.op_Implicit(this.B3AAA),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0.5),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- this.\u00324AAA = (int) Function.Call<int>((Hash) 4828851653567843141L, new InputArgument[0]);
- if (this.\u00324AAA > -1)
- THelper.playSoundFromEntity(this.\u00324AAA, "fire_missile_loop", (Entity) this.B3AAA, "exile_2_sounds");
- JC2.\u00368AAA.Add(this);
- JC2.\u00358AA0.Add((Prop) o);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- if (this.\u00314AA0 != 0)
- Function.Call((Hash) -8109406742613235306L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00314AA0)
- });
- if (this.\u00324AAA > -1)
- Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00324AAA)
- });
- ProjectData.ClearProjectError();
- }
- }
- public void tick()
- {
- try
- {
- if (DateAndTime.Now.Subtract(this.\u00344AAA).TotalMilliseconds < 250.0)
- {
- this.\u00393AA0 = DateAndTime.Now;
- }
- else
- {
- if (DateAndTime.Now.Subtract(this.\u00393AA0).TotalMilliseconds >= 3000.0)
- throw new Exception("done");
- ((Entity) this.B3AAA).ApplyForce(this.C3AA0);
- this.\u00304AAA = checked (this.\u00304AAA + 10);
- if (this.\u00304AAA == 200)
- {
- this.\u00304AAA = 0;
- // ISSUE: explicit reference operation
- ((Vector3) @this.C3AA0).\u002Ector((float) JC2.\u00306AAA.NextDouble(), (float) JC2.\u00306AAA.NextDouble(), 1f);
- }
- if (THelper.Exists(this.\u00334AA0) && THelper.isPed(this.\u00334AA0))
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.\u00334AA0),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.\u00334AA0),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(-1),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- if (this.\u00314AA0 != 0)
- Function.Call((Hash) -8109406742613235306L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00314AA0)
- });
- if (this.\u00324AAA > -1)
- Function.Call((Hash) -6651601026601448523L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.\u00324AAA)
- });
- JC2.\u00368AAA.Remove(this);
- ProjectData.ClearProjectError();
- }
- }
- }
- public class TEntityInRope
- {
- public Entity p1;
- public Entity p2;
- public Rope rope;
- public double dist;
- public Vector3 e1_offset;
- public Vector3 e2_offset;
- public Vector3 pinCoord;
- public DateTime timerSinceAttach;
- public bool isPed_p1;
- public bool isObject_p1;
- public bool isVehicle_p1;
- public bool isPed_p2;
- public bool isObject_p2;
- public bool isVehicle_p2;
- private DateTime \u00354AA0;
- private DateTime \u00364AAA;
- public TEntityInRope(Entity e1, Entity e2, Rope r, double pDist, Vector3 e1_Off, Vector3 e2_Off)
- {
- this.p1 = (Entity) null;
- this.p2 = (Entity) null;
- this.isPed_p1 = false;
- this.isObject_p1 = false;
- this.isVehicle_p1 = false;
- this.isPed_p2 = false;
- this.isObject_p2 = false;
- this.isVehicle_p2 = false;
- this.\u00354AA0 = DateAndTime.Now;
- this.\u00364AAA = DateAndTime.Now;
- this.p1 = e1;
- this.p2 = e2;
- this.rope = r;
- this.dist = pDist;
- this.e1_offset = e1_Off;
- this.e2_offset = e2_Off;
- if (THelper.Exists(this.p1))
- {
- this.isPed_p1 = THelper.isPed(this.p1);
- this.isObject_p1 = THelper.isObject(this.p1);
- this.isVehicle_p1 = THelper.isVehicle(this.p1);
- if (Function.Call<bool>((Hash) 755240282434935612L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p1)
- }) == 0)
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- if (this.isVehicle_p1)
- Function.Call((Hash) -7808228676691476136L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(15.0)
- });
- }
- if (THelper.Exists(this.p2))
- {
- this.isPed_p2 = THelper.isPed(this.p2);
- this.isObject_p2 = THelper.isObject(this.p2);
- this.isVehicle_p2 = THelper.isVehicle(this.p2);
- if (Function.Call<bool>((Hash) 755240282434935612L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p2)
- }) == 0)
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- if (this.isVehicle_p2)
- Function.Call((Hash) -7808228676691476136L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(15.0)
- });
- }
- this.timerSinceAttach = DateAndTime.Now;
- JC2.\u0035BAA0.Add(this);
- }
- public void remove()
- {
- try
- {
- this.rope.Delete();
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- this.p1.MarkAsNoLongerNeeded();
- this.p1 = (Entity) null;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- try
- {
- this.p2.MarkAsNoLongerNeeded();
- this.p2 = (Entity) null;
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- JC2.\u0035BAA0.Remove(this);
- }
- public void pedTick()
- {
- try
- {
- if (DateAndTime.Now.Subtract(this.\u00354AA0).TotalMilliseconds <= 1000.0)
- return;
- this.\u00354AA0 = DateAndTime.Now;
- if (THelper.Exists(this.p1) && THelper.isPed(this.p1))
- {
- if (this.p1.get_Health() < 0)
- {
- Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p1)
- });
- this.p1.set_Health(100);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(50000),
- InputArgument.op_Implicit(50000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(false)
- });
- if (Vector3.op_Inequality(this.pinCoord, Vector3.get_Zero()))
- {
- if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p1)
- }) == 0)
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p1),
- InputArgument.op_Implicit(true)
- });
- THelper.setPedToRagdoll((Ped) this.p1, (short) 10000, (short) 10000, (short) 0, true, true, false);
- }
- }
- }
- if (THelper.Exists(this.p2) && THelper.isPed(this.p2))
- {
- if (this.p2.get_Health() < 0)
- {
- Function.Call((Hash) -8247553802756056626L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p2)
- });
- this.p2.set_Health(100);
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(50000),
- InputArgument.op_Implicit(50000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- }
- Function.Call((Hash) 6604407477447426083L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -1452570157180153684L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(false)
- });
- Function.Call((Hash) -5948256542791926255L, new InputArgument[3]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(true),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) 9201271453299690075L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(false)
- });
- if (Vector3.op_Inequality(this.pinCoord, Vector3.get_Zero()))
- {
- if (Function.Call<bool>((Hash) 5180522170171546453L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.p2)
- }) == 0)
- {
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.p2),
- InputArgument.op_Implicit(true)
- });
- THelper.setPedToRagdoll((Ped) this.p2, (short) 10000, (short) 10000, (short) 0, true, true, false);
- }
- }
- }
- if (THelper.Exists(this.p1) && THelper.Exists(this.p2))
- {
- double distance = (double) World.GetDistance(this.p1.get_Position(), this.p2.get_Position());
- if (this.isPed_p1 && this.isVehicle_p2)
- {
- Ped p1 = (Ped) this.p1;
- Vector3 velocity = this.p2.get_Velocity();
- // ISSUE: explicit reference operation
- double num1 = (double) ((Vector3) @velocity).Length();
- velocity = ((Entity) p1).get_Velocity();
- int num2;
- // ISSUE: explicit reference operation
- if (((double) ((Vector3) @velocity).Length() >= 0.3 || (double) World.GetDistance(this.p2.get_Position(), (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.rope.get_Handle()),
- InputArgument.op_Implicit(0)
- })) < this.dist * 0.95) && (double) World.GetDistance(this.p2.get_Position(), (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.rope.get_Handle())
- })) <= 3.0)
- {
- if (!p1.get_IsRagdoll())
- {
- Model model = this.p2.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsVehicle())
- {
- velocity = this.p2.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() > 5.0)
- goto label_25;
- }
- }
- num2 = 0;
- goto label_26;
- }
- label_25:
- num2 = 1;
- label_26:
- if (num2 != 0)
- {
- this.rope.Delete();
- this.rope = JC2.createRope(this.p1.get_Position(), this.p2.get_Position(), 1.0, this.dist * 0.95, (Bone) -1);
- ((Entity) p1).set_FreezePosition(false);
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(p1),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(p1),
- InputArgument.op_Implicit(30000),
- InputArgument.op_Implicit(30000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((Entity) p1).set_Health(100);
- ((Entity) p1).ApplyForce(Vector3.op_Subtraction(this.p2.get_Position(), ((Entity) p1).get_Position()));
- ((Entity) p1).set_Velocity(Vector3.op_Subtraction(this.p2.get_Position(), ((Entity) p1).get_Position()));
- JC2.attachEntitiesToRope(this.rope, this.p1, this.p2, 1.0, this.dist * 0.95, this.e1_offset, this.e2_offset);
- }
- }
- else if (this.isPed_p2 && this.isVehicle_p1)
- {
- Ped p2 = (Ped) this.p2;
- Vector3 velocity = this.p1.get_Velocity();
- // ISSUE: explicit reference operation
- double num1 = (double) ((Vector3) @velocity).Length();
- velocity = ((Entity) p2).get_Velocity();
- int num2;
- // ISSUE: explicit reference operation
- if (((double) ((Vector3) @velocity).Length() >= 0.3 || (double) World.GetDistance(this.p1.get_Position(), (Vector3) Function.Call<Vector3>((Hash) -1557741282696061363L, new InputArgument[2]
- {
- InputArgument.op_Implicit(this.rope.get_Handle()),
- InputArgument.op_Implicit(0)
- })) < this.dist * 0.95) && (double) World.GetDistance(this.p1.get_Position(), (Vector3) Function.Call<Vector3>((Hash) 2430553729362132013L, new InputArgument[1]
- {
- InputArgument.op_Implicit(this.rope.get_Handle())
- })) <= 3.0)
- {
- if (!p2.get_IsRagdoll())
- {
- Model model = this.p1.get_Model();
- // ISSUE: explicit reference operation
- if (((Model) @model).get_IsVehicle())
- {
- velocity = this.p1.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() > 5.0)
- goto label_35;
- }
- }
- num2 = 0;
- goto label_36;
- }
- label_35:
- num2 = 1;
- label_36:
- if (num2 != 0)
- {
- this.rope.Delete();
- this.rope = JC2.createRope(this.p1.get_Position(), this.p1.get_Position(), 1.0, this.dist * 0.95, (Bone) -1);
- ((Entity) p2).set_FreezePosition(false);
- Function.Call((Hash) -5681229974298341846L, new InputArgument[2]
- {
- InputArgument.op_Implicit(p2),
- InputArgument.op_Implicit(true)
- });
- Function.Call((Hash) -5865380420870110134L, new InputArgument[6]
- {
- InputArgument.op_Implicit(p2),
- InputArgument.op_Implicit(30000),
- InputArgument.op_Implicit(30000),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0),
- InputArgument.op_Implicit(0)
- });
- ((Entity) p2).set_Health(100);
- ((Entity) p2).ApplyForce(Vector3.op_Subtraction(this.p1.get_Position(), ((Entity) p2).get_Position()));
- ((Entity) p2).set_Velocity(Vector3.op_Subtraction(this.p1.get_Position(), ((Entity) p2).get_Position()));
- JC2.attachEntitiesToRope(this.rope, this.p1, this.p1, 1.0, this.dist * 0.95, this.e1_offset, this.e2_offset);
- }
- }
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- private class ᙃ
- {
- public Entity ent;
- public Vector3 offset;
- public ᙃ(Entity e, Vector3 hitPos)
- {
- this.ent = (Entity) null;
- if (!THelper.Exists(e))
- return;
- JC2.\u00352AA0(e);
- this.ent = e;
- this.offset = e.GetOffsetFromWorldCoords(hitPos);
- JC2.BFAAA.Add(this);
- }
- }
- private class ᙄ
- {
- public Entity ent;
- public Prop bombinha;
- public Vector3 offset;
- public Vector3 offset2;
- public Vector3 dir;
- public DateTime timerAlive;
- public bool bOk;
- private int \u00324AAA;
- private int \u00384AAA;
- private bool \u00394AA0;
- private bool B4AAA;
- private Vector3 C4AA0;
- private bool \u00305AAA;
- private short \u00315AA0;
- private string \u00325AAA;
- private double \u00335AA0;
- private double \u00345AAA;
- public ᙄ(Entity pEnt, Vector3 pHitPosition, Vector3 pDir)
- {
- this.ent = (Entity) null;
- this.bombinha = (Prop) null;
- this.bOk = false;
- this.\u00324AAA = -1;
- this.\u00384AAA = -1;
- this.\u00394AA0 = true;
- this.B4AAA = false;
- this.\u00305AAA = true;
- this.\u00315AA0 = (short) 0;
- 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))
- return;
- this.ent = pEnt;
- if (THelper.Exists(this.ent))
- {
- this.bombinha = World.CreateProp(JC2.\u00317AA0, THelper.getCreationPos(15.0, 15.0), false, false);
- Script.Wait(10);
- if (!THelper.Exists((Entity) this.bombinha))
- return;
- this.offset = this.ent.GetOffsetFromWorldCoords(pHitPosition);
- this.dir = pDir;
- this.offset2 = this.ent.GetOffsetFromWorldCoords(Vector3.op_Addition(pHitPosition, this.dir));
- bool flag = true;
- List<JC2.ᙄ>.Enumerator enumerator;
- try
- {
- enumerator = JC2.\u0038GAAA.GetEnumerator();
- while (enumerator.MoveNext())
- {
- JC2.ᙄ current = enumerator.Current;
- try
- {
- if (THelper.Exists(current.ent) && current.ent.get_Handle() == this.ent.get_Handle())
- {
- flag = false;
- break;
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- }
- finally
- {
- enumerator.Dispose();
- }
- if (flag)
- {
- THelper.getSoundID(ref this.\u00324AAA);
- THelper.getSoundID(ref this.\u00384AAA);
- }
- ((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())));
- this.\u00325AAA = "throw_l_fb_stand";
- this.\u00345AAA = 0.6;
- this.\u00335AA0 = 0.2;
- Vector3 position = this.ent.get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(((Entity) Game.get_Player().get_Character()).get_Position()) > 5.0)
- {
- this.\u00325AAA = "throw_m_fb_stand";
- this.\u00345AAA = 0.4;
- this.\u00335AA0 = 0.146;
- }
- Game.get_Player().get_Character().get_Task().ClearAllImmediately();
- THelper.anim_playPedAnim(Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, 8.0, THelper.animFlags.normal, false);
- 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);
- if (THelper.Exists((Entity) JC2.\u0036GAAA))
- ((Entity) JC2.\u0036GAAA).set_IsVisible(false);
- this.\u00315AA0 = (short) 1;
- JC2.\u0038GAAA.Add(this);
- }
- }
- private void \u0034AAAA()
- {
- Vector3 rotation = THelper.directionToRotation(this.dir, 0.0);
- rotation.X = (__Null) (rotation.X + 90.0);
- Vector3 rot1 = Vector3.op_Subtraction(rotation, this.ent.get_Rotation());
- if (THelper.isPed(this.ent))
- {
- double num1 = 0.35;
- Vector3 offset1;
- Vector3 pedBonePos = THelper.getPedBonePos(this.ent, 31086, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- Prop bombinha = this.bombinha;
- Entity ent = this.ent;
- int boneIndexEnt1 = 0;
- int pedBoneIndex = THelper.getPedBoneIndex((Ped) this.ent, 31086);
- Vector3 vector3;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3).\u002Ector(0.0f, 0.0f, 0.0f);
- Vector3 offset2 = vector3;
- Vector3 rot2 = rot1;
- int num2 = 0;
- int num3 = 0;
- int num4 = 0;
- int num5 = 0;
- int num6 = 1;
- THelper.attachEntToEnt((Entity) bombinha, ent, boneIndexEnt1, pedBoneIndex, offset2, rot2, num2 != 0, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 60309, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 60309), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 28422, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 28422), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 57717, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 57717), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 24806, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 24806), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 63931, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 63931), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 36864, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 63931), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 57005, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- num1 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 57005), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- pedBonePos = THelper.getPedBonePos(this.ent, 18905, offset1);
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position()) < num1)
- {
- // ISSUE: explicit reference operation
- double num2 = (double) ((Vector3) @pedBonePos).DistanceTo(((Entity) this.bombinha).get_Position());
- THelper.attachEntToEnt((Entity) this.bombinha, this.ent, 0, THelper.getPedBoneIndex((Ped) this.ent, 18905), Vector3.get_Zero(), rot1, false, false, false, false, true);
- }
- if (!((Entity) this.bombinha).IsAttached())
- 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);
- }
- else
- 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);
- if (!this.\u00305AAA)
- return;
- this.\u00305AAA = false;
- THelper.play3DSound(".\\scripts\\jc3 files\\set_c4.wav", GameplayCamera.get_Position(), false, true, 1.0, 25, 10000, 100);
- }
- public void trigger()
- {
- if (this.B4AAA)
- return;
- this.B4AAA = true;
- this.timerAlive = DateAndTime.Now;
- }
- public void tick()
- {
- try
- {
- if ((int) this.\u00315AA0 == 1)
- {
- if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, this.\u00335AA0))
- {
- ((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())));
- return;
- }
- ((Entity) this.bombinha).Detach();
- this.\u00315AA0 = (short) 2;
- }
- else if ((int) this.\u00315AA0 == 2)
- {
- if (THelper.anim_isPlayingPedAnim((Entity) Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, this.\u00345AAA))
- {
- if (!((Entity) this.bombinha).IsAttached())
- {
- Vector3 offsetInWorldCoords = this.ent.GetOffsetInWorldCoords(this.offset);
- Vector3 dir;
- // ISSUE: explicit reference operation
- ((Vector3) @dir).\u002Ector(0.7f, 0.7f, 0.7f);
- ((Entity) this.bombinha).set_Rotation(THelper.directionToRotation(dir, 0.0));
- Vector3 vector3 = offsetInWorldCoords;
- Function.Call((Hash) 3449744191218520391L, new InputArgument[8]
- {
- InputArgument.op_Implicit(this.bombinha),
- InputArgument.op_Implicit((float) vector3.X),
- InputArgument.op_Implicit((float) vector3.Y),
- InputArgument.op_Implicit((float) vector3.Z),
- InputArgument.op_Implicit((float) dir.X),
- InputArgument.op_Implicit((float) dir.Y),
- InputArgument.op_Implicit((float) dir.Z),
- InputArgument.op_Implicit(true)
- });
- Vector3 position = ((Entity) this.bombinha).get_Position();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @position).DistanceTo(vector3) < 0.1)
- this.\u0034AAAA();
- }
- ((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())));
- return;
- }
- this.\u0034AAAA();
- THelper.anim_stopPedAnim(Game.get_Player().get_Character(), JC2.\u0037GAA0.dict, this.\u00325AAA, 2.0);
- this.timerAlive = DateAndTime.Now;
- Model model = this.ent.get_Model();
- // ISSUE: explicit reference operation
- this.C4AA0 = ((Model) @model).GetDimensions();
- this.bOk = true;
- this.\u00315AA0 = (short) 0;
- if (THelper.Exists((Entity) JC2.\u0036GAAA))
- ((Entity) JC2.\u0036GAAA).set_IsVisible(true);
- }
- if (!this.B4AAA)
- return;
- if (!THelper.Exists(this.ent))
- throw new Exception("ent gone");
- if (this.\u00394AA0)
- {
- this.\u00394AA0 = false;
- if (this.\u00324AAA != -1)
- THelper.playSoundFromEntity(this.\u00324AAA, "Woosh_02", this.ent, "FBI_HEIST_ELEVATOR_SHAFT_DEBRIS_SOUNDS");
- if (this.\u00384AAA != -1)
- THelper.playSoundFromEntity(this.\u00384AAA, "SPL_RPG_DIST_FLIGHT_MASTER", this.ent, "");
- }
- Vector3 vector3_1 = Vector3.Normalize(Vector3.op_Subtraction(this.offset, this.ent.get_Position()));
- Vector3 vector3_2 = Vector3.Normalize(Vector3.op_Subtraction(this.ent.GetOffsetInWorldCoords(this.offset2), this.ent.GetOffsetInWorldCoords(this.offset)));
- Vector3 dir1 = vector3_2;
- Vector3 rot1;
- // ISSUE: explicit reference operation
- ((Vector3) @rot1).\u002Ector(0.0f, (float) (THelper.directionToRotation(dir1, 0.0).X * -1.0), (float) (THelper.directionToRotation(dir1, 0.0).Z + 90.0));
- if (THelper.Exists((Entity) this.bombinha))
- {
- Prop bombinha = this.bombinha;
- string sPTFX = "muz_assault_rifle";
- string sAsset = "scr_fbi5a";
- Vector3 zero = Vector3.get_Zero();
- Vector3 vector3_3;
- // ISSUE: explicit reference operation
- ((Vector3) @vector3_3).\u002Ector(0.0f, 90f, 0.0f);
- Vector3 rot2 = vector3_3;
- double size = 1.5;
- THelper.ptfx_triggerOnEntity((Entity) bombinha, sPTFX, sAsset, zero, rot2, size);
- }
- else
- THelper.ptfx_triggerOnEntity(this.ent, "muz_assault_rifle", "scr_fbi5a", this.offset, rot1, 1.5);
- double num = 0.0;
- Vector3 velocity = this.ent.get_Velocity();
- // ISSUE: explicit reference operation
- if ((double) ((Vector3) @velocity).Length() < 1.0)
- num = 1.0;
- if (THelper.isPed(this.ent))
- THelper.setPedToRagdoll((Ped) this.ent, (short) 1000, (short) 1000, (short) 0, true, true, false);
- if (!THelper.isVehicle(this.ent))
- vector3_1 = Vector3.get_Zero();
- if (this.offset.Y > 0.0)
- 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);
- else
- 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));
- 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);
- // ISSUE: explicit reference operation
- if (((RaycastResult) @raycastResult).get_DitHitAnything())
- {
- if ((double) this.offset.Y < (double) this.C4AA0.Y * -0.35)
- 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));
- else if ((double) this.offset.Y > (double) this.C4AA0.Y * 0.35)
- 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));
- }
- if (DateAndTime.Now.Subtract(this.timerAlive).TotalMilliseconds > 10000.0)
- {
- World.AddExplosion(this.ent.GetOffsetInWorldCoords(this.offset2), (ExplosionType) 7, 1f, 0.5f);
- throw new Exception("exploded");
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- if (!this.\u00394AA0)
- {
- if (this.\u00324AAA != -1)
- THelper.stopSound(this.\u00324AAA);
- if (this.\u00384AAA != -1)
- THelper.stopSound(this.\u00384AAA);
- }
- if (THelper.Exists((Entity) this.bombinha))
- {
- ((Entity) this.bombinha).Delete();
- this.bombinha = (Prop) null;
- }
- JC2.\u0038GAAA.Remove(this);
- ProjectData.ClearProjectError();
- }
- }
- }
- private class ᙅ
- {
- public Entity ent1;
- public Entity ent2;
- public Vector3 anchorPos;
- public Vector3 secAttachPos;
- private double \u00355AA0;
- private bool \u00365AAA;
- private DateTime \u00375AA0;
- public ᙅ(Entity e1, Entity e2)
- {
- this.ent1 = (Entity) null;
- this.ent2 = (Entity) null;
- this.anchorPos = (Vector3) null;
- this.secAttachPos = (Vector3) null;
- this.\u00365AAA = false;
- try
- {
- this.ent1 = e1;
- this.ent2 = e2;
- Vector3 position = e1.get_Position();
- // ISSUE: explicit reference operation
- this.\u00355AA0 = (double) ((Vector3) @position).DistanceTo(e2.get_Position());
- JC2.CA0A0.Add(this);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- ProjectData.ClearProjectError();
- }
- }
- public ᙅ(Vector3 pAnchorPos, Vector3 pPos)
- {
- this.ent1 = (Entity) null;
- this.ent2 = (Entity) null;
- this.anchorPos = (Vector3) null;
- this.secAttachPos = (Vector3) null;
- this.\u00365AAA = false;
- this.anchorPos = pAnchorPos;
- this.secAttachPos = pPos;
- JC2.CA0A0.Add(this);
- }
- public void retract(bool bDontCalDist = false)
- {
- try
- {
- if ((!THelper.Exists(this.ent1) || !THelper.Exists(this.ent2)) && !false)
- return;
- Vector3 vector3 = Vector3.Normalize(Vector3.op_Subtraction(this.ent2.get_Position(), this.ent1.get_Position()));
- double num1 = !THelper.isPed(this.ent1) ? Conversions.ToDouble(Operators.MultiplyObject(THelper.getMassCoef(this.ent1), (object) 0.5)) : 1.0;
- if (!this.ent1.get_IsVisible())
- num1 = 0.0;
- double num2 = !THelper.isPed(this.ent2) ? Conversions.ToDouble(Operators.MultiplyObject(THelper.getMassCoef(this.ent2), (object) 0.5)) : 1.0;
- if (!this.ent2.get_IsVisible())
- num2 = 0.0;
- double val2_1 = num1 + (num1 - num2);
- double val2_2 = num2 + (num2 - val2_1);
- double num3 = System.Math.Max(0.0, val2_1);
- double num4 = System.Math.Max(0.0, val2_2);
- double num5 = 1.0;
- Vector3 position = this.ent1.get_Position();
- // ISSUE: explicit reference operation
- double num6 = (double) ((Vector3) @position).DistanceTo(this.ent2.get_Position());
- double num7 = (double) System.Math.Max((float) num5, (float) num6);
- if (this.\u00355AA0 > num7)
- this.\u00355AA0 = num7;
- if (!bDontCalDist)
- {
- if (!this.ent1.IsTouching(this.ent2) && !this.ent2.IsTouching(this.ent1))
- {
- if (this.\u00355AA0 < 1.0)
- {
- Entity ent1 = this.ent1;
- 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)));
- Entity ent2 = this.ent2;
- 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)));
- }
- this.ent1.ApplyForce(Vector3.op_Multiply(vector3, (float) num3));
- this.ent2.ApplyForce(Vector3.op_Multiply(Vector3.op_Multiply(vector3, (float) num4), -1f));
- }
- THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", this.ent1, "");
- THelper.playSoundFromEntity(-1, "FRANKLINS_HOUSE_SECURITY_LIGHT_ON", this.ent2, "");
- if (this.\u00355AA0 < 50.0)
- {
- JC2.TEntityInRope tentityInRope = JC2.\u00383AAA(this.ent1, this.ent2);
- if (tentityInRope != null)
- JC2.attachEntitiesToRope(tentityInRope.rope, this.ent1, this.ent2, 1.0, this.\u00355AA0, tentityInRope.e1_offset, tentityInRope.e2_offset);
- }
- this.\u00365AAA = true;
- this.\u00375AA0 = DateAndTime.Now;
- }
- else if (this.\u00365AAA && DateAndTime.Now.Subtract(this.\u00375AA0).TotalMilliseconds > 200.0)
- {
- this.\u00365AAA = false;
- this.\u00375AA0 = DateAndTime.Now;
- JC2.TEntityInRope tentityInRope1 = JC2.\u00383AAA(this.ent1, this.ent2);
- Vector3 e1_Off = Vector3.get_Zero();
- Vector3 e2_Off = Vector3.get_Zero();
- if (tentityInRope1 != null)
- {
- e1_Off = tentityInRope1.e1_offset;
- e2_Off = tentityInRope1.e2_offset;
- tentityInRope1.remove();
- }
- Rope rope = JC2.createRope(this.ent1, this.ent2, 0.5, 0.0, (Bone) -1);
- JC2.TEntityInRope tentityInRope2 = new JC2.TEntityInRope(this.ent1, this.ent2, rope, this.\u00355AA0, e1_Off, e2_Off);
- JC2.attachEntitiesToRope(rope, this.ent1, this.ent2, 1.0, this.\u00355AA0, tentityInRope2.e1_offset, tentityInRope2.e2_offset);
- }
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- this.remove();
- ProjectData.ClearProjectError();
- }
- }
- public void remove()
- {
- JC2.CA0A0.Remove(this);
- }
- public void tick()
- {
- try
- {
- bool flag1 = THelper.Exists(this.ent1);
- bool flag2 = THelper.Exists(this.ent2);
- Vector3 vector3;
- if (!flag1 && !flag2 && Vector3.op_Equality(this.anchorPos, vector3))
- throw new Exception("gone");
- if ((!flag1 || !flag2) && (Vector3.op_Equality(this.anchorPos, vector3) && Vector3.op_Equality(this.secAttachPos, vector3)))
- throw new Exception("gone");
- Vector3 position = this.ent1.get_Position();
- // ISSUE: explicit reference operation
- if (System.Math.Abs((double) ((Vector3) @position).DistanceTo(this.ent2.get_Position()) - this.\u00355AA0) <= 0.2)
- return;
- this.retract(true);
- }
- catch (Exception ex)
- {
- ProjectData.SetProjectError(ex);
- this.remove();
- ProjectData.ClearProjectError();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement