mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Added dev menu option to disable nack packets
This commit is contained in:
parent
8312e1642d
commit
de61029f05
3 changed files with 8 additions and 1 deletions
|
@ -2099,7 +2099,7 @@ void Application::updateMyAvatar(float deltaTime) {
|
|||
{
|
||||
quint64 now = usecTimestampNow();
|
||||
quint64 sinceLastNack = now - _lastNackTime;
|
||||
const quint64 TOO_LONG_SINCE_LAST_NACK = 250 * MSECS_PER_SECOND;
|
||||
const quint64 TOO_LONG_SINCE_LAST_NACK = 1 * USECS_PER_SECOND;
|
||||
if (sinceLastNack > TOO_LONG_SINCE_LAST_NACK) {
|
||||
_lastNackTime = now;
|
||||
sendNack();
|
||||
|
@ -2109,6 +2109,10 @@ void Application::updateMyAvatar(float deltaTime) {
|
|||
|
||||
void Application::sendNack() {
|
||||
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::NackDisable)) {
|
||||
return;
|
||||
}
|
||||
|
||||
char packet[MAX_PACKET_SIZE];
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
|
||||
|
|
|
@ -393,6 +393,8 @@ Menu::Menu() :
|
|||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::AlignForearmsWithWrists, 0, true);
|
||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::AlternateIK, 0, false);
|
||||
|
||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::NackDisable, 0, false);
|
||||
|
||||
addDisabledActionAndSeparator(developerMenu, "Testing");
|
||||
|
||||
QMenu* timingMenu = developerMenu->addMenu("Timing and Statistics Tools");
|
||||
|
|
|
@ -373,6 +373,7 @@ namespace MenuOption {
|
|||
const QString MoveWithLean = "Move with Lean";
|
||||
const QString MuteAudio = "Mute Microphone";
|
||||
const QString MuteEnvironment = "Mute Environment";
|
||||
const QString NackDisable = "Disable NACK Packets";
|
||||
const QString NameLocation = "Name this location";
|
||||
const QString NewVoxelCullingMode = "New Voxel Culling Mode";
|
||||
const QString OctreeStats = "Voxel and Particle Statistics";
|
||||
|
|
Loading…
Reference in a new issue