Compare commits
No commits in common. "131a49b7f908220a5b9e837e5c8a1e2c1226fd24" and "2873894003838ef9fcccdeb52538e49c23c1b48e" have entirely different histories.
131a49b7f9
...
2873894003
2
Cargo.lock
generated
|
@ -3039,7 +3039,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "outfly"
|
||||
version = "0.12.0"
|
||||
version = "0.12.0-dev"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
"bevy_embedded_assets",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
[package]
|
||||
name = "outfly"
|
||||
version = "0.12.0"
|
||||
version = "0.12.0-dev"
|
||||
edition = "2021"
|
||||
homepage = "https://codeberg.org/outfly/outfly"
|
||||
repository = "https://codeberg.org/outfly/outfly"
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"mercury",
|
||||
"uri":"textures/mercury.jpg"
|
||||
"uri":"../textures/mercury.jpg"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
|
|
|
@ -1936,22 +1936,22 @@
|
|||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"mercury",
|
||||
"uri":"textures/mercury.jpg"
|
||||
"uri":"../textures/mercury.jpg"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"solarpanel",
|
||||
"uri":"textures/solarpanel.jpg"
|
||||
"uri":"../textures/solarpanel.jpg"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"metal",
|
||||
"uri":"textures/metal.jpg"
|
||||
"uri":"../textures/metal.jpg"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"plant",
|
||||
"uri":"textures/plant.jpg"
|
||||
"uri":"../textures/plant.jpg"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
|
|
|
@ -299,7 +299,7 @@
|
|||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"solarpanel",
|
||||
"uri":"textures/solarpanel.jpg"
|
||||
"uri":"../textures/solarpanel.jpg"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
{
|
||||
"mimeType":"image/jpeg",
|
||||
"name":"mercury",
|
||||
"uri":"textures/mercury.jpg"
|
||||
"uri":"../textures/mercury.jpg"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
|
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 770 KiB After Width: | Height: | Size: 770 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 2 MiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 332 KiB After Width: | Height: | Size: 332 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
29
src/actor.rs
|
@ -696,16 +696,7 @@ fn handle_wants_maxvelocity(
|
|||
}
|
||||
|
||||
fn handle_wants_lookat(
|
||||
mut query: Query<
|
||||
(
|
||||
&Position,
|
||||
&mut Rotation,
|
||||
&Transform,
|
||||
&WantsToLookAt,
|
||||
Option<&visual::IsEffect>,
|
||||
),
|
||||
Without<Camera>,
|
||||
>,
|
||||
mut query: Query<(&Position, &mut Rotation, &WantsToLookAt), Without<Camera>>,
|
||||
q_playercam: Query<&Position, With<PlayerCamera>>,
|
||||
q_cam: Query<&Transform, With<Camera>>,
|
||||
id2pos: Res<game::Id2Pos>,
|
||||
|
@ -722,7 +713,7 @@ fn handle_wants_lookat(
|
|||
};
|
||||
|
||||
// TODO: use ExternalTorque rather than hard-resetting the rotation
|
||||
for (pos, mut rot, trans, target_id, is_effect) in &mut query {
|
||||
for (pos, mut rot, target_id) in &mut query {
|
||||
let target_pos: DVec3 = if target_id.0 == cmd::ID_SPECIAL_PLAYERCAM {
|
||||
cam_pos
|
||||
} else if let Some(target_pos) = id2pos.0.get(&target_id.0) {
|
||||
|
@ -730,16 +721,12 @@ fn handle_wants_lookat(
|
|||
} else {
|
||||
continue;
|
||||
};
|
||||
let up = if is_effect.is_some() {
|
||||
// trans.up() sometimes crashes with thruster particle effects
|
||||
Dir3::Y
|
||||
} else {
|
||||
if trans.translation.length_squared() > 1e-6 {
|
||||
trans.up()
|
||||
} else {
|
||||
Dir3::Y
|
||||
}
|
||||
};
|
||||
//let up = if trans.translation.length_squared() > 1e-6 {
|
||||
// trans.up()
|
||||
//} else {
|
||||
// Dir3::Y
|
||||
//};
|
||||
let up = Dir3::Y; // TODO: the above code seems to be buggy, this is a workaround
|
||||
rot.0 = look_at_quat(**pos, target_pos, up.as_dvec3());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -908,7 +908,7 @@ fn spawn_entities(
|
|||
actor.insert(Position::from(absolute_pos));
|
||||
if state.is_sphere {
|
||||
let sphere_texture_handle = if let Some(model) = &state.model {
|
||||
Some(asset_server.load(format!("models/textures/{}.jpg", model)))
|
||||
Some(asset_server.load(format!("textures/{}.jpg", model)))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
|
@ -159,16 +159,8 @@ actor 0 0 0
|
|||
orbitaround jupiter 221900e3
|
||||
collider handcrafted
|
||||
density 10000000000
|
||||
scale 2e3
|
||||
angularmomentum 0.4 2.0 0.3
|
||||
actor -40e3 0 90e3 metis
|
||||
name Moonlet
|
||||
relativeto jupiter
|
||||
orbitaround jupiter 221900e3
|
||||
collider handcrafted
|
||||
density 10000000000
|
||||
scale 4e3
|
||||
angularmomentum 0.02 0.01 0.0
|
||||
scale 3e3
|
||||
angularmomentum 0 0.03 0
|
||||
actor 0 0 0 io
|
||||
name Io
|
||||
id io
|
||||
|
|
13
src/var.rs
|
@ -467,24 +467,15 @@ pub struct Preferences {
|
|||
pub third_person: bool,
|
||||
pub shadows_sun: bool,
|
||||
pub avatar: usize,
|
||||
#[serde(default = "Preferences::default_light_amp")]
|
||||
pub light_amp: usize, // 0-3
|
||||
#[serde(default = "Preferences::default_flashlight_power")]
|
||||
pub light_amp: usize, // 0-3
|
||||
pub flashlight_power: usize, // 0-2
|
||||
pub thruster_boost: usize, // 0-2
|
||||
pub thruster_boost: usize, // 0-2
|
||||
|
||||
#[serde(skip)]
|
||||
pub source_file: Option<String>,
|
||||
}
|
||||
|
||||
impl Preferences {
|
||||
pub fn default_light_amp() -> usize {
|
||||
1
|
||||
}
|
||||
pub fn default_flashlight_power() -> usize {
|
||||
2
|
||||
}
|
||||
|
||||
pub fn get_fullscreen_mode(&self) -> WindowMode {
|
||||
match self.fullscreen_mode.as_str() {
|
||||
"legacy" => WindowMode::Fullscreen,
|
||||
|
|
|
@ -171,7 +171,7 @@ pub fn spawn_effects(
|
|||
));
|
||||
}
|
||||
Effects::ThrusterParticle(pos, v) => {
|
||||
let texture = asset_server.load("models/textures/exhaust.png");
|
||||
let texture = asset_server.load("textures/exhaust.png");
|
||||
commands.spawn((
|
||||
IsEffect,
|
||||
hud::ToggleableHudElement,
|
||||
|
|