Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
94feb62b
Commit
94feb62b
authored
13 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
When digging a node, don't switch to punching an object without raising button
parent
941176cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/game.cpp
+6
-1
6 additions, 1 deletion
src/game.cpp
with
6 additions
and
1 deletion
src/game.cpp
+
6
−
1
View file @
94feb62b
...
...
@@ -937,6 +937,7 @@ void the_game(
float
dig_time
=
0.0
;
u16
dig_index
=
0
;
v3s16
nodepos_old
(
-
32768
,
-
32768
,
-
32768
);
bool
ldown_for_dig
=
false
;
float
damage_flash_timer
=
0
;
s16
farmesh_range
=
20
*
MAP_BLOCKSIZE
;
...
...
@@ -1626,7 +1627,7 @@ void the_game(
bool
left_punch
=
false
;
bool
left_punch_muted
=
false
;
if
(
selected_active_object
!=
NULL
)
if
(
selected_active_object
!=
NULL
&&
!
ldown_for_dig
)
{
/* Clear possible cracking animation */
if
(
nodepos_old
!=
v3s16
(
-
32768
,
-
32768
,
-
32768
))
...
...
@@ -1710,6 +1711,7 @@ void the_game(
client
.
clearTempMod
(
nodepos_old
);
dig_time
=
0.0
;
nodepos_old
=
v3s16
(
-
32768
,
-
32768
,
-
32768
);
ldown_for_dig
=
false
;
}
}
else
{
/*
...
...
@@ -1738,6 +1740,7 @@ void the_game(
{
client
.
clearTempMod
(
nodepos
);
dig_time
=
0.0
;
ldown_for_dig
=
false
;
}
if
(
nodig_delay_counter
>
0.0
)
...
...
@@ -1768,6 +1771,7 @@ void the_game(
if
(
input
->
getLeftClicked
())
{
client
.
setTempMod
(
nodepos
,
NodeMod
(
NODEMOD_CRACK
,
0
));
ldown_for_dig
=
true
;
}
if
(
input
->
getLeftState
())
{
...
...
@@ -1938,6 +1942,7 @@ void the_game(
infostream
<<
"Left button released (stopped digging)"
<<
std
::
endl
;
client
.
groundAction
(
2
,
v3s16
(
0
,
0
,
0
),
v3s16
(
0
,
0
,
0
),
0
);
ldown_for_dig
=
false
;
}
if
(
input
->
getRightReleased
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment