Hello, I encountered problems using shouldCollide hook in a gamemode. Nothing collides. Problem occurred when player tried to prop-surf.
Extract from gamemode's init.lua:
[code]
local function ShouldCollideTestHook( ent1, ent2 )
if ( ent1:IsPlayer() and ent2:IsPlayerHolding() ) or
( ent2:IsPlayer() and ent1:IsPlayerHolding() ) then
return false
end
end
hook.Add( "ShouldCollide", "ShouldCollideTestHook", ShouldCollideTestHook )[/code]
Quote from wiki: [i]If you return different values between two same entities - you can break physics engine. [/i] And as far as I understand the condition, it will work both ways. Only thing I can suspect is some delays on IsPlayerHolding causing different return values over time. (this doesn't really make sense)
Sorry, you need to Log In to post a reply to this thread.