mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-17 18:39:07 +00:00
1.5a
- Minor changes - New skins
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,6 +1,4 @@
|
||||
|
||||
.vs/
|
||||
bin/
|
||||
obj/
|
||||
website/getskins.php
|
||||
website/getskins.php
|
||||
|
||||
15
Events.cs
15
Events.cs
@@ -304,7 +304,20 @@ namespace WeaponPaints
|
||||
)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(viewModel.Value.CBodyComponent.SceneNode);
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Utilities.SetStateChanged(viewModel.Value, "CBaseEntity", "m_CBodyComponent");
|
||||
|
||||
@@ -40,9 +40,19 @@ namespace WeaponPaints
|
||||
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -61,9 +71,18 @@ namespace WeaponPaints
|
||||
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
|
||||
{
|
||||
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
int[] array = { 1171, 1170, 1169, 1164, 1162, 1161, 1159, 1175, 1174, 1167, 1165, 1168, 1163, 1160, 1166, 1173 };
|
||||
int fallbackPaintKit = weapon.FallbackPaintKit;
|
||||
if (array.Contains(fallbackPaintKit))
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
skeleton.ModelState.MeshGroupMask = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (skeleton.ModelState.MeshGroupMask != 2)
|
||||
{
|
||||
skeleton.ModelState.MeshGroupMask = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
public override string ModuleAuthor => "Nereziel & daffyy";
|
||||
public override string ModuleDescription => "Skin and knife selector, standalone and web-based";
|
||||
public override string ModuleName => "WeaponPaints";
|
||||
public override string ModuleVersion => "1.4c";
|
||||
public override string ModuleVersion => "1.5a";
|
||||
|
||||
public static WeaponPaintsConfig GetWeaponPaintsConfig()
|
||||
{
|
||||
@@ -172,8 +172,13 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
|
||||
|
||||
foreach (CCSPlayerController player in players)
|
||||
{
|
||||
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV || player.SteamID.ToString() == "") continue;
|
||||
if (gPlayerWeaponsInfo.ContainsKey((int)player.Index)) continue;
|
||||
if (player == null || !player.IsValid || player.IsBot || player.IsHLTV) continue;
|
||||
//if (gPlayerWeaponsInfo.ContainsKey((int)player.Index)) continue;
|
||||
|
||||
if (gPlayerWeaponsInfo.ContainsKey((int)player.Index))
|
||||
gPlayerWeaponsInfo.TryRemove((int)player.Index, out _);
|
||||
if (g_playersKnife.ContainsKey((int)player.Index))
|
||||
g_playersKnife.TryRemove((int)player.Index, out _);
|
||||
|
||||
PlayerInfo playerInfo = new PlayerInfo
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.159" />
|
||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.163" />
|
||||
<PackageReference Include="Dapper" Version="2.1.28" />
|
||||
<PackageReference Include="MySqlConnector" Version="2.3.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
|
||||
@@ -62,7 +62,8 @@ class UtilsClass
|
||||
521,
|
||||
522,
|
||||
523,
|
||||
525
|
||||
525,
|
||||
526
|
||||
])
|
||||
)
|
||||
continue;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user