}
+void HUD::DisplayNone() {
+ block_visible = false;
+}
+
void HUD::Display(const Block &b) {
const BlockType &type = types.Get(b.type);
, place_timer(256)
, remove_timer(256)
, remove(0)
-, selection(1)
+, selection(0)
, place_sound(env.assets.LoadSound("thump"))
, remove_sound(env.assets.LoadSound("plop"))
, fwd(0)
messages.Position(glm::vec3(25.0f, -25.0f, 0.0f), Gravity::SOUTH_WEST);
messages.Foreground(glm::vec4(1.0f));
messages.Background(glm::vec4(0.5f));
- hud.Display(selection);
+ hud.DisplayNone();
}
}
void Interface::CheckAim() {
- if (!world.Intersection(aim, glm::mat4(1.0f), aim_world)) {
+ if (!world.Intersection(aim, glm::mat4(1.0f), ctrl.Controlled().ChunkCoords(), aim_world)) {
aim_world = WorldCollision();
}
- if (!world.Intersection(aim, glm::mat4(1.0f), aim_entity)) {
+ if (!world.Intersection(aim, glm::mat4(1.0f), ctrl.Controlled(), aim_entity)) {
aim_entity = EntityCollision();
}
if (aim_world && aim_entity) {