Dis some distance and attack arc tweaking

This commit is contained in:
Silentium2318 2020-07-02 20:45:30 -04:00 committed by Sam
parent b0f55b3f79
commit a59438e3e4
4 changed files with 90 additions and 8 deletions

88
Cargo.lock generated
View File

@ -120,7 +120,7 @@ version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc755b23c19211c270ef000fa7ce871377825e6cc7d1bfd0311076f22c5e6ba1"
dependencies = [
"proc-macro-error",
"proc-macro-error 0.4.12",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
@ -521,9 +521,13 @@ version = "2.33.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
dependencies = [
"ansi_term",
"atty",
"bitflags",
"strsim 0.8.0",
"textwrap",
"unicode-width",
"vec_map",
]
[[package]]
@ -1007,7 +1011,7 @@ dependencies = [
"ident_case",
"proc-macro2 1.0.18",
"quote 1.0.7",
"strsim",
"strsim 0.9.3",
"syn 1.0.33",
]
@ -1891,6 +1895,15 @@ dependencies = [
"serde",
]
[[package]]
name = "heck"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "hermit-abi"
version = "0.1.13"
@ -3097,7 +3110,20 @@ version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7"
dependencies = [
"proc-macro-error-attr",
"proc-macro-error-attr 0.4.12",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr 1.0.4",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
@ -3117,6 +3143,17 @@ dependencies = [
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.18",
"quote 1.0.7",
"version_check 0.9.2",
]
[[package]]
name = "proc-macro-hack"
version = "0.5.16"
@ -3942,12 +3979,42 @@ dependencies = [
"bytes",
]
[[package]]
name = "strsim"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "strsim"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c"
[[package]]
name = "structopt"
version = "0.3.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "de5472fb24d7e80ae84a7801b7978f95a19ec32cb1876faea59ab711eb901976"
dependencies = [
"clap",
"lazy_static",
"structopt-derive",
]
[[package]]
name = "structopt-derive"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e0eb37335aeeebe51be42e2dc07f031163fbabfa6ac67d7ea68b5c2f68d5f99"
dependencies = [
"heck",
"proc-macro-error 1.0.4",
"proc-macro2 1.0.18",
"quote 1.0.7",
"syn 1.0.33",
]
[[package]]
name = "sum_type"
version = "0.2.0"
@ -4244,6 +4311,15 @@ dependencies = [
"serde",
]
[[package]]
name = "tools"
version = "0.1.0"
dependencies = [
"csv",
"structopt",
"veloren-common",
]
[[package]]
name = "tracing"
version = "0.1.15"
@ -4385,6 +4461,12 @@ dependencies = [
"smallvec 1.4.0",
]
[[package]]
name = "unicode-segmentation"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0"
[[package]]
name = "unicode-width"
version = "0.1.7"

View File

@ -112,7 +112,7 @@ impl Body {
pub fn radius(&self) -> f32 {
// TODO: Improve these values (some might be reliant on more info in inner type)
match self {
Body::Humanoid(_) => 0.5,
Body::Humanoid(_) => 0.2,
Body::QuadrupedSmall(_) => 0.3,
Body::QuadrupedMedium(_) => 0.9,
Body::Critter(_) => 0.2,

View File

@ -141,8 +141,8 @@ impl Tool {
buildup_duration: Duration::from_millis(700),
recover_duration: Duration::from_millis(300),
base_healthchange: (-120.0 * self.base_power()) as i32,
range: 3.5,
max_angle: 60.0,
range: 3.0,
max_angle: 15.0,
},
LeapMelee {
energy_cost: 800,
@ -158,7 +158,7 @@ impl Tool {
recover_duration: Duration::from_millis(150),
base_healthchange: (-50.0 * self.base_power()) as i32,
range: 3.0,
max_angle: 60.0,
max_angle: 15.0,
}],
Bow(_) => vec![
BasicRanged {

View File

@ -471,7 +471,7 @@ impl<'a> System<'a> for Sys {
let diff = Vec2::<f32>::from(pos.0 - pos_other.0);
let collision_dist = 0.95 * (scale + scale_other);
let collision_dist = 0.55 * (scale + scale_other);
if diff.magnitude_squared() > 0.0
&& diff.magnitude_squared() < collision_dist.powf(2.0)