mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'zesterer/fixes' into 'master'
Various minor UX improvements based on player feedback See merge request veloren/veloren!3931
This commit is contained in:
commit
3afeca67c5
@ -62,6 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
particularily noticeable when opening the map screen (which involves rescaling a few large
|
particularily noticeable when opening the map screen (which involves rescaling a few large
|
||||||
images) and also when using the voxel minimap view (where a medium size image is updated often).
|
images) and also when using the voxel minimap view (where a medium size image is updated often).
|
||||||
- Towns now have a variety of sizes
|
- Towns now have a variety of sizes
|
||||||
|
- The game now starts in fullscreen by default
|
||||||
|
- Default audio volume should be less likely to destroy ear drums
|
||||||
|
- Creatures flee less quickly when low on health
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ hashbrown = { version = "0.13", features = ["rayon", "serde", "nightly"] }
|
|||||||
fxhash = { version = "0.2.1" }
|
fxhash = { version = "0.2.1" }
|
||||||
crossbeam-utils = { version = "0.8.1"}
|
crossbeam-utils = { version = "0.8.1"}
|
||||||
crossbeam-channel = { version = "0.5"}
|
crossbeam-channel = { version = "0.5"}
|
||||||
ordered-float = { version = "3", default-features = false }
|
ordered-float = { version = "3", default-features = false, features = ["std"] }
|
||||||
num = { version = "0.4" }
|
num = { version = "0.4" }
|
||||||
num-traits = { version = "0.2" }
|
num-traits = { version = "0.2" }
|
||||||
vek = { version = "0.15.8", features = ["serde"] }
|
vek = { version = "0.15.8", features = ["serde"] }
|
||||||
|
@ -4,13 +4,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
/// life.
|
/// life.
|
||||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||||
pub struct ServerConstants {
|
pub struct ServerConstants {
|
||||||
|
/// How many times faster the in-game day/night cycle should be compared to
|
||||||
|
/// real time.
|
||||||
pub day_cycle_coefficient: f64,
|
pub day_cycle_coefficient: f64,
|
||||||
}
|
}
|
||||||
impl Default for ServerConstants {
|
|
||||||
fn default() -> Self {
|
|
||||||
ServerConstants {
|
|
||||||
// == 30.0 via server settings (the default)
|
|
||||||
day_cycle_coefficient: 24.0 * 2.0,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -83,8 +83,9 @@ mod tests {
|
|||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
None,
|
None,
|
||||||
// Dummy ServerConstants
|
&ServerConstants {
|
||||||
&ServerConstants::default(),
|
day_cycle_coefficient: 24.0,
|
||||||
|
},
|
||||||
|_, _| {},
|
|_, _| {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,9 @@ fn simple_run() {
|
|||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
None,
|
None,
|
||||||
&ServerConstants::default(),
|
&ServerConstants {
|
||||||
|
day_cycle_coefficient: 24.0,
|
||||||
|
},
|
||||||
|_, _| {},
|
|_, _| {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,9 @@ pub fn tick(state: &mut State, dt: Duration) {
|
|||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
None,
|
None,
|
||||||
&ServerConstants::default(),
|
&ServerConstants {
|
||||||
|
day_cycle_coefficient: 24.0,
|
||||||
|
},
|
||||||
|_, _| {},
|
|_, _| {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -574,6 +574,9 @@ impl<'a> AgentData<'a> {
|
|||||||
read_data: &ReadData,
|
read_data: &ReadData,
|
||||||
tgt_pos: &Pos,
|
tgt_pos: &Pos,
|
||||||
) {
|
) {
|
||||||
|
// Proportion of full speed
|
||||||
|
const MAX_FLEE_SPEED: f32 = 0.65;
|
||||||
|
|
||||||
if read_data.is_riders.contains(*self.entity) {
|
if read_data.is_riders.contains(*self.entity) {
|
||||||
controller.push_event(ControlEvent::Unmount);
|
controller.push_event(ControlEvent::Unmount);
|
||||||
}
|
}
|
||||||
@ -599,8 +602,8 @@ impl<'a> AgentData<'a> {
|
|||||||
..self.traversal_config
|
..self.traversal_config
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
controller.inputs.move_dir =
|
controller.inputs.move_dir = bearing.xy().try_normalized().unwrap_or_else(Vec2::zero)
|
||||||
bearing.xy().try_normalized().unwrap_or_else(Vec2::zero) * speed;
|
* speed.min(MAX_FLEE_SPEED);
|
||||||
self.jump_if(bearing.z > 1.5, controller);
|
self.jump_if(bearing.z > 1.5, controller);
|
||||||
controller.inputs.move_z = bearing.z;
|
controller.inputs.move_z = bearing.z;
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,7 @@ impl Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let server_constants = ServerConstants {
|
let server_constants = ServerConstants {
|
||||||
day_cycle_coefficient: 1440.0 / settings.day_length,
|
day_cycle_coefficient: settings.day_cycle_coefficient(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let this = Self {
|
let this = Self {
|
||||||
|
@ -324,6 +324,10 @@ impl Settings {
|
|||||||
self.day_length = default_values.day_length;
|
self.day_length = default_values.day_length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Derive a coefficient that is the relatively speed of the in-game
|
||||||
|
/// day/night cycle compared to reality.
|
||||||
|
pub fn day_cycle_coefficient(&self) -> f64 { 1440.0 / self.day_length }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum InvalidSettingsError {
|
pub enum InvalidSettingsError {
|
||||||
|
@ -352,7 +352,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
material_stats: (*read_data.material_stats).clone(),
|
material_stats: (*read_data.material_stats).clone(),
|
||||||
ability_map: (*read_data.ability_map).clone(),
|
ability_map: (*read_data.ability_map).clone(),
|
||||||
server_constants: ServerConstants {
|
server_constants: ServerConstants {
|
||||||
day_cycle_coefficient: 1440.0 / read_data.settings.day_length
|
day_cycle_coefficient: read_data.settings.day_cycle_coefficient()
|
||||||
},
|
},
|
||||||
})?;
|
})?;
|
||||||
debug!("Done initial sync with client.");
|
debug!("Done initial sync with client.");
|
||||||
|
@ -56,9 +56,9 @@ pub struct AudioSettings {
|
|||||||
impl Default for AudioSettings {
|
impl Default for AudioSettings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
master_volume: AudioVolume::new(1.0, false),
|
master_volume: AudioVolume::new(0.8, false),
|
||||||
inactive_master_volume_perc: AudioVolume::new(0.5, false),
|
inactive_master_volume_perc: AudioVolume::new(0.5, false),
|
||||||
music_volume: AudioVolume::new(0.4, false),
|
music_volume: AudioVolume::new(0.3, false),
|
||||||
sfx_volume: AudioVolume::new(0.6, false),
|
sfx_volume: AudioVolume::new(0.6, false),
|
||||||
ambience_volume: AudioVolume::new(0.6, false),
|
ambience_volume: AudioVolume::new(0.6, false),
|
||||||
num_sfx_channels: 60,
|
num_sfx_channels: 60,
|
||||||
|
@ -1380,7 +1380,7 @@ pub struct FullScreenSettings {
|
|||||||
impl Default for FullScreenSettings {
|
impl Default for FullScreenSettings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
enabled: false,
|
enabled: true,
|
||||||
mode: FullscreenMode::Borderless,
|
mode: FullscreenMode::Borderless,
|
||||||
resolution: [1920, 1080],
|
resolution: [1920, 1080],
|
||||||
bit_depth: None,
|
bit_depth: None,
|
||||||
|
Loading…
Reference in New Issue
Block a user