Map: other players in your land shown on a co-op server, never with PvP on
This commit is contained in:
@@ -194,9 +194,14 @@ func _pvp() -> void:
|
||||
await _bob({"do": "ask", "what": "hit_player", "args": [Net.local_peer]})
|
||||
await _sleep(0.6)
|
||||
check(PN.hurts == hurts0 and player.survival.health >= h0 - 0.5, "with PvP off, Bob's club does nothing to Alice")
|
||||
# The map (issue #1): with PvP off, Bob is on Alice's map...
|
||||
var MS: Script = load("res://scripts/ui/map_screen.gd")
|
||||
await _until(func(): return not MS.others(world).is_empty(), 3.0)
|
||||
check(MS.others(world).any(func(o): return o.name == "Bob"), "co-op: Bob shows on Alice's map (%s)" % [MS.others(world).map(func(o): return o.name)])
|
||||
C.say("/set pvp true")
|
||||
await _until(func(): return bool(Net.server_info.get("pvp", false)), 2.0)
|
||||
check(bool(Net.server_info.get("pvp", false)), "Alice turns PvP on, and every game hears the new rules")
|
||||
check(MS.others(world).is_empty(), "...and with PvP on, nobody's on the map but you")
|
||||
await _bob({"do": "ask", "what": "hit_player", "args": [Net.local_peer]})
|
||||
await _until(func(): return PN.hurts > hurts0, 2.0)
|
||||
await _sleep(0.3)
|
||||
|
||||
Reference in New Issue
Block a user