M2.5: wildlife, wolves, hunting, fishing and sleeping on the server
This commit is contained in:
@@ -33,6 +33,9 @@ func interact_prompt(p: Node) -> String:
|
||||
s += " (you need a weapon)"
|
||||
return s
|
||||
|
||||
func _pick_target() -> Node3D:
|
||||
return pack.target_for(self)
|
||||
|
||||
func _think(dt: float) -> void:
|
||||
var pp: Vector3 = player.global_position
|
||||
var d := global_position.distance_to(pp)
|
||||
@@ -85,7 +88,7 @@ func _think_hunt(pp: Vector3, d: float) -> void:
|
||||
match state:
|
||||
"lunge":
|
||||
# Break off first if you've reached a fire or it's taking too long.
|
||||
if _state_t <= 0.0 or not pack.may_close_in():
|
||||
if _state_t <= 0.0 or not pack.may_close_in(player):
|
||||
state = "stalk"
|
||||
pack.lunge_done(self)
|
||||
else:
|
||||
@@ -98,7 +101,7 @@ func _think_hunt(pp: Vector3, d: float) -> void:
|
||||
_:
|
||||
state = "stalk"
|
||||
_go_to(pack.circle_point(self))
|
||||
if pack.request_lunge(self):
|
||||
if pack.request_lunge(self, player):
|
||||
state = "lunge"
|
||||
_state_t = 4.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user