feat(bow): Client side prediction

This commit is contained in:
timokoesters 2019-09-28 20:31:35 +02:00
parent df4c4bbd5d
commit 575f7da64d
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097
2 changed files with 3 additions and 1 deletions

View File

@ -30,6 +30,7 @@ sphynx::sum_type! {
MountState(comp::MountState),
Mounting(comp::Mounting),
Mass(comp::Mass),
Projectile(comp::Projectile),
}
}
// Automatically derive From<T> for EcsCompPhantom
@ -50,6 +51,7 @@ sphynx::sum_type! {
MountState(PhantomData<comp::MountState>),
Mounting(PhantomData<comp::Mounting>),
Mass(PhantomData<comp::Mass>),
Projectile(PhantomData<comp::Projectile>),
}
}
impl sphynx::CompPacket for EcsCompPacket {

View File

@ -132,6 +132,7 @@ impl State {
ecs.register_synced::<comp::Mounting>();
ecs.register_synced::<comp::MountState>();
ecs.register_synced::<comp::Mass>();
ecs.register_synced::<comp::Projectile>();
// Register components send from clients -> server
ecs.register::<comp::Controller>();
@ -157,7 +158,6 @@ impl State {
ecs.register::<comp::Inventory>();
ecs.register::<comp::Admin>();
ecs.register::<comp::Waypoint>();
ecs.register::<comp::Projectile>();
// Register synced resources used by the ECS.
ecs.insert_synced(TimeOfDay(0.0));