if(m_ignore_damage_timer <= 0)
{
u8 damage = event.player_damage.amount;
- sendDamage(damage);
+
+ if(event.player_damage.send_to_server)
+ sendDamage(damage);
// Add to ClientEvent queue
ClientEvent event;
ClientEnvEvent event;
event.type = CEE_PLAYER_DAMAGE;
event.player_damage.amount = damage;
+ event.player_damage.send_to_server = true;
m_client_event_queue.push_back(event);
}
}
ClientEnvEvent event;
event.type = CEE_PLAYER_DAMAGE;
event.player_damage.amount = damage_per_second;
+ event.player_damage.send_to_server = true;
m_client_event_queue.push_back(event);
}
}
ClientEnvEvent event;
event.type = CEE_PLAYER_DAMAGE;
event.player_damage.amount = damage;
+ event.player_damage.send_to_server = handle_hp;
m_client_event_queue.push_back(event);
}
// Add PlayerSAO
player->m_removed = false;
+ player->setId(0);
m_env->addActiveObject(player);
/*
<<PP(player->getPosition()/BS)<<std::endl;
srp->m_removed = false;
+ srp->setId(0);
m_env->addActiveObject(srp);
}
else if(command == TOSERVER_INTERACT)
// "Material" properties of a player
MaterialProperties mp;
mp.diggability = DIGGABLE_NORMAL;
- mp.crackiness = -1.0;
- mp.cuttability = 1.0;
+ mp.crackiness = -0.5;
+ mp.cuttability = 0.5;
ToolDiggingProperties tp;
puncher->getWieldDiggingProperties(&tp);