P5 the Old Stag: standing stones and altar, three-phase boss with charges, stun window, spirit wolves and stomps; antler pickaxe and trophy; group scaling and credit for every fighter; online 3-player test (protocol 12)
This commit is contained in:
@@ -545,6 +545,25 @@ func _scatter_bushes() -> void:
|
||||
_group(groups, p.x, p.y, vi, Transform3D(_ground_basis(n, 0.5, yaw, s), Vector3(p.x, h - 0.1, p.y)))
|
||||
_flush(groups, meshes, true, "Bushes")
|
||||
|
||||
## Hides the decorative bushes within `r` of `center` (the barrow's and the
|
||||
## standing stones' clearings: they're placed after the undergrowth).
|
||||
## Deterministic, like the rest of the scenery.
|
||||
func clear_bushes(center: Vector3, r: float) -> int:
|
||||
var root := get_node_or_null("Bushes")
|
||||
if root == null:
|
||||
return 0
|
||||
var n := 0
|
||||
for mmi in root.get_children():
|
||||
if not mmi is MultiMeshInstance3D:
|
||||
continue
|
||||
var mm: MultiMesh = mmi.multimesh
|
||||
for i in range(mm.instance_count):
|
||||
var xf: Transform3D = mmi.global_transform * mm.get_instance_transform(i)
|
||||
if Vector2(xf.origin.x - center.x, xf.origin.z - center.z).length() < r:
|
||||
mm.set_instance_transform(i, Transform3D(xf.basis, xf.origin + Vector3(0, -1000, 0)))
|
||||
n += 1
|
||||
return n
|
||||
|
||||
func _place_logs() -> void:
|
||||
var root := Node3D.new()
|
||||
root.name = "Logs"
|
||||
|
||||
Reference in New Issue
Block a user