N11: Build ghost, client flood and shot effects in the playable client

- Build ghost: ClientSession shows a BuildGhost in build mode while the
  client plays, asking Building.check() of its own world and predicted
  player with the mouse's newest look, so it agrees with the server.
- Flooded basins: ClientMirror.follow_flood() spreads the client's flood
  as the server's tide tick does, from the tide and the pieces it has.
  WaterView passes a mask of flooded cells (Flood.pours says when it
  changed) to the sea shader, which leaves dry cells undrawn.
- Shots, impacts and swings: a new FX message (NetFx) goes unreliably on
  the state channel next to each snapshot, with what happened within
  NET_FX_RADIUS_METRES of what the client watches or involving that
  player. ClientGame keeps them in `fx` for views and sound. They change
  no state, so a lost one is a missed flash; sending them reliably would
  add to the traffic a bad link can least afford (N8). The fuzzer covers
  the new parser.
- Captures: client_build and client_build_refused show the ghost in its
  allowed and refused tints; client_basin rings shore ground with
  breakwaters and plays until the tide stands over it, and the server,
  the client's flood and the drawn sea all keep the basin dry.
- Tests: NetFx round trips, limits and malformed input; a landed player's
  shots and impacts reach a client, each matching a server event; the
  client keeps a ringed basin dry through the first rise, floods it with
  no ring, catches up after a long frame; the water mask follows pours.

The held item is still not drawn; that needs the models (A4, #44).

Closes #78

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-13 02:24:16 -05:00
co-authored by Claude Opus 5.5
parent 2973abf144
commit 57faefb81a
22 changed files with 810 additions and 9 deletions
+27
View File
@@ -16,6 +16,8 @@ var link: NetClient = null
var local: LocalServer = null
## The picture of the current match's world, or null before there is one.
var view: MatchView = null
## Where a piece would go, in build mode while playing. A child of `view`.
var ghost: BuildGhost = null
## Every match phase this client has been in, in order, without repeats.
var phases: Array[int] = []
## Frames in which the client's own player was in the match, and frames pumped.
@@ -130,19 +132,44 @@ func _show(delta: float) -> void:
remove_child(view)
view.queue_free()
view = null
ghost = null
if _viewed != null:
view = MatchView.new()
view.setup(_viewed, 0)
add_child(view)
move_child(view, 0)
ghost = BuildGhost.new()
ghost.visible = false
view.add_child(ghost)
if view == null:
return
view.entities.local_id = mirror.own_id if mirror.own_id != 0 else view.entities.local_id
view.entities.barge_at = mirror.barge_at
view.rig.update_aim(input.aiming() and mirror.own_id != 0, delta)
view.sync()
_show_ghost()
if mirror.own_id != 0:
# The player's own look is newer than any command made from it.
view.follow(mirror.own_id, input.pitch, input.yaw)
elif mirror.watched_id == 0 or not view.follow(mirror.watched_id):
view.overview()
## The build ghost, in build mode while this client plays: the piece the next build
## would place, asked of the client's own world and predicted player, as the server
## will ask its own. Its look is the newest the mouse has given.
func _show_ghost() -> void:
if ghost == null:
return
var player: SimEntity = game.prediction.player
if not (input.build_mode and game.playing() and mirror.own_id != 0 and Building.is_allowed(player)):
ghost.visible = false
return
var yaw: int = player.yaw
var pitch: int = player.pitch
var look: PlayerCommand = PlayerCommand.from_input(0, Vector2.ZERO, input.yaw, input.pitch)
player.yaw = look.yaw
player.pitch = look.pitch
ghost.update(game.world, player, input.build_kind, input.material)
player.yaw = yaw
player.pitch = pitch
+12
View File
@@ -15,6 +15,12 @@ uniform float depth_scale = 7.0;
// Width of the foam at the waterline, in metres of water thickness.
uniform float foam_width = 0.6;
uniform float ripple_strength = 0.25;
// Where the flood reaches: one texel per flood cell, white where flooded, covering
// [0, flood_extent] metres on both axes. Dry cells inside it aren't drawn; outside it
// is open sea.
uniform bool use_flood_mask = false;
uniform sampler2D flood_mask : filter_nearest, repeat_disable;
uniform float flood_extent = 1024.0;
varying vec3 world_position;
@@ -44,6 +50,12 @@ void vertex() {
void fragment() {
vec2 p = world_position.xz;
float t = TIME;
if (use_flood_mask) {
vec2 cell_uv = p / flood_extent;
if (all(greaterThanEqual(cell_uv, vec2(0.0))) && all(lessThan(cell_uv, vec2(1.0))) && texture(flood_mask, cell_uv).r < 0.5) {
discard;
}
}
// Thickness of water between this surface and whatever is behind it.
float scene_depth = texture(depth_texture, SCREEN_UV).r;
+50 -4
View File
@@ -1,6 +1,9 @@
## Draws the sea: one flat surface at the simulation's sea level, wide enough to reach
## past the horizon from anywhere on the island. `follow(sim)` moves it whenever the
## tide changes the level, so what players see is always the level the server uses.
## Where the simulation has a flood, the sea is only drawn over the cells it reaches:
## a mask texture of the flooded cells goes to the shader, which leaves dry cells
## (a basin behind a breakwater) bare. The mask is rebuilt only when the flood pours.
## The surface is the only thing here; drowning and swimming live in the simulation.
class_name WaterView
extends Node3D
@@ -14,6 +17,10 @@ const SUBDIVISIONS: int = 32
var level: float = 0.0
var _surface: MeshInstance3D
var _material: ShaderMaterial
var _mask: ImageTexture = null
var _mask_flood: Flood = null
var _mask_pours: int = -1
func _ready() -> void:
@@ -29,10 +36,49 @@ func set_level(sea_level: float) -> void:
_surface.position.y = sea_level
## Matches the surface to the simulation's current sea level.
## Matches the surface to the simulation's current sea level and flood.
func follow(sim: Simulation) -> void:
if not is_equal_approx(sim.sea_level, level) or _surface == null:
set_level(sim.sea_level)
set_flood(sim.flood)
## Draws the sea only over `flood`'s flooded cells, or everywhere for null. Cheap
## when nothing has poured since the last call.
func set_flood(flood: Flood) -> void:
if _surface == null:
_build()
if flood == null:
_mask_flood = null
_mask_pours = -1
_material.set_shader_parameter("use_flood_mask", false)
return
if flood == _mask_flood and flood.pours == _mask_pours:
return
_mask_flood = flood
_mask_pours = flood.pours
var bytes: PackedByteArray = flood.flooded.duplicate()
for index: int in bytes.size():
if bytes[index] != 0:
bytes[index] = 255
var image: Image = Image.create_from_data(flood.side, flood.side, false, Image.FORMAT_R8, bytes)
if _mask == null or _mask.get_width() != flood.side:
_mask = ImageTexture.create_from_image(image)
else:
_mask.update(image)
_material.set_shader_parameter("flood_mask", _mask)
_material.set_shader_parameter("flood_extent", flood.side * flood.cell)
_material.set_shader_parameter("use_flood_mask", true)
## True if the sea is drawn over the world point (x, z): flooded, or off the grid.
func shows_water_at(x: float, z: float) -> bool:
if _mask_flood == null:
return true
var extent: float = _mask_flood.side * _mask_flood.cell
if x < 0.0 or z < 0.0 or x >= extent or z >= extent:
return true
return _mask_flood.is_flooded(x, z)
func surface() -> MeshInstance3D:
@@ -46,9 +92,9 @@ func _build() -> void:
mesh.size = Vector2(SIZE, SIZE)
mesh.subdivide_width = SUBDIVISIONS
mesh.subdivide_depth = SUBDIVISIONS
var material: ShaderMaterial = ShaderMaterial.new()
material.shader = SHADER
mesh.material = material
_material = ShaderMaterial.new()
_material.shader = SHADER
mesh.material = _material
_surface = MeshInstance3D.new()
_surface.name = "Sea"
_surface.mesh = mesh
+18
View File
@@ -18,6 +18,8 @@ extends RefCounted
## The most ticks predicted in one advance(). Further behind than this, the ticks in
## between go without commands.
const MAX_CATCH_UP_TICKS: int = 12
## FX records kept for views at most; older ones are dropped.
const MAX_FX: int = 256
var receiver: SnapshotReceiver = SnapshotReceiver.new()
var prediction: ClientPrediction = ClientPrediction.new()
@@ -52,6 +54,12 @@ var bad_packets: int = 0
## expect `world` the moment a notice arrives leave it off. `make_world` must be safe
## to call from another thread when it is on.
var build_in_background: bool = false
## Shots, impacts and swings the server reported (NetFx records, positions in world
## metres), oldest first, for views and sound to take. Kept to MAX_FX; whoever draws
## them empties it.
var fx: Array[Dictionary] = []
## FX records received in all.
var fx_received: int = 0
## Called after each snapshot has been taken in, with no arguments. Soak tests use it
## to compare the client's world with the server's at that moment.
var on_snapshot: Callable = Callable()
@@ -186,6 +194,16 @@ func _receive_now(channel: int, bytes: PackedByteArray) -> void:
bad_packets += 1
return
_take_notice(notice)
elif not bytes.is_empty() and bytes[0] == NetFx.MSG_FX:
var message: Dictionary = NetFx.decode(bytes)
if message.is_empty():
bad_packets += 1
return
for record: Dictionary in message["events"]:
fx.append(record)
fx_received += 1
while fx.size() > MAX_FX:
fx.pop_front()
elif receiver.apply(bytes):
_take_snapshot()
if on_snapshot.is_valid():
+37
View File
@@ -21,8 +21,14 @@ var barge_at: Vector3 = Vector3.INF
## The moment being drawn, in simulation ticks.
var time: float = 0.0
## Ticks of flood the client works through at most in one frame.
const MAX_FLOOD_CATCH_UP_TICKS: int = 90
var _drop: Drop = null
var _drop_world: Simulation = null
## The last tick the client's flood was brought up to, and for which world.
var _flood_tick: int = 0
var _flood_world: Simulation = null
func sync(game: ClientGame) -> void:
@@ -44,6 +50,7 @@ func sync(game: ClientGame) -> void:
time = float(receiver.sim_tick)
world.tick = maxi(floori(time), 0)
world.sea_level = world.tide.level_at(world.tick) if world.tide != null else receiver.sea_level
follow_flood(world)
if in_match:
if _drop == null or _drop_world != world:
@@ -100,6 +107,36 @@ func sync(game: ClientGame) -> void:
world.projectiles = projectiles
## Spreads the client's flood as the server's tide tick does: across the edges the
## current breakwaters leave open once a second, and filling breached basins every
## tick. The server never sends the flood; it follows from the sea level and the
## pieces, which the client already has. It is only drawn (and used by prediction),
## so a breakwater that arrives a moment late can at worst show water a little early.
func follow_flood(world: Simulation) -> void:
if world.flood == null:
return
if _flood_world != world:
_flood_world = world
_flood_tick = world.tick
world.flood.update(world.sea_level, world.structures, 0.0)
return
if world.tide == null or world.tick <= _flood_tick:
return
# After a long gap (a stall, or joining late) catch up on the last few seconds only.
var first: int = maxi(_flood_tick + 1, world.tick - MAX_FLOOD_CATCH_UP_TICKS)
for tick: int in range(first, world.tick + 1):
var level: float = world.tide.level_at(tick)
if tick % Tuning.TICK_RATE_HZ == 0:
world.flood.update(level, world.structures, Simulation.SECONDS_PER_TICK)
else:
world.flood.flow(level, Simulation.SECONDS_PER_TICK)
if first > _flood_tick + 1:
# The skipped time still fills basins, and the sea still reaches what it can.
world.flood.update(world.sea_level, world.structures, (first - _flood_tick - 1) * Simulation.SECONDS_PER_TICK)
_flood_tick = world.tick
world.flood.sea_level = world.sea_level
func _show_player(entity: SimEntity, record: PackedInt32Array, shown: Dictionary) -> void:
var flags: int = record[NetSnapshot.R_FLAGS]
entity.yaw = posmod(roundi(float(shown["yaw"]) / TAU * PlayerCommand.YAW_STEPS), PlayerCommand.YAW_STEPS)
+174
View File
@@ -0,0 +1,174 @@
## Things that happen and are gone, on the wire: shots fired, where shots landed, and
## harvesting swings. They change nothing a client keeps (damage, broken props and
## pieces arrive in snapshots and WORLD), so they are only for drawing and sound: an
## FX message goes unreliably on the state channel next to each snapshot, and a lost
## one is a missed flash, not a wrong world. Sending them reliably would add to the
## reliable traffic that has to be acknowledged, which a bad link can least afford.
##
## server -> FX
## u8 type, u32 simulation tick of the newest event, u8 count, then events:
## u8 kind, u8 ticks before the newest, varint player entity, u8 item code plus one,
## s16 x 3 position in decimetres,
## SHOT: s16 yaw and s16 pitch of the aim, in 1/10000 radian,
## IMPACT: u8 what was hit (Weapons.HIT_), varint target,
## HARVEST: varint prop, or 0 and varint piece plus one for a piece.
##
## Positions are where the shot began, where it landed, or the swinging player's feet.
## The decoder returns an empty Dictionary for anything malformed and never raises.
class_name NetFx
extends RefCounted
const MSG_FX: int = 18
const SHOT: int = 1
const IMPACT: int = 2
const HARVEST: int = 3
const KIND_NAMES: Array[String] = ["", "shot", "impact", "harvest"]
const HEADER_BYTES: int = 6
const MAX_EVENTS: int = 255
## Decimetres: positions to 10 cm, over +/- 3.2 km.
const POSITION_SCALE: float = 10.0
const ANGLE_SCALE: float = 10000.0
## The FX record for a simulation event, or an empty Dictionary for events that aren't
## FX. `players` maps entity IDs to their feet, for harvest swings.
static func from_event(event: Dictionary, tick: int, players: Dictionary = {}) -> Dictionary:
match String(event.get("type", "")):
"shot":
var direction: Vector3 = event["direction"]
return {
"kind": SHOT, "tick": tick, "player": int(event["player"]), "item": int(event["item"]),
"position": event["from"],
"yaw": atan2(direction.x, direction.z), "pitch": asin(clampf(direction.y, -1.0, 1.0)),
}
"impact":
return {
"kind": IMPACT, "tick": tick, "player": int(event["player"]), "item": int(event["item"]),
"position": event["point"], "hit": int(event["hit"]), "target": int(event["target"]),
}
"harvest", "piece_hit":
var player: int = int(event["player"])
return {
"kind": HARVEST, "tick": tick, "player": player, "item": -1,
"position": players.get(player, Vector3.ZERO),
"prop": int(event.get("prop", -1)), "piece": int(event.get("piece", 0)),
}
return {}
## Encodes up to MAX_EVENTS records, newest last, keeping to `max_bytes`. Records past
## the limit are left out, oldest first. Returns an empty array for none.
static func encode(records: Array[Dictionary], max_bytes: int = Tuning.NET_SNAPSHOT_MAX_BYTES) -> PackedByteArray:
if records.is_empty():
return PackedByteArray()
var newest: int = int(records[records.size() - 1]["tick"])
var bodies: Array[PackedByteArray] = []
var total: int = HEADER_BYTES
for index: int in range(records.size() - 1, -1, -1):
var record: Dictionary = records[index]
var back: int = newest - int(record["tick"])
if back < 0 or back > 255:
continue
var body: PackedByteArray = _encode_one(record, back)
if total + body.size() > max_bytes or bodies.size() >= MAX_EVENTS:
break
total += body.size()
bodies.push_front(body)
if bodies.is_empty():
return PackedByteArray()
var out: StreamPeerBuffer = StreamPeerBuffer.new()
out.big_endian = false
out.put_u8(MSG_FX)
out.put_u32(newest)
out.put_u8(bodies.size())
for body: PackedByteArray in bodies:
out.put_data(body)
return out.data_array
static func _encode_one(record: Dictionary, back: int) -> PackedByteArray:
var out: StreamPeerBuffer = StreamPeerBuffer.new()
out.big_endian = false
var kind: int = int(record["kind"])
out.put_u8(kind)
out.put_u8(back)
NetSnapshot._put_varint(out, maxi(int(record["player"]), 0))
out.put_u8(clampi(int(record["item"]) + 1, 0, 255))
var position: Vector3 = record["position"]
for value: float in [position.x, position.y, position.z]:
out.put_16(clampi(roundi(value * POSITION_SCALE), -32768, 32767))
match kind:
SHOT:
out.put_16(clampi(roundi(wrapf(float(record["yaw"]), -PI, PI) * ANGLE_SCALE), -32768, 32767))
out.put_16(clampi(roundi(float(record["pitch"]) * ANGLE_SCALE), -32768, 32767))
IMPACT:
out.put_u8(clampi(int(record["hit"]), 0, 255))
NetSnapshot._put_varint(out, maxi(int(record["target"]), 0))
HARVEST:
NetSnapshot._put_varint(out, maxi(int(record["prop"]), -1) + 1)
NetSnapshot._put_varint(out, maxi(int(record["piece"]), 0))
return out.data_array
## {"tick": newest tick, "events": Array of records as from_event() makes them, with
## positions and angles as decoded}, or {} if malformed.
static func decode(bytes: PackedByteArray) -> Dictionary:
if bytes.size() < HEADER_BYTES or bytes[0] != MSG_FX:
return {}
var newest: int = bytes.decode_u32(1)
var count: int = bytes[5]
var cursor: Array[int] = [HEADER_BYTES]
var events: Array[Dictionary] = []
for _index: int in count:
if cursor[0] + 2 > bytes.size():
return {}
var kind: int = bytes[cursor[0]]
var back: int = bytes[cursor[0] + 1]
cursor[0] += 2
if kind < SHOT or kind > HARVEST:
return {}
var player: int = NetSnapshot._read_varint(bytes, cursor)
if player < 0 or cursor[0] + 7 > bytes.size():
return {}
var item: int = bytes[cursor[0]] - 1
var position: Vector3 = Vector3(
bytes.decode_s16(cursor[0] + 1) / POSITION_SCALE,
bytes.decode_s16(cursor[0] + 3) / POSITION_SCALE,
bytes.decode_s16(cursor[0] + 5) / POSITION_SCALE)
cursor[0] += 7
var record: Dictionary = {"kind": kind, "tick": newest - back, "player": player, "item": item, "position": position}
match kind:
SHOT:
if cursor[0] + 4 > bytes.size():
return {}
record["yaw"] = bytes.decode_s16(cursor[0]) / ANGLE_SCALE
record["pitch"] = bytes.decode_s16(cursor[0] + 2) / ANGLE_SCALE
cursor[0] += 4
IMPACT:
if cursor[0] + 1 > bytes.size():
return {}
record["hit"] = bytes[cursor[0]]
cursor[0] += 1
record["target"] = NetSnapshot._read_varint(bytes, cursor)
if int(record["target"]) < 0:
return {}
HARVEST:
var prop: int = NetSnapshot._read_varint(bytes, cursor)
var piece: int = NetSnapshot._read_varint(bytes, cursor)
if prop < 0 or piece < 0:
return {}
record["prop"] = prop - 1
record["piece"] = piece
events.append(record)
if cursor[0] != bytes.size():
return {}
return {"tick": newest, "events": events}
## The direction a SHOT record aims along.
static func aim(record: Dictionary) -> Vector3:
var yaw: float = float(record["yaw"])
var pitch: float = float(record["pitch"])
return Vector3(sin(yaw) * cos(pitch), sin(pitch), cos(yaw) * cos(pitch))
+1
View File
@@ -0,0 +1 @@
uid://byl2i67hpew72
+3
View File
@@ -53,6 +53,9 @@ func tick(client: ClientGame) -> void:
client.receive(NetProtocol.CHANNEL_CONTROL, game.own_changes[HANDLE])
if game.snapshot_due():
client.receive(NetProtocol.CHANNEL_STATE, game.snapshot_for(HANDLE))
var fx: PackedByteArray = game.fx_for(HANDLE)
if not fx.is_empty():
client.receive(NetProtocol.CHANNEL_STATE, fx)
## What someone is sent on joining: the match notice, then the whole world.
+54
View File
@@ -27,6 +27,11 @@ var own_changes: Dictionary = {}
var _last_command: Dictionary = {}
## Handle -> what they were last told they carry, as _own_notice() lists it.
var _own_sent: Dictionary = {}
## FX records (NetFx) from the last few simulation ticks, oldest first, and the newest
## simulation tick whose FX each handle has been sent.
var _fx: Array[Dictionary] = []
var _fx_sent: Dictionary = {}
var _fx_tick: int = -1
func _init(server_loop: ServerLoop, server_net: NetServer) -> void:
@@ -116,6 +121,9 @@ func after_tick() -> void:
sender.reset()
for handle: int in _last_command:
_last_command[handle] = -1
_fx.clear()
_fx_sent.clear()
_fx_tick = -1
net.match_seed = flow.current_seed()
if changed:
for handle: int in net.handles():
@@ -138,9 +146,55 @@ func after_tick() -> void:
if not bytes.is_empty():
own_changes[handle] = bytes
net.send(handle, NetProtocol.CHANNEL_CONTROL, bytes, true)
_collect_fx()
for handle: int in net.handles():
if sender.has_client(handle) and snapshot_due_for(handle):
net.send(handle, NetProtocol.CHANNEL_STATE, snapshot_for(handle), false)
var fx: PackedByteArray = fx_for(handle)
if not fx.is_empty():
net.send(handle, NetProtocol.CHANNEL_STATE, fx, false)
## Keeps this tick's shots, impacts and swings as FX records, once per simulation tick
## (outside a match the simulation isn't stepped and its events are stale).
func _collect_fx() -> void:
var sim: Simulation = loop.sim
if not loop.match_flow.in_match() or sim.tick == _fx_tick:
return
_fx_tick = sim.tick
var feet: Dictionary = {}
for event: Dictionary in sim.events:
if event["type"] == "harvest" or event["type"] == "piece_hit":
var player: SimEntity = sim.entities.find(int(event["player"]))
if player != null:
feet[player.id] = player.position
var record: Dictionary = NetFx.from_event(event, sim.tick, feet)
if not record.is_empty():
_fx.append(record)
# A client is sent its FX at least every snapshot interval; keep a little more.
var oldest: int = sim.tick - Tuning.NET_SNAPSHOT_INTERVAL_TICKS * 4
while not _fx.is_empty() and int(_fx[0]["tick"]) <= oldest:
_fx.pop_front()
## An FX message of what happened near what `handle` watches since it was last sent
## one, or nothing. Marks those as sent.
func fx_for(handle: int) -> PackedByteArray:
var since: int = int(_fx_sent.get(handle, -1))
_fx_sent[handle] = _fx_tick
if _fx.is_empty():
return PackedByteArray()
var watched: int = viewer_of(handle)
var viewer: SimEntity = loop.sim.entities.find(watched) if watched != 0 else null
var limit: float = Tuning.NET_FX_RADIUS_METRES * Tuning.NET_FX_RADIUS_METRES
var chosen: Array[Dictionary] = []
for record: Dictionary in _fx:
if int(record["tick"]) <= since:
continue
var involved: bool = watched != 0 and (int(record["player"]) == watched or int(record.get("target", 0)) == watched)
if involved or (viewer != null and (record["position"] as Vector3).distance_squared_to(viewer.position) <= limit):
chosen.append(record)
return NetFx.encode(chosen)
## True on the ticks a snapshot goes out to an owner that carries packets for a single
+4
View File
@@ -30,6 +30,9 @@ var flooded: PackedByteArray = PackedByteArray()
var fill_group: PackedInt32Array = PackedInt32Array()
## The sea level the flood was last spread for.
var sea_level: float = Tuning.SEA_LEVEL_START
## Counts every pour, so a view can tell the flooded cells changed without comparing
## them. Not match state.
var pours: int = 0
## Filling groups: group ID -> {"level": float, "cells": PackedInt32Array}.
var _groups: Dictionary = {}
@@ -233,6 +236,7 @@ func _passable(from: int, to: int) -> bool:
## Water pours across an edge into `to`, and on through everything it can reach. The
## reached cells fill together, from their lowest floor up.
func _pour(to: int) -> int:
pours += 1
flooded[to] = 1
var queue: PackedInt32Array = PackedInt32Array([to])
_spread(queue)
+3
View File
@@ -16,6 +16,9 @@ const NET_SNAPSHOT_INTERVAL_TICKS: int = 2
## The most bytes in one snapshot. Keeps a packet inside one UDP datagram on any
## ordinary link, and a client under 18 KB/s before packet headers.
const NET_SNAPSHOT_MAX_BYTES: int = 1200
## Shots, impacts and swings further than this from what a client watches aren't sent
## to it, unless they involve the player it watches.
const NET_FX_RADIUS_METRES: float = 250.0
## A client is sent other players and shots within this many metres on the map of the
## player it is watching: a little further than the longest weapon reaches.
const NET_INTEREST_PLAYERS_METRES: float = 380.0