Prop physics crash server?

Crazy physics on [313][prop_physics] [Ang:-nan,nan,180.000000] [Pos:-nan,-nan,nan] - removing

I get this error right before the gmod ttt server crashes, please help as it gets irratating loosing members cus of this 1 reson, this happens multiple times on 67thway_v6, greenwood estates, And waterworld, (the 3 maps my server plays.

I don’t think we’ll ever see an official fix for this; until then you can use this fix that seems to help.


local freezespeed = 500
local removespeed = 4000
hook.Add("Think","AMB_CrashCatcher",function()
        for k, ent in pairs(ents.FindByClass("prop_ragdoll")) do
                if IsValid(ent) then
                        if ent.player_ragdoll then
                                local velo = ent:GetVelocity( ):Length()
                                local ply = false
                                if IsValid(ent:GetOwner()) then
                                        ply = ent:GetOwner()
                                end    
                                if velo >= removespeed then
                                        ent:Remove()
                                        ServerLog("[!CRASHCATCHER!] Caught ragdoll entity moving too fast ("..velo.."), removing offending ragdoll entity from world.
")
                                        local messageToShow = "[CRASH PREVENTION] A ragdoll was removed to prevent server crashing. It was "
                                        if CORPSE.GetFound(ent, true) then
                                                PrintMessage(HUD_PRINTTALK, messageToShow .. "an unID'd body.")
                                        else
                                                PrintMessage(HUD_PRINTTALK, messageToShow .. ent:GetNWString("nick") .. "'s body.")
                                        end
                                elseif velo >= freezespeed then
                                        AMB_KillVelocity(ent)
                                        ServerLog("[!CRASHCATCHER!] Caught ragdoll entity moving too fast ("..velo.."), disabling motion. 
")
                                end
                        end
                end
        end
end)
 
function AMB_SetSubPhysMotionEnabled(ent, enable)
        if not IsValid(ent) then return end
   
        ent:SetVelocity(vector_origin)
       
        if !(enable) then
                ent:SetColor(Color(255,0,255,255))
        else
                ent:SetColor(Color(255,255,255,255))
        end
       
        if !(enable) then
                if IsValid(ent:GetOwner()) then
                        ent:GetOwner():GetWeapon("weapon_zm_carry"):Reset(false)
                end
                --ent:SetPos(ent:GetPos()+Vector(0,0,50))
        end
 
        for i=0, ent:GetPhysicsObjectCount()-1 do
                local subphys = ent:GetPhysicsObjectNum(i)
                if IsValid(subphys) then
                        subphys:EnableMotion(enable)
                        if !(enable) then
                                subphys:SetVelocity(vector_origin)
                                subphys:SetMass(subphys:GetMass()*20)
                        end
                        if enable then
                                subphys:SetMass(subphys:GetMass()/20)
                                subphys:Wake()
                        end
                end
        end
       
       
       
        ent:SetVelocity(vector_origin)
       
end
 
function AMB_KillVelocity(ent)
   AMB_SetSubPhysMotionEnabled(ent, false)
   timer.Simple(3, function() AMB_SetSubPhysMotionEnabled(ent, true) end)
end

*Updated thanks to code_gs, still a good thing to have even though it might not solve the crazy physics on props. There is a script that removes props when the round starts I think.

That script is for ragdolls only. Also, that’s the old version of the script.

Are you talking about this one as the latest?? http://forum.facepunch.com/showthread.php?t=1347114

Yes.