mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'Corvella/small_fixes' into 'master'
Correctly apply LoD distance setting and improve documentation on projectile fixes Closes #1779 See merge request veloren/veloren!3779
This commit is contained in:
commit
ebcb986461
@ -95,7 +95,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
let mut projectile_vanished: bool = false;
|
let mut projectile_vanished: bool = false;
|
||||||
|
|
||||||
// Hit entity
|
// Hit entity
|
||||||
for (&other, &pos_other) in physics.touch_entities.iter() {
|
for (&other, &pos_hit_other) in physics.touch_entities.iter() {
|
||||||
let same_group = projectile_owner
|
let same_group = projectile_owner
|
||||||
// Note: somewhat inefficient since we do the lookup for every touching
|
// Note: somewhat inefficient since we do the lookup for every touching
|
||||||
// entity, but if we pull this out of the loop we would want to do it only
|
// entity, but if we pull this out of the loop we would want to do it only
|
||||||
@ -127,8 +127,8 @@ impl<'a> System<'a> for Sys {
|
|||||||
let entity_of =
|
let entity_of =
|
||||||
|uid: Uid| read_data.uid_allocator.retrieve_entity_internal(uid.into());
|
|uid: Uid| read_data.uid_allocator.retrieve_entity_internal(uid.into());
|
||||||
|
|
||||||
// Don't hit if there is a surface in the entity's way in the direction the
|
// Don't hit if there is terrain between the projectile and where the entity was
|
||||||
// projectile is going
|
// supposed to be hit by it.
|
||||||
|
|
||||||
if physics.on_surface().is_some() {
|
if physics.on_surface().is_some() {
|
||||||
let projectile_direction = orientations
|
let projectile_direction = orientations
|
||||||
@ -138,7 +138,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
if !matches!(
|
if !matches!(
|
||||||
read_data
|
read_data
|
||||||
.terrain
|
.terrain
|
||||||
.ray(pos_wall, pos_other)
|
.ray(pos_wall, pos_hit_other)
|
||||||
.until(|b| b.is_filled())
|
.until(|b| b.is_filled())
|
||||||
.cast()
|
.cast()
|
||||||
.1,
|
.1,
|
||||||
|
@ -113,6 +113,9 @@ impl SessionState {
|
|||||||
scene
|
scene
|
||||||
.camera_mut()
|
.camera_mut()
|
||||||
.set_fov_deg(global_state.settings.graphics.fov);
|
.set_fov_deg(global_state.settings.graphics.fov);
|
||||||
|
client
|
||||||
|
.borrow_mut()
|
||||||
|
.set_lod_distance(global_state.settings.graphics.lod_distance);
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
let mut mumble_link = SharedLink::new("veloren", "veloren-voxygen");
|
let mut mumble_link = SharedLink::new("veloren", "veloren-voxygen");
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user