diff --git a/RageCoop.Client/RageCoop.Client.csproj b/RageCoop.Client/RageCoop.Client.csproj index a24315a..8311337 100644 --- a/RageCoop.Client/RageCoop.Client.csproj +++ b/RageCoop.Client/RageCoop.Client.csproj @@ -67,6 +67,7 @@ + diff --git a/RageCoop.Client/Util/AddOnDataProvider.cs b/RageCoop.Client/Util/AddOnDataProvider.cs new file mode 100644 index 0000000..9936953 --- /dev/null +++ b/RageCoop.Client/Util/AddOnDataProvider.cs @@ -0,0 +1,64 @@ +using GTA; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RageCoop.Client +{ + /// + /// Class providing support for addon mods + /// + internal class AddOnDataProvider + { + public static int GetMuzzleIndex(Model model) + { + switch (model.Hash) + { + // f14a2 + case -848721350: + return 48; + + // f15e + case 881261972: + return 32; + + // f16c + case -2051171080: + return 25; + + // F22A + case 2061630439: + return 14; + + // f35c + case -343547392: + return 44; + + // mig29a + case 513887552: + return 18; + + // su30sm + case -733985185: + return 34; + + // su33 + case -722216722: + return 34; + + // su35s + case -268602544: + return 28; + + // su57 + case 1490050781: + return 21; + + default: + return -1; + } + } + } +} diff --git a/RageCoop.Client/Util/WeaponUtil.cs b/RageCoop.Client/Util/WeaponUtil.cs index 215f240..ca403e5 100644 --- a/RageCoop.Client/Util/WeaponUtil.cs +++ b/RageCoop.Client/Util/WeaponUtil.cs @@ -362,7 +362,7 @@ namespace RageCoop.Client return 30; default: - return -1; + return AddOnDataProvider.GetMuzzleIndex(v.Model.Hash); } } public static bool IsUsingProjectileWeapon(this Ped p)