(SurfaceGetType3D / GetSurface / GetSurfaceInfoOn / SurfaceRoadY)
Since 1.30, script surface queries return the terrain surface (cp_grass, cp_gravel, cp_concrete1, …) instead of the roadway surface of road objects that lie on the ground. This covers dz\structures\roads\parts\*, paved town areas and airfield aprons. Elevated objects (roofs, bridges, piers) are still reported correctly.
Measured on vanilla Chernarus (dayzOffline.chernarusplus, no mods): 1,048,576 points at 0.9375 m step over Chernogorsk (x 6200–7160, z 1950–2910), GetGame().SurfaceGetType3D(x, 2000, z, name):
- 1.29.163709: points on road objects return asphalt_ext / concrete_ext / dirt_ext etc.
- 1.30.164078: only ~24% of those points return the road surface (asphalt_ext 19%, concrete_ext 25%, dirt_ext 22% of the 1.29 points). The rest return the terrain surface below the road.
The same loss happens with each of the following:
- GetSurface with SurfaceDetectionType.Roadway, in every RoadSurfaceDetection mode;
- GetSurfaceInfoOn(x, z, height) (new in 1.30);
- SurfaceRoadY / SurfaceRoadY3D, which return the terrain height, so the road is not detected;
- RaycastRV, where the ray hits the terrain and not the road object.
Possibly related 1.30 changes: "Fixed: Specific bridges and piers allowed for water related actions on solid surface"; the new SurfaceInfo API (GetSurfaceInfoOn, GetSurfaceInfoUnderObject).