[Murder] Invisible Weapons

Weapons just disappear (but they still visible for other players) when occur little crashes on any server (actually it’s broken since some update of 2016)
I think that’s something about hands
There is the hands code on sv_player:


function GM:PlayerSpawn( ply )

	-- If the player doesn't have a team
	-- then spawn him as a spectator
	if ply:Team() == 1 || ply:Team() == TEAM_UNASSIGNED then

		GAMEMODE:PlayerSpawnAsSpectator( ply )
		return
	
	end

	-- Stop observer mode
	ply:UnCSpectate()
	ply:SetMurdererRevealed(false)

	ply:SetFlashlightCharge(1)

	player_manager.OnPlayerSpawn( ply )
	player_manager.RunClass( ply, "Spawn" )

	hook.Call( "PlayerLoadout", GAMEMODE, ply )
	hook.Call( "PlayerSetModel", GAMEMODE, ply )

	ply:CalculateSpeed()

	

	local hands = ents.Create( "gmod_hands" )
	if ( IsValid( hands ) ) then
		ply:SetHands( hands )
		hands:SetOwner( ply )

		-- Which hands should we use?
		local cl_playermodel = ply:GetInfo( "cl_playermodel" )
		local info = player_manager.TranslatePlayerHands( cl_playermodel )
		if ( info ) then
			hands:SetModel( info.model )
			hands:SetSkin( info.skin )
			hands:SetBodyGroups( info.body )
		end

		-- Attach them to the viewmodel
		local vm = ply:GetViewModel( 0 )
		hands:AttachToViewmodel( vm )

		vm:DeleteOnRemove( hands )
		ply:DeleteOnRemove( hands )

		hands:Spawn()
	end

	local spawnPoint = self:PlayerSelectTeamSpawn(ply:Team(), ply)
	if IsValid(spawnPoint) then
		ply:SetPos(spawnPoint:GetPos())
	end
end

and on cl_init.lua:


function GM:PostDrawViewModel( vm, ply, weapon )

	if ( weapon.UseHands || !weapon:IsScripted() ) then

		local hands = LocalPlayer():GetHands()
		if ( IsValid( hands ) ) then hands:DrawModel() end

	end

end

Not even Mechanical Mind (creator of Murder) could fix it

It’s probably fixable by refactoring murder to not fall under the conditions

Well… I was so tired when i just tried to do by myself. Now I fixed it. Ty for your attention :wink:
Also: Was just showing CSS Arctic Hands (by default), but not anymore :wink: