Skip to content

Commit

Permalink
Env variable for player_move_speed
Browse files Browse the repository at this point in the history
  • Loading branch information
hortonew committed Feb 23, 2025
1 parent ac54545 commit 6de8009
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion k8s/manifests/multiplayer-game-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
spec:
containers:
- name: multiplayer-bevy-server
image: hortonew/multiplayer-bevy-server:v0.4.0
image: hortonew/multiplayer-bevy-server:v0.5.1
ports:
- containerPort: 5000
env:
Expand All @@ -33,6 +33,8 @@ spec:
value: "10"
- name: CLIENT_DISCONNECT_GRACE_PERIOD
value: "10"
- name: PLAYER_MOVE_SPEED
value: "5.0"
resources:
requests:
memory: "64Mi"
Expand Down
2 changes: 1 addition & 1 deletion server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl Default for ServerSettings {
Self {
port: env::var("SERVER_PORT").ok().and_then(|s| s.parse().ok()).unwrap_or(5000),
max_clients: env::var("MAX_CLIENTS").ok().and_then(|s| s.parse().ok()).unwrap_or(64),
player_move_speed: 1.0,
player_move_speed: env::var("PLAYER_MOVE_SPEED").ok().and_then(|s| s.parse().ok()).unwrap_or(1.0),
client_disconnect_grace_period: env::var("CLIENT_DISCONNECT_GRACE_PERIOD")
.ok()
.and_then(|s| s.parse().ok())
Expand Down

0 comments on commit 6de8009

Please # to comment.