- Minor changes
- New skins
This commit is contained in:
Dawid Bepierszcz
2024-02-08 10:49:53 +01:00
parent 63403dfc8e
commit bd93936fab
8 changed files with 50 additions and 14 deletions

2
.gitignore vendored
View File

@@ -1,6 +1,4 @@
.vs/
bin/
obj/
website/getskins.php
website/getskins.php

View File

@@ -304,8 +304,21 @@ namespace WeaponPaints
)
{
var skeleton = GetSkeletonInstance(viewModel.Value.CBodyComponent.SceneNode);
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");
}

View File

@@ -1 +1 @@
1.4c
1.5a

View File

@@ -40,11 +40,21 @@ namespace WeaponPaints
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
{
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
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;
}
}
}
return;
}
@@ -61,12 +71,21 @@ namespace WeaponPaints
if (!isKnife && weapon.CBodyComponent != null && weapon.CBodyComponent.SceneNode != null)
{
var skeleton = GetSkeletonInstance(weapon.CBodyComponent.SceneNode);
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;
}
}
}
}
internal static void GiveKnifeToPlayer(CCSPlayerController? player)
{

View File

@@ -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
{

View File

@@ -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" />

View File

@@ -62,7 +62,8 @@ class UtilsClass
521,
522,
523,
525
525,
526
])
)
continue;

File diff suppressed because one or more lines are too long