AttachThingToSurf(thing, surface);
Strangely, if the surface is a wall, the entered message of the surface's sector is called no matter where the thing is, and yet the thing's sector is not set to the surface's. And also, AttachThingToSurf() sometimes tries to make the thing move to the z axis of the surface - either by a small distance or gradually.