forked from electronicarts/CnC_Generals_Zero_Hour
-
Notifications
You must be signed in to change notification settings - Fork 117
Labels
BugSomething is not working right, typically is user facingSomething is not working right, typically is user facingInputMinorSeverity: Minor < Major < Critical < BlockerSeverity: Minor < Major < Critical < Blocker
Description
MSG_RAW_MOUSE_MIDDLE_BUTTON_UP uses a frame based click duration filter, with m_timestamp.
This is a problem when the game logic speed is very high (or very slow).
The duration needs to be in actual real time. Perhaps there are more input actions like this that need fixing.
GeneralsGameCode/Generals/Code/GameEngine/Source/GameClient/MessageStream/LookAtXlat.cpp
Lines 301 to 321 in a813c56
| case GameMessage::MSG_RAW_MOUSE_MIDDLE_BUTTON_UP: | |
| { | |
| m_lastMouseMoveFrame = TheGameLogic->getFrame(); | |
| const UnsignedInt CLICK_DURATION = 5; | |
| const UnsignedInt PIXEL_OFFSET = 5; | |
| m_isRotating = false; | |
| Int dx = m_currentPos.x-m_originalAnchor.x; | |
| if (dx<0) dx = -dx; | |
| Int dy = m_currentPos.y-m_originalAnchor.y; | |
| Bool didMove = dx>PIXEL_OFFSET || dy>PIXEL_OFFSET; | |
| // if middle button is "clicked", reset to "home" orientation | |
| if (!didMove && TheGameClient->getFrame() - m_timestamp < CLICK_DURATION) | |
| { | |
| TheTacticalView->setAngleAndPitchToDefault(); | |
| TheTacticalView->setZoomToDefault(); | |
| } | |
| break; | |
| } |
Metadata
Metadata
Assignees
Labels
BugSomething is not working right, typically is user facingSomething is not working right, typically is user facingInputMinorSeverity: Minor < Major < Critical < BlockerSeverity: Minor < Major < Critical < Blocker