diff --git a/Client/Sync/Entities/SyncedProjectile.cs b/Client/Sync/Entities/SyncedProjectile.cs index 46555be..b944b5e 100644 --- a/Client/Sync/Entities/SyncedProjectile.cs +++ b/Client/Sync/Entities/SyncedProjectile.cs @@ -16,7 +16,7 @@ namespace RageCoop.Client IsMine=true; MainProjectile = p; Origin=p.Position; - var shooter = EntityPool.GetPedByHandle(p.Owner.Handle); + var shooter = EntityPool.GetPedByHandle((p.Owner?.Handle).GetValueOrDefault()); if(shooter != null) { ShooterID=shooter.ID; @@ -24,14 +24,14 @@ namespace RageCoop.Client else { // Owner will be the vehicle if projectile is shot with a vehicle - var shooterVeh = EntityPool.GetVehicleByHandle(p.Owner.Handle); + var shooterVeh = EntityPool.GetVehicleByHandle((p.Owner?.Handle).GetValueOrDefault()); if (shooterVeh!=null && shooterVeh.MainVehicle.Driver!=null) { ShooterID=shooterVeh.MainVehicle.Driver.GetSyncEntity().ID; } else { - Main.Logger.Warning($"Could not find owner for projectile, owner handle:{p.Owner.Handle}"); + Main.Logger.Warning($"Could not find owner for projectile:{Hash}"); } } diff --git a/Client/Sync/SyncEvents.cs b/Client/Sync/SyncEvents.cs index 467167f..e8d1716 100644 --- a/Client/Sync/SyncEvents.cs +++ b/Client/Sync/SyncEvents.cs @@ -12,7 +12,6 @@ using System.Threading; namespace RageCoop.Client { internal static class SyncEvents { - #region TRIGGER public static void TriggerPedKilled(SyncedPed victim) { @@ -161,16 +160,16 @@ namespace RageCoop.Client { { // Minigun, not working for some reason case (uint)WeaponHash.Minigun: - weaponHash=(uint)WeaponHash.HeavyRifle; + weaponHash=1176362416; break; // Valkyire, not working for some reason case 2756787765: - weaponHash=(uint)WeaponHash.HeavyRifle; + weaponHash=1176362416; break; case (uint)VehicleWeaponHash.PlayerBuzzard: - weaponHash=(uint)WeaponHash.HeavyRifle; + weaponHash=1176362416; break ; } diff --git a/Client/Util/WeaponUtil.cs b/Client/Util/WeaponUtil.cs index 725d817..d97bdd4 100644 --- a/Client/Util/WeaponUtil.cs +++ b/Client/Util/WeaponUtil.cs @@ -235,6 +235,7 @@ namespace RageCoop.Client VehicleWeaponHash.PlaneRocket, VehicleWeaponHash.SpaceRocket, VehicleWeaponHash.Tank, + (VehicleWeaponHash)3565779982 // STROMBERG missiles (homing off) }; } }