Plot borders: walls get real thickness and the CHECKERED face (faces of a flat box were not drawn)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9102e0a1fb
commit
bd0c405e26
@@ -11,6 +11,7 @@ const PLOT_COLOR = { mine: 0x4FC3F7, free: 0x66DD66, auction: 0xFFD54F, taken: 0
|
||||
const SHOW_TICKS = 100 // 5 секунд після входу на ділянку
|
||||
const WALL_BOTTOM = -64 // стіна межі стоїть на всю висоту світу й не рухається разом із гравцем
|
||||
const WALL_TOP = 320
|
||||
const WALL_HALF = 1 / 16 // пів товщини стіни: у плоскої рамки Create не малює площину
|
||||
|
||||
let rpPlots = [] // { id, kind, walls: [[x1, z1, x2, z2], …] }
|
||||
let rpByChunk = {} // "cx,cz" -> індекс у rpPlots
|
||||
@@ -82,7 +83,7 @@ function rpDraw () {
|
||||
var colour = PLOT_COLOR[plot.kind] || PLOT_COLOR.taken
|
||||
for (var w = 0; w < plot.walls.length; w++) {
|
||||
var wall = plot.walls[w]
|
||||
outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0], WALL_BOTTOM, wall[1], wall[2], WALL_TOP, wall[3])).colored(colour).lineWidth(1 / 16).withFaceTexture(RpTextures.THIN_CHECKERED).disableCull()
|
||||
outliner.showAABB('createrp_plot_' + plot.id + '_' + w, new RpAABB(wall[0] - WALL_HALF, WALL_BOTTOM, wall[1] - WALL_HALF, wall[2] + WALL_HALF, WALL_TOP, wall[3] + WALL_HALF)).colored(colour).lineWidth(1 / 16).withFaceTexture(RpTextures.CHECKERED)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user