Closed wrefgtzweve closed 8 months ago
The only thing that advdupe2 should clamp is position/rotation of pasted entities. I think it already does that.
It currently isn't being clamped in DoGenericPhysics
, CreateConstraintFromTable
and CreateEntityFromTable
which can all be abused for instant crazy physics crashes. The reason i chose the full recursive logic is to prevent any future possible abuse. I chose 10000 as i was able to trigger crazyphysics with relatively low values such as 15000.
The problem with clamping it everywhere is you're bound to break some dupes with that. We should just clamp pos and angle.
This might fuck up pasting near the edge of big maps. Need to test.
The size of gm_flatgrass extends to 15359.968750. I think the limit will need to be 16384
Yeah im not sure how to handle that yet, if i remember correctly source maps can be 32k x 32k however even a limit of 16k causes crazyphysics.
Properly clamps input vectors and angles to prevent abuse