add Support more swep features and c_arm system
Description: Currently, hl2sb has limited SWEP support and does not provide a built-in c_arms (first-person arms) system similar to Garry’s Mod. This feature request aims to expand SWEP capabilities and integrate a flexible c_arms system for improved first-person visuals and customization.
Motivation / Use cases:
Allow Lua-defined SWEPs to use UseHands = true and display matching player hand models in first-person view.
Enable different player models/skins to use different first-person hand models.
Provide API for Lua to modify hand materials, skins, and animations dynamically.
Make it easier for modders to port or create weapons with more immersive visuals.
Proposed features:
- C++ backend changes (hl2sb-src)
Implement a C_Arms entity that loads a separate first-person arms model.
Sync animations with the active viewmodel’s bones.
Expose C++ methods to Lua for model/material/skin control.
- Lua API changes (hl2sb)
Add SWEP.UseHands boolean property.
Add player:GetHands() and player:SetHandsModel() functions.
Allow setting material/skin on c_arms from Lua scripts.
- Resource support
Include or document example c_arms model paths (e.g., models/weapons/c_arms_citizen.mdl).
Provide example SWEP that uses c_arms.
Benefits:
Closer parity with Garry’s Mod’s SWEP and c_arms features.
Greater flexibility for Lua modders.
Enhanced first-person immersion for weapon mods.
References:
hl2sb
hl2sb-src
Garry’s Mod SWEP & c_arms documentation:
SWEP.UseHands usage
player:GetHands() API