M2.6: server rules (PvP, raiding, locks and friends, death penalty, difficulty, wolf grace), chat, admin commands, server console
This commit is contained in:
@@ -19,6 +19,7 @@ var info: Dictionary = {}
|
||||
var anim := Anim.IDLE
|
||||
var held := ""
|
||||
var tag: Label3D
|
||||
var hitbox: AnimatableBody3D
|
||||
|
||||
var _buf: Array = [] ## [t, pos, yaw, pitch, anim, held], oldest first
|
||||
var _body: Node3D
|
||||
@@ -57,6 +58,22 @@ func setup(p: int, d: Dictionary) -> void:
|
||||
_held_mi.rotation = Vector3(-PI * 0.5, 0, 0) # item handles run along +Y; point them forward
|
||||
_held_mi.scale = Vector3.ONE * 0.85
|
||||
_arms[1].add_child(_held_mi)
|
||||
# A hitbox for swinging at them when the server has PvP on (hands.gd
|
||||
# looks for it; the server decides what the hit does). Layer 5 (value
|
||||
# 16): nothing walks into it.
|
||||
hitbox = AnimatableBody3D.new()
|
||||
hitbox.sync_to_physics = false
|
||||
hitbox.collision_layer = 16
|
||||
hitbox.collision_mask = 0
|
||||
hitbox.set_meta("avatar_peer", p)
|
||||
var cs := CollisionShape3D.new()
|
||||
var cap := CapsuleShape3D.new()
|
||||
cap.radius = 0.4
|
||||
cap.height = 1.8
|
||||
cs.shape = cap
|
||||
cs.position = Vector3(0, 0.9, 0)
|
||||
hitbox.add_child(cs)
|
||||
add_child(hitbox)
|
||||
tag = Label3D.new()
|
||||
tag.text = String(d.get("name", "?"))
|
||||
tag.billboard = BaseMaterial3D.BILLBOARD_ENABLED
|
||||
|
||||
Reference in New Issue
Block a user