Closes #40
This commit is contained in:
@ -67,6 +67,7 @@
|
||||
<Compile Include="Sync\EntityPool.cs" />
|
||||
<Compile Include="Sync\SyncEvents.cs" />
|
||||
<Compile Include="Sync\Voice.cs" />
|
||||
<Compile Include="Util\AddOnDataProvider.cs" />
|
||||
<Compile Include="Util\Memory.cs" />
|
||||
<Compile Include="Util\NativeCaller.cs" />
|
||||
<Compile Include="Util\PedConfigFlags.cs" />
|
||||
|
64
RageCoop.Client/Util/AddOnDataProvider.cs
Normal file
64
RageCoop.Client/Util/AddOnDataProvider.cs
Normal file
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Class providing support for addon mods
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -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)
|
||||
|
Reference in New Issue
Block a user