update to BTB release!
This commit is contained in:
20
Cargo.lock
generated
20
Cargo.lock
generated
@@ -868,6 +868,15 @@ dependencies = [
|
||||
"encase_derive_impl",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_fix_gltf_coordinate_system"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3d322f8addff6f04423ea6bbd4ab37a5fb08c9c14aec426bf1aae01bee128e1"
|
||||
dependencies = [
|
||||
"bevy",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bevy_gilrs"
|
||||
version = "0.16.0"
|
||||
@@ -1539,13 +1548,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bevy_trenchbroom"
|
||||
version = "0.8.0-dev"
|
||||
source = "git+https://github.com/Noxmore/bevy_trenchbroom.git?rev=3acfccf#3acfccfd7a5b56448a831c0f00157644cbdbfced"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ce306a118409486343c73ede3decc9bf79906e499c8e3a90b3a812c1b701a6a8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"atomicow",
|
||||
"avian3d",
|
||||
"bevy",
|
||||
"bevy_fix_gltf_coordinate_system",
|
||||
"bevy_materialize",
|
||||
"bevy_mesh",
|
||||
"bevy_reflect",
|
||||
@@ -1569,8 +1580,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "bevy_trenchbroom_macros"
|
||||
version = "0.8.0-dev"
|
||||
source = "git+https://github.com/Noxmore/bevy_trenchbroom.git?rev=3acfccf#3acfccfd7a5b56448a831c0f00157644cbdbfced"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "520f2720901baee5c85f74a30351164780b153251e9632a57fecde7130da35d2"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
|
||||
@@ -21,7 +21,7 @@ avian3d = { version = "0.3", default-features = false, features = [
|
||||
"parallel",
|
||||
] }
|
||||
bevy = { version = "0.16.0", features = ["track_location"] }
|
||||
bevy_trenchbroom = { version = "0.8.0-dev", features = ["avian"] }
|
||||
bevy_trenchbroom = { version = "0.8.0", features = ["avian"] }
|
||||
nil = "0.14.0"
|
||||
bevy_asset_loader = "0.23.0-rc.3"
|
||||
bevy_sprite3d = "5.0.0"
|
||||
@@ -45,4 +45,3 @@ type_complexity = "allow"
|
||||
|
||||
[patch.crates-io]
|
||||
bevy-steamworks = { git = "https://github.com/extrawurst/bevy_steamworks.git", branch = "derive-debug-event" }
|
||||
bevy_trenchbroom = { git = "https://github.com/Noxmore/bevy_trenchbroom.git", rev = "3acfccf" }
|
||||
|
||||
@@ -12,21 +12,11 @@ pub struct ProjectileOrigin;
|
||||
#[derive(Component, Debug)]
|
||||
pub struct AnimatedCharacter {
|
||||
head: usize,
|
||||
rotate_180: bool,
|
||||
}
|
||||
|
||||
impl AnimatedCharacter {
|
||||
pub fn new(head: usize) -> Self {
|
||||
Self {
|
||||
head,
|
||||
rotate_180: false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_rotation(self) -> Self {
|
||||
let mut s = self;
|
||||
s.rotate_180 = true;
|
||||
s
|
||||
Self { head }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,9 +82,7 @@ fn spawn(
|
||||
let mut t =
|
||||
Transform::from_translation(Vec3::new(0., -1.45, 0.)).with_scale(Vec3::splat(1.2));
|
||||
|
||||
if character.rotate_180 {
|
||||
t.rotate_y(PI);
|
||||
}
|
||||
t.rotate_y(PI);
|
||||
|
||||
commands
|
||||
.entity(entity)
|
||||
|
||||
@@ -45,10 +45,7 @@ fn init(mut commands: Commands, query: Query<(Entity, &EnemySpawn)>, heads_db: R
|
||||
]),
|
||||
))
|
||||
.insert_if(Ai, || !spawn.disable_ai)
|
||||
.with_child((
|
||||
Name::from("body-rig"),
|
||||
AnimatedCharacter::new(id).with_rotation(),
|
||||
))
|
||||
.with_child((Name::from("body-rig"), AnimatedCharacter::new(id)))
|
||||
.observe(on_kill);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,25 +36,25 @@ impl SpawnPoint {
|
||||
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[geometry(GeometryProvider::new().convex_collider())]
|
||||
#[spawn_hooks(SpawnHooks::new().convex_collider())]
|
||||
pub struct Worldspawn;
|
||||
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[geometry(GeometryProvider::new())]
|
||||
#[spawn_hooks(SpawnHooks::new())]
|
||||
#[base(Transform)]
|
||||
pub struct Water;
|
||||
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[base(Transform)]
|
||||
#[geometry(GeometryProvider::new().convex_collider())]
|
||||
#[spawn_hooks(SpawnHooks::new().convex_collider())]
|
||||
pub struct Crates;
|
||||
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[base(Transform)]
|
||||
#[geometry(GeometryProvider::new().convex_collider())]
|
||||
#[spawn_hooks(SpawnHooks::new().convex_collider())]
|
||||
pub struct NamedEntity {
|
||||
pub name: String,
|
||||
}
|
||||
@@ -62,7 +62,7 @@ pub struct NamedEntity {
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[base(Transform, Target)]
|
||||
#[geometry(GeometryProvider::new().convex_collider())]
|
||||
#[spawn_hooks(SpawnHooks::new().convex_collider())]
|
||||
pub struct Platform;
|
||||
|
||||
#[derive(PointClass, Component, Reflect, Default)]
|
||||
@@ -75,7 +75,7 @@ pub struct PlatformTarget {
|
||||
#[derive(SolidClass, Component, Reflect, Default)]
|
||||
#[reflect(QuakeClass, Component)]
|
||||
#[base(Transform, Target)]
|
||||
#[geometry(GeometryProvider::new().convex_collider())]
|
||||
#[spawn_hooks(SpawnHooks::new().convex_collider())]
|
||||
pub struct Movable {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user