mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-04-25 18:26:26 +00:00
fix(gloves): apply hotfix, a better solution may be possible
This commit is contained in:
@@ -385,13 +385,6 @@ namespace WeaponPaints
|
|||||||
if (pawn == null || !pawn.IsValid)
|
if (pawn == null || !pawn.IsValid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var model = pawn.CBodyComponent?.SceneNode?.GetSkeletonInstance()?.ModelState.ModelName ?? string.Empty;
|
|
||||||
if (!string.IsNullOrEmpty(model))
|
|
||||||
{
|
|
||||||
pawn.SetModel("characters/models/tm_jumpsuit/tm_jumpsuit_varianta.vmdl");
|
|
||||||
pawn.SetModel(model);
|
|
||||||
}
|
|
||||||
|
|
||||||
CEconItemView item = pawn.EconGloves;
|
CEconItemView item = pawn.EconGloves;
|
||||||
|
|
||||||
item.NetworkedDynamicAttributes.Attributes.RemoveAll();
|
item.NetworkedDynamicAttributes.Attributes.RemoveAll();
|
||||||
@@ -429,7 +422,8 @@ namespace WeaponPaints
|
|||||||
|
|
||||||
item.Initialized = true;
|
item.Initialized = true;
|
||||||
|
|
||||||
SetBodygroup(pawn, "default_gloves", 1);
|
SetBodygroup(pawn, "first_or_third_person", 0);
|
||||||
|
AddTimer(0.2f, () => SetBodygroup(pawn, "first_or_third_person", 1), TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
}, TimerFlags.STOP_ON_MAPCHANGE);
|
}, TimerFlags.STOP_ON_MAPCHANGE);
|
||||||
|
|||||||
Reference in New Issue
Block a user