Skip to content

Commit

Permalink
Repeat action dig while frame skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikel committed Jan 27, 2025
1 parent fbb9f3b commit 253c6f7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,13 @@ void Client::pyConnStep() {
u32 c; // stores the RGBA pixel color
bool kill;

/* Clear all virtual key presses except the movement ones (WASD) */
/* Clear all virtual key presses except the movement ones (WASD) and dig (L click) */
for (int i=0; i<KeyType::INTERNAL_ENUM_COUNT; i++) {
if (i != KeyType::FORWARD && i != KeyType::BACKWARD
&& i != KeyType::LEFT && i != KeyType::RIGHT) {
if (i != KeyType::FORWARD
&& i != KeyType::BACKWARD
&& i != KeyType::LEFT
&& i != KeyType::RIGHT
&& i != KeyType::DIG) {
virtual_key_presses[i] = false;
}
}
Expand All @@ -223,11 +226,12 @@ void Client::pyConnStep() {
return;
frameskip_count = 0;

/* Clear missing virtual key presses (WASD) */
/* Clear missing virtual key presses (WASD + L click) */
virtual_key_presses[KeyType::FORWARD] = false;
virtual_key_presses[KeyType::BACKWARD] = false;
virtual_key_presses[KeyType::LEFT] = false;
virtual_key_presses[KeyType::RIGHT] = false;
virtual_key_presses[KeyType::DIG] = false;

/* Take the screenshot */
irr::video::IVideoDriver *driver = m_rendering_engine->get_video_driver();
Expand Down

0 comments on commit 253c6f7

Please sign in to comment.