mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 08:29:33 +02:00
Don't render the voxel selection when we're moving over a maximum velocity.
This commit is contained in:
parent
7cefa3fe7b
commit
86316bc674
1 changed files with 4 additions and 0 deletions
|
@ -694,6 +694,7 @@ void Application::mouseMoveEvent(QMouseEvent* event) {
|
||||||
_mouseY = event->y();
|
_mouseY = event->y();
|
||||||
|
|
||||||
// detect drag
|
// detect drag
|
||||||
|
printLog("Avatar velocity x, y, z: %f, %f, %f\n", _myAvatar.getVelocity().x, _myAvatar.getVelocity().y, _myAvatar.getVelocity().z);
|
||||||
glm::vec3 mouseVoxelPos(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z);
|
glm::vec3 mouseVoxelPos(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z);
|
||||||
if (!_justEditedVoxel && mouseVoxelPos != _lastMouseVoxelPos) {
|
if (!_justEditedVoxel && mouseVoxelPos != _lastMouseVoxelPos) {
|
||||||
if (event->buttons().testFlag(Qt::LeftButton)) {
|
if (event->buttons().testFlag(Qt::LeftButton)) {
|
||||||
|
@ -2283,6 +2284,9 @@ void Application::shiftPaintingColor() {
|
||||||
|
|
||||||
|
|
||||||
void Application::maybeEditVoxelUnderCursor() {
|
void Application::maybeEditVoxelUnderCursor() {
|
||||||
|
if (_myAvatar.getVelocity().x > 0.5) {
|
||||||
|
printLog("We're going faster than 1 m/s!\n");
|
||||||
|
}
|
||||||
if (_addVoxelMode->isChecked() || _colorVoxelMode->isChecked()) {
|
if (_addVoxelMode->isChecked() || _colorVoxelMode->isChecked()) {
|
||||||
if (_mouseVoxel.s != 0) {
|
if (_mouseVoxel.s != 0) {
|
||||||
PACKET_HEADER message = (_destructiveAddVoxel->isChecked() ?
|
PACKET_HEADER message = (_destructiveAddVoxel->isChecked() ?
|
||||||
|
|
Loading…
Reference in a new issue