Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sardelka9515 committed May 26, 2022
1 parent f9d28bb commit b509645
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Client/Misc/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,12 @@ public static bool IsTaskActive(this Ped p,TaskType task)
public static Vector3 GetAimCoord(this Ped p)
{
var weapon = p.Weapons.CurrentWeaponObject;

var v = p.CurrentVehicle;
// Rhino
if (p.CurrentVehicle.Model.Hash==782665360)
if (v!=null && v.Model.Hash==782665360)
{
return p.CurrentVehicle.Bones[35].Position+p.CurrentVehicle.Bones[35].ForwardVector*100;
return v.Bones[35].Position+v.Bones[35].ForwardVector*100;
}
if (p.IsOnTurretSeat()) { return p.GetLookingCoord(); }
if (weapon!=null)
Expand Down

0 comments on commit b509645

Please sign in to comment.