Faster pick, less vibrant block selection

This commit is contained in:
Joshua Barretto 2021-03-21 20:38:08 +00:00
parent fb3980e273
commit 6ea5aa796b
6 changed files with 6 additions and 18 deletions

View File

@ -6,9 +6,9 @@ ItemDef(
hands: Two,
stats: Direct((
equip_time_secs: 0.25,
power: 0.25,
power: 0.75,
poise_strength: 0.25,
speed: 0.5,
speed: 0.75,
crit_chance: 0.0,
crit_mult: 1.0,
)),

View File

@ -268,7 +268,7 @@ void main() {
vec3 glow = glow_light(f_pos) * (pow(f_glow, 6) * 5 + pow(f_glow, 1.5) * 2);
reflected_light += glow;
float f_select = (select_pos.w > 0 && select_pos.xyz == floor(f_pos - f_norm * 0.5)) ? 0.5 / PERSISTENT_AMBIANCE : 0.0;
float f_select = (select_pos.w > 0 && select_pos.xyz == floor(f_pos - f_norm * 0.5)) ? 0.2 / PERSISTENT_AMBIANCE : 0.0;
reflected_light += f_select;
max_light += lights_at(f_pos, f_norm, view_dir, mu, cam_attenuation, fluid_alt, k_a, k_d, k_s, alpha, f_norm, 1.0, emitted_light, reflected_light);

View File

@ -235,18 +235,6 @@ impl SpriteKind {
SpriteKind::Bowl => true,
SpriteKind::ChestBurried => true,
SpriteKind::Mud => true,
// SpriteKind::Amethyst => true,
// SpriteKind::Ruby => true,
// SpriteKind::Diamond => true,
// SpriteKind::Sapphire => true,
// SpriteKind::Emerald => true,
// SpriteKind::Topaz => true,
// SpriteKind::AmethystSmall => true,
// SpriteKind::TopazSmall => true,
// SpriteKind::DiamondSmall => true,
// SpriteKind::RubySmall => true,
// SpriteKind::EmeraldSmall => true,
// SpriteKind::SapphireSmall => true,
SpriteKind::Seashells => true,
_ => false,
}

View File

@ -265,7 +265,7 @@ pub fn handle_mine_block(server: &mut Server, pos: Vec3<i32>, tool: Option<ToolK
let state = server.state_mut();
if state.can_set_block(pos) {
let block = state.terrain().get(pos).ok().copied();
if let Some(block) = block.filter(|b| b.mine_tool().map_or(true, |t| Some(t) == tool)) {
if let Some(block) = block.filter(|b| b.mine_tool().map_or(false, |t| Some(t) == tool)) {
// Drop item if one is recoverable from the block
if let Some(item) = comp::Item::try_reclaim_from_block(block) {
state

View File

@ -52,7 +52,7 @@ impl Animation for ChargeswingAnimation {
let slowrise = test * (1.0 - move3);
let move2 = move2base * (1.0 - move3);
if let Some(ToolKind::Hammer | ToolKind::Pick) = active_tool_kind {
if let Some(ToolKind::Hammer) = active_tool_kind {
next.main.position = Vec3::new(0.0, 0.0, 0.0);
next.main.orientation = Quaternion::rotation_x(0.0);
next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2 + (move2 * -8.0));

View File

@ -39,7 +39,7 @@ impl Animation for LeapAnimation {
_ => (0.0, 0.0, 0.0, 0.0),
};
if let Some(ToolKind::Hammer | ToolKind::Pick) = active_tool_kind {
if let Some(ToolKind::Hammer) = active_tool_kind {
next.hand_l.position = Vec3::new(s_a.hhl.0, s_a.hhl.1, s_a.hhl.2);
next.hand_l.orientation = Quaternion::rotation_x(s_a.hhl.3);
next.hand_r.position = Vec3::new(s_a.hhr.0, s_a.hhr.1, s_a.hhr.2);