Fix broken vehicle weapon sync when no impact is found
This commit is contained in:
@ -53,7 +53,7 @@ namespace RageCoop.Client.Installer
|
|||||||
{
|
{
|
||||||
UpdateStatus("Checking requirements");
|
UpdateStatus("Checking requirements");
|
||||||
var shvPath = Path.Combine(root, "ScriptHookV.dll");
|
var shvPath = Path.Combine(root, "ScriptHookV.dll");
|
||||||
var shvdnPath = Path.Combine(root, "ScriptHookVDotNet3.dll");
|
var shvdnPath = Path.Combine(root, "ScriptHookVDotNetCore.dll");
|
||||||
var scriptsPath = Path.Combine(root, "Scripts");
|
var scriptsPath = Path.Combine(root, "Scripts");
|
||||||
var installPath = Path.Combine(root, "RageCoop");
|
var installPath = Path.Combine(root, "RageCoop");
|
||||||
var legacyPath = Path.Combine(scriptsPath, "RageCoop");
|
var legacyPath = Path.Combine(scriptsPath, "RageCoop");
|
||||||
|
@ -156,10 +156,12 @@ namespace RageCoop.Client
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var vehWeap = subject.VehicleWeapon;
|
||||||
|
|
||||||
// Not found, but it's shot from a vehicle
|
// Not found, but it's shot from a vehicle
|
||||||
if (subject.VehicleWeapon != VehicleWeaponHash.Invalid)
|
if (vehWeap != VehicleWeaponHash.Invalid)
|
||||||
{
|
{
|
||||||
var b = c.GetMuzzleBone(true);
|
var b = c.MainPed.CurrentVehicle.GetMuzzleBone(vehWeap);
|
||||||
TriggerBulletShot(c, b.Position + b.ForwardVector * 200);
|
TriggerBulletShot(c, b.Position + b.ForwardVector * 200);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Submodule libs/ScriptHookVDotNetCore updated: 72fd66130e...43df04d914
Reference in New Issue
Block a user