Add Giant to entity_raycast example

This commit is contained in:
Ryan 2022-09-17 23:30:54 -07:00
parent 5bdac7fbb0
commit cab1337716
2 changed files with 8 additions and 1 deletions

View file

@ -298,6 +298,13 @@ impl Config for Game {
e.set_position([5.0, 103.0, -3.5]); e.set_position([5.0, 103.0, -3.5]);
e.set_yaw(270.0); e.set_yaw(270.0);
e.set_head_yaw(90.0); e.set_head_yaw(90.0);
// ==== Giant ==== //
let (_, e) = server.entities.insert(EntityKind::Giant, ());
e.set_world(world_id);
e.set_position([20.0, 101.0, -5.0]);
e.set_yaw(270.0);
e.set_head_yaw(90.0);
} }
fn update(&self, server: &mut Server<Self>) { fn update(&self, server: &mut Server<Self>) {

View file

@ -781,7 +781,7 @@ impl<C: Config> Entity<C> {
TrackedData::FallingBlock(_) => with_object_data(1), // TODO: set block state ID. TrackedData::FallingBlock(_) => with_object_data(1), // TODO: set block state ID.
TrackedData::FishingBobber(e) => with_object_data(e.get_hook_entity_id()), TrackedData::FishingBobber(e) => with_object_data(e.get_hook_entity_id()),
TrackedData::Warden(e) => { TrackedData::Warden(e) => {
with_object_data((e.get_pose() == types::Pose::Emerging).into()) with_object_data((e.get_pose() == Pose::Emerging).into())
} }
_ => with_object_data(0), _ => with_object_data(0),
} }