Skip to content

Commit

Permalink
Merge pull request #10 from 686-Utilities/bug-fixes
Browse files Browse the repository at this point in the history
Bug fixes for v1.5.8.1 pre-release.
  • Loading branch information
sEbi3 authored Aug 16, 2024
2 parents 558b6fd + e3da51f commit 6223799
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 41 deletions.
6 changes: 3 additions & 3 deletions Callouts/GangShootout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public class GangShootout : Callout
private static bool _hasBegunAttacking;

// Arrays
private static Ped[] _grovePeds = { GrovePed1, GrovePed2, GrovePed3 };
private static Ped[] _ballasPeds = { BallasPed1, BallasPed2, BallasPed3 };
private static Ped[] _grovePeds = new Ped[3];
private static Ped[] _ballasPeds = new Ped[3];

public override bool OnBeforeCalloutDisplayed()
{
Expand Down Expand Up @@ -177,4 +177,4 @@ public override void End()
// Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH WE_ARE_CODE FOUR NO_FURTHER_UNITS_REQUIRED");
base.End();
}
}
}
11 changes: 2 additions & 9 deletions Callouts/HostageSituationReported.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ public class HostageSituationReported : Callout
private static bool _notificationDisplayed;
private static RelationshipGroup _viRelationshipGroup = new("VI");


private static List<Ped> _victimPeds = new()
{
null,
null,
null,
null
};
private static List<Ped> _victimPeds = new List<Ped>(4);

public override bool OnBeforeCalloutDisplayed()
{
Expand Down Expand Up @@ -175,4 +168,4 @@ public override void End()
Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED");
base.End();
}
}
}
4 changes: 2 additions & 2 deletions Callouts/MoneyTruckTheft.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MoneyTruckTheft : Callout
private static LHandle _pursuit;
private static bool _pursuitCreated;

private static Ped[] _aggressors = { Aggressor1, Aggressor2, Aggressor3, Aggressor4 };
private static Ped[] _aggressors = new Ped[3];

public override bool OnBeforeCalloutDisplayed()
{
Expand Down Expand Up @@ -147,4 +147,4 @@ public override void End()
Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED");
base.End();
}
}
}
25 changes: 3 additions & 22 deletions Callouts/RobberyHL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,8 @@ public class RobberyHl : Callout
private static readonly Vector3 Swat3Spawn = new(3633.925f, 3768.781f, 28.51571f);

// Arrays
private static Ped[] _aggressorPeds =
{
A1,
A2,
A3,
A4,
A5,
A6,
A7
};

private static Blip[] _aggressorBlips =
{
B1,
B2,
B3,
B4,
B5,
B6,
B7
};
private static Ped[] _aggressorPeds = new Ped[7];
private static Blip[] _aggressorBlips = new Blip[7];

// private static Vector3 _joinSwatVector;
// private static bool _joinSwat = false;
Expand Down Expand Up @@ -233,4 +214,4 @@ public override void End()
Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED");
base.End();
}
}
}
7 changes: 2 additions & 5 deletions Callouts/WarrantForArrest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class WarrantForArrest : Callout
private static int _callOutMessage;
private static bool _attack;
private static bool _hasWeapon;
private static bool _wasClose;
private static bool _alreadySubtitleIntrod;

public override bool OnBeforeCalloutDisplayed()
Expand Down Expand Up @@ -105,10 +104,9 @@ public override void OnCalloutNotAccepted()

public override void Process()
{
if (_subject.DistanceTo(MainPlayer) < 20f && !_wasClose)
if (_subject.DistanceTo(MainPlayer) < 20f)
{
Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH OFFICERS_ARRIVED_ON_SCENE");
_wasClose = true;
if (_attack && !_hasWeapon)
{
_subject.Inventory.GiveNewWeapon(new WeaponAsset(WepList[Rndm.Next(WepList.Length)]), 500, true);
Expand All @@ -120,7 +118,6 @@ public override void Process()
{
Game.DisplaySubtitle("Press ~y~Y ~w~to speak with the person.", 5000);
_alreadySubtitleIntrod = true;
_wasClose = true;
}

if (!_attack && Game.IsKeyDown(Settings.Dialog) && _subject.DistanceTo(MainPlayer) < 2f)
Expand Down Expand Up @@ -202,4 +199,4 @@ public override void End()
Functions.PlayScannerAudio("ATTENTION_THIS_IS_DISPATCH_HIGH ALL_UNITS_CODE4 NO_FURTHER_UNITS_REQUIRED");
base.End();
}
}
}

0 comments on commit 6223799

Please sign in to comment.