mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
FEAT: Tweaks in options
This commit is contained in:
@@ -148,6 +148,10 @@ options.group.mojang=Login
|
|||||||
options.group.game=Game
|
options.group.game=Game
|
||||||
options.group.controls=Controls
|
options.group.controls=Controls
|
||||||
options.group.graphics=Graphics
|
options.group.graphics=Graphics
|
||||||
|
options.group.tweaks=Tweaks
|
||||||
|
options.sprint=Sprint
|
||||||
|
options.barontop=HUD above inventory
|
||||||
|
options.autojump=Auto Jump
|
||||||
options.thirdperson=Third Person
|
options.thirdperson=Third Person
|
||||||
options.servervisible=Server Visible
|
options.servervisible=Server Visible
|
||||||
options.sensitivity=Sensitivity
|
options.sensitivity=Sensitivity
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#include "Minecraft.h"
|
#include "Minecraft.h"
|
||||||
#include "client/player/input/IBuildInput.h"
|
#include "client/player/input/IBuildInput.h"
|
||||||
|
#include "world/item/Item.h"
|
||||||
|
#include "world/item/ItemInstance.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
@@ -728,13 +730,24 @@ void Minecraft::tickInput() {
|
|||||||
if (key == Keyboard::KEY_E) {
|
if (key == Keyboard::KEY_E) {
|
||||||
screenChooser.setScreen(SCREEN_BLOCKSELECTION);
|
screenChooser.setScreen(SCREEN_BLOCKSELECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!screen && key == Keyboard::KEY_T && level) {
|
if (!screen && key == Keyboard::KEY_T && level) {
|
||||||
setScreen(new ConsoleScreen());
|
setScreen(new ConsoleScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!screen && key == Keyboard::KEY_O || key == 250) {
|
if (!screen && key == Keyboard::KEY_O || key == 250) {
|
||||||
releaseMouse();
|
releaseMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (key == Keyboard::KEY_F)
|
||||||
|
options.viewDistance = (options.viewDistance + 1) % 4;
|
||||||
|
|
||||||
|
if (key == Keyboard::KEY_F3) {
|
||||||
|
options.renderDebug = !options.renderDebug;
|
||||||
|
}
|
||||||
|
if (key == Keyboard::KEY_F4) {
|
||||||
|
player->inventory->add(new ItemInstance(Tile::ironBlock));
|
||||||
|
}
|
||||||
if (key == Keyboard::KEY_F5) {
|
if (key == Keyboard::KEY_F5) {
|
||||||
options.thirdPersonView = !options.thirdPersonView;
|
options.thirdPersonView = !options.thirdPersonView;
|
||||||
/*
|
/*
|
||||||
@@ -743,6 +756,7 @@ void Minecraft::tickInput() {
|
|||||||
printf("%d\t%f\n", i, noise.grad2(i, 3, 8));
|
printf("%d\t%f\n", i, noise.grad2(i, 3, 8));
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
if (key == Keyboard::KEY_F) {
|
if (key == Keyboard::KEY_F) {
|
||||||
@@ -822,9 +836,6 @@ void Minecraft::tickInput() {
|
|||||||
if (player->inventory->getItem(i))
|
if (player->inventory->getItem(i))
|
||||||
player->inventory->dropSlot(i, false);
|
player->inventory->dropSlot(i, false);
|
||||||
}
|
}
|
||||||
if (key == Keyboard::KEY_F3) {
|
|
||||||
options.renderDebug = !options.renderDebug;
|
|
||||||
}
|
|
||||||
if (key == Keyboard::KEY_M) {
|
if (key == Keyboard::KEY_M) {
|
||||||
options.difficulty = (options.difficulty == Difficulty::PEACEFUL)?
|
options.difficulty = (options.difficulty == Difficulty::PEACEFUL)?
|
||||||
Difficulty::NORMAL : Difficulty::PEACEFUL;
|
Difficulty::NORMAL : Difficulty::PEACEFUL;
|
||||||
|
|||||||
@@ -18,9 +18,12 @@ const char* OptionStrings::Controls_UseTouchJoypad = "ctrl_usetouchjoypad";
|
|||||||
const char* OptionStrings::Controls_IsLefthanded = "ctrl_islefthanded";
|
const char* OptionStrings::Controls_IsLefthanded = "ctrl_islefthanded";
|
||||||
// why it isnt ctrl_feedback_vibration? i dont want touch it because compatibility with older versions
|
// why it isnt ctrl_feedback_vibration? i dont want touch it because compatibility with older versions
|
||||||
const char* OptionStrings::Controls_FeedbackVibration = "feedback_vibration";
|
const char* OptionStrings::Controls_FeedbackVibration = "feedback_vibration";
|
||||||
|
const char* OptionStrings::Controls_AutoJump = "ctrl_autojump";
|
||||||
|
|
||||||
const char* OptionStrings::Audio_Music = "audio_music";
|
const char* OptionStrings::Audio_Music = "audio_music";
|
||||||
const char* OptionStrings::Audio_Sound = "audio_sound";
|
const char* OptionStrings::Audio_Sound = "audio_sound";
|
||||||
|
|
||||||
const char* OptionStrings::Game_DifficultyLevel = "game_difficulty";
|
const char* OptionStrings::Game_DifficultyLevel = "game_difficulty";
|
||||||
|
|
||||||
|
const char* OptionStrings::Tweaks_Sprint = "tweaks_sprint";
|
||||||
|
const char* OptionStrings::Tweaks_BarOnTop = "tweaks_barontop";
|
||||||
@@ -20,6 +20,7 @@ public:
|
|||||||
static const char* Controls_UseTouchJoypad;
|
static const char* Controls_UseTouchJoypad;
|
||||||
static const char* Controls_IsLefthanded;
|
static const char* Controls_IsLefthanded;
|
||||||
static const char* Controls_FeedbackVibration;
|
static const char* Controls_FeedbackVibration;
|
||||||
|
static const char* Controls_AutoJump;
|
||||||
|
|
||||||
static const char* Audio_Music;
|
static const char* Audio_Music;
|
||||||
static const char* Audio_Sound;
|
static const char* Audio_Sound;
|
||||||
@@ -27,6 +28,9 @@ public:
|
|||||||
|
|
||||||
static const char* Game_DifficultyLevel;
|
static const char* Game_DifficultyLevel;
|
||||||
|
|
||||||
|
static const char* Tweaks_Sprint;
|
||||||
|
static const char* Tweaks_BarOnTop;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*NET_MINECRAFT_CLIENT__OptionsStrings_H__*/
|
#endif /*NET_MINECRAFT_CLIENT__OptionsStrings_H__*/
|
||||||
|
|||||||
@@ -23,9 +23,13 @@ void Options::initDefaultValues() {
|
|||||||
useMouseForDigging = false;
|
useMouseForDigging = false;
|
||||||
destroyVibration = true;
|
destroyVibration = true;
|
||||||
isLeftHanded = false;
|
isLeftHanded = false;
|
||||||
|
autoJump = true;
|
||||||
|
|
||||||
isJoyTouchArea = false;
|
isJoyTouchArea = false;
|
||||||
|
|
||||||
|
useSprinting = true;
|
||||||
|
barOnTop = false;
|
||||||
|
|
||||||
music = 1;
|
music = 1;
|
||||||
sound = 1;
|
sound = 1;
|
||||||
sensitivity = 0.5f;
|
sensitivity = 0.5f;
|
||||||
@@ -146,7 +150,10 @@ const Options::Option
|
|||||||
Options::Option::USE_TOUCH_JOYPAD (17, "options.usetouchpad", false, true),
|
Options::Option::USE_TOUCH_JOYPAD (17, "options.usetouchpad", false, true),
|
||||||
Options::Option::DESTROY_VIBRATION (18, "options.destroyvibration", false, true),
|
Options::Option::DESTROY_VIBRATION (18, "options.destroyvibration", false, true),
|
||||||
Options::Option::PIXELS_PER_MILLIMETER(19, "options.pixelspermilimeter", true, false),
|
Options::Option::PIXELS_PER_MILLIMETER(19, "options.pixelspermilimeter", true, false),
|
||||||
Options::Option::VSYNC (20, "options.vsync", false, true);
|
Options::Option::VSYNC (20, "options.vsync", false, true),
|
||||||
|
Options::Option::SPRINTING (21, "options.sprint", false, true),
|
||||||
|
Options::Option::BARONTOP (22, "options.barontop", false, true),
|
||||||
|
Options::Option::AUTOJUMP (23, "options.autojump", false, true);
|
||||||
|
|
||||||
/* private */
|
/* private */
|
||||||
const float Options::SOUND_MIN_VALUE = 0.0f;
|
const float Options::SOUND_MIN_VALUE = 0.0f;
|
||||||
@@ -216,6 +223,9 @@ void Options::update()
|
|||||||
if (key == OptionStrings::Controls_IsLefthanded) {
|
if (key == OptionStrings::Controls_IsLefthanded) {
|
||||||
readBool(value, isLeftHanded);
|
readBool(value, isLeftHanded);
|
||||||
}
|
}
|
||||||
|
if (key == OptionStrings::Controls_AutoJump) {
|
||||||
|
readBool(value, autoJump);
|
||||||
|
}
|
||||||
if (key == OptionStrings::Controls_UseTouchJoypad) {
|
if (key == OptionStrings::Controls_UseTouchJoypad) {
|
||||||
readBool(value, isJoyTouchArea);
|
readBool(value, isJoyTouchArea);
|
||||||
if (!minecraft->useTouchscreen())
|
if (!minecraft->useTouchscreen())
|
||||||
@@ -268,6 +278,14 @@ void Options::update()
|
|||||||
if (difficulty != Difficulty::PEACEFUL && difficulty != Difficulty::NORMAL)
|
if (difficulty != Difficulty::PEACEFUL && difficulty != Difficulty::NORMAL)
|
||||||
difficulty = Difficulty::NORMAL;
|
difficulty = Difficulty::NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enchancements
|
||||||
|
if (key == OptionStrings::Tweaks_Sprint) {
|
||||||
|
readBool(value, useSprinting);
|
||||||
|
}
|
||||||
|
if (key == OptionStrings::Tweaks_BarOnTop) {
|
||||||
|
readBool(value, barOnTop);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
@@ -323,9 +341,11 @@ void Options::save()
|
|||||||
|
|
||||||
// Login
|
// Login
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Multiplayer_Username, username);
|
addOptionToSaveOutput(stringVec, OptionStrings::Multiplayer_Username, username);
|
||||||
|
|
||||||
// Game
|
// Game
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Multiplayer_ServerVisible, serverVisible);
|
addOptionToSaveOutput(stringVec, OptionStrings::Multiplayer_ServerVisible, serverVisible);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Game_DifficultyLevel, difficulty);
|
addOptionToSaveOutput(stringVec, OptionStrings::Game_DifficultyLevel, difficulty);
|
||||||
|
|
||||||
// Input
|
// Input
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Controls_InvertMouse, invertYMouse);
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_InvertMouse, invertYMouse);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Controls_Sensitivity, sensitivity);
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_Sensitivity, sensitivity);
|
||||||
@@ -333,6 +353,8 @@ void Options::save()
|
|||||||
addOptionToSaveOutput(stringVec, OptionStrings::Controls_UseTouchScreen, useTouchScreen);
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_UseTouchScreen, useTouchScreen);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Controls_UseTouchJoypad, isJoyTouchArea);
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_UseTouchJoypad, isJoyTouchArea);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Controls_FeedbackVibration, destroyVibration);
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_FeedbackVibration, destroyVibration);
|
||||||
|
addOptionToSaveOutput(stringVec, OptionStrings::Controls_AutoJump, autoJump);
|
||||||
|
|
||||||
// Graphics
|
// Graphics
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_Vsync, vsync);
|
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_Vsync, vsync);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_GUIScale, guiScale);
|
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_GUIScale, guiScale);
|
||||||
@@ -342,11 +364,13 @@ void Options::save()
|
|||||||
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_Anaglyph, anaglyph3d);
|
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_Anaglyph, anaglyph3d);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_ViewBobbing, bobView);
|
addOptionToSaveOutput(stringVec, OptionStrings::Graphics_ViewBobbing, bobView);
|
||||||
|
|
||||||
//addOptionToSaveOutput(stringVec, OptionStrings::VIEW_BOBBING, fancyGraphics);
|
|
||||||
// Audio
|
// Audio
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Audio_Music, music);
|
addOptionToSaveOutput(stringVec, OptionStrings::Audio_Music, music);
|
||||||
addOptionToSaveOutput(stringVec, OptionStrings::Audio_Sound, sound);
|
addOptionToSaveOutput(stringVec, OptionStrings::Audio_Sound, sound);
|
||||||
|
|
||||||
|
// Tweaks
|
||||||
|
addOptionToSaveOutput(stringVec, OptionStrings::Tweaks_Sprint, useSprinting);
|
||||||
|
addOptionToSaveOutput(stringVec, OptionStrings::Tweaks_BarOnTop, barOnTop);
|
||||||
//
|
//
|
||||||
// static const Option MUSIC;
|
// static const Option MUSIC;
|
||||||
// static const Option SOUND;
|
// static const Option SOUND;
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public:
|
|||||||
static const Option SOUND;
|
static const Option SOUND;
|
||||||
static const Option INVERT_MOUSE;
|
static const Option INVERT_MOUSE;
|
||||||
static const Option SENSITIVITY;
|
static const Option SENSITIVITY;
|
||||||
|
static const Option AUTOJUMP;
|
||||||
static const Option RENDER_DISTANCE;
|
static const Option RENDER_DISTANCE;
|
||||||
static const Option VIEW_BOBBING;
|
static const Option VIEW_BOBBING;
|
||||||
static const Option ANAGLYPH;
|
static const Option ANAGLYPH;
|
||||||
@@ -49,6 +50,8 @@ public:
|
|||||||
|
|
||||||
static const Option PIXELS_PER_MILLIMETER;
|
static const Option PIXELS_PER_MILLIMETER;
|
||||||
static const Option VSYNC;
|
static const Option VSYNC;
|
||||||
|
static const Option SPRINTING;
|
||||||
|
static const Option BARONTOP;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static Option* getItem(int id) {
|
static Option* getItem(int id) {
|
||||||
@@ -120,6 +123,7 @@ public:
|
|||||||
bool useMouseForDigging;
|
bool useMouseForDigging;
|
||||||
bool isLeftHanded;
|
bool isLeftHanded;
|
||||||
bool destroyVibration;
|
bool destroyVibration;
|
||||||
|
bool autoJump;
|
||||||
//std::string skin;
|
//std::string skin;
|
||||||
|
|
||||||
KeyMapping keyUp;
|
KeyMapping keyUp;
|
||||||
@@ -163,6 +167,10 @@ public:
|
|||||||
bool isJoyTouchArea;
|
bool isJoyTouchArea;
|
||||||
bool useTouchScreen;
|
bool useTouchScreen;
|
||||||
float pixelsPerMillimeter;
|
float pixelsPerMillimeter;
|
||||||
|
|
||||||
|
bool useSprinting;
|
||||||
|
bool barOnTop;
|
||||||
|
|
||||||
Options(Minecraft* minecraft, const std::string& workingDirectory)
|
Options(Minecraft* minecraft, const std::string& workingDirectory)
|
||||||
: minecraft(minecraft)
|
: minecraft(minecraft)
|
||||||
{
|
{
|
||||||
@@ -246,6 +254,10 @@ public:
|
|||||||
ambientOcclusion = !ambientOcclusion;
|
ambientOcclusion = !ambientOcclusion;
|
||||||
//minecraft->levelRenderer.allChanged();
|
//minecraft->levelRenderer.allChanged();
|
||||||
}
|
}
|
||||||
|
if (option == &Option::SPRINTING) useSprinting = !useSprinting;
|
||||||
|
if (option == &Option::BARONTOP) barOnTop = !barOnTop;
|
||||||
|
if (option == &Option::AUTOJUMP) autoJump = !autoJump;
|
||||||
|
|
||||||
notifyOptionUpdate(option, getBooleanValue(option));
|
notifyOptionUpdate(option, getBooleanValue(option));
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
@@ -289,12 +301,18 @@ public:
|
|||||||
return serverVisible;
|
return serverVisible;
|
||||||
if (item == &Option::LEFT_HANDED)
|
if (item == &Option::LEFT_HANDED)
|
||||||
return isLeftHanded;
|
return isLeftHanded;
|
||||||
|
if (item == &Option::AUTOJUMP)
|
||||||
|
return autoJump;
|
||||||
if (item == &Option::USE_TOUCHSCREEN)
|
if (item == &Option::USE_TOUCHSCREEN)
|
||||||
return useTouchScreen;
|
return useTouchScreen;
|
||||||
if (item == &Option::USE_TOUCH_JOYPAD)
|
if (item == &Option::USE_TOUCH_JOYPAD)
|
||||||
return isJoyTouchArea;
|
return isJoyTouchArea;
|
||||||
if (item == &Option::DESTROY_VIBRATION)
|
if (item == &Option::DESTROY_VIBRATION)
|
||||||
return destroyVibration;
|
return destroyVibration;
|
||||||
|
if (item == &Option::SPRINTING)
|
||||||
|
return useSprinting;
|
||||||
|
if (item == &Option::BARONTOP)
|
||||||
|
return barOnTop;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -585,11 +585,14 @@ void Gui::renderHearts() {
|
|||||||
int oh = minecraft->player->lastHealth;
|
int oh = minecraft->player->lastHealth;
|
||||||
random.setSeed(tickCount * 312871);
|
random.setSeed(tickCount * 312871);
|
||||||
|
|
||||||
int xx = 2;//screenWidth / 2 - getNumSlots() * 10;
|
int screenWidth = (int)(minecraft->width * InvGuiScale);
|
||||||
|
int screenHeight = (int)(minecraft->height * InvGuiScale);
|
||||||
|
|
||||||
|
int xx = (minecraft->options.barOnTop) ? screenWidth / 2 - getNumSlots() * 10 - 1 : 2;
|
||||||
|
|
||||||
int armor = minecraft->player->getArmorValue();
|
int armor = minecraft->player->getArmorValue();
|
||||||
for (int i = 0; i < Player::MAX_HEALTH / 2; i++) {
|
for (int i = 0; i < Player::MAX_HEALTH / 2; i++) {
|
||||||
int yo = 2;
|
int yo = (minecraft->options.barOnTop) ? screenHeight - 32 : 2;
|
||||||
int ip2 = i + i + 1;
|
int ip2 = i + i + 1;
|
||||||
|
|
||||||
if (armor > 0) {
|
if (armor > 0) {
|
||||||
@@ -617,11 +620,15 @@ void Gui::renderHearts() {
|
|||||||
|
|
||||||
void Gui::renderBubbles() {
|
void Gui::renderBubbles() {
|
||||||
if (minecraft->player->isUnderLiquid(Material::water)) {
|
if (minecraft->player->isUnderLiquid(Material::water)) {
|
||||||
int yo = 12;
|
int screenWidth = (int)(minecraft->width * InvGuiScale);
|
||||||
|
int screenHeight = (int)(minecraft->height * InvGuiScale);
|
||||||
|
|
||||||
|
int xx = (minecraft->options.barOnTop) ? screenWidth / 2 - getNumSlots() * 10 - 1 : 2;
|
||||||
|
int yo = (minecraft->options.barOnTop) ? screenHeight - 42 : 12;
|
||||||
int count = (int) std::ceil((minecraft->player->airSupply - 2) * 10.0f / Player::TOTAL_AIR_SUPPLY);
|
int count = (int) std::ceil((minecraft->player->airSupply - 2) * 10.0f / Player::TOTAL_AIR_SUPPLY);
|
||||||
int extra = (int) std::ceil((minecraft->player->airSupply) * 10.0f / Player::TOTAL_AIR_SUPPLY) - count;
|
int extra = (int) std::ceil((minecraft->player->airSupply) * 10.0f / Player::TOTAL_AIR_SUPPLY) - count;
|
||||||
for (int i = 0; i < count + extra; i++) {
|
for (int i = 0; i < count + extra; i++) {
|
||||||
int xo = i * 8 + 2;
|
int xo = i * 8 + xx;
|
||||||
if (i < count) blit(xo, yo, 16, 9 * 2, 9, 9);
|
if (i < count) blit(xo, yo, 16, 9 * 2, 9, 9);
|
||||||
else blit(xo, yo, 16 + 9, 9 * 2, 9, 9);
|
else blit(xo, yo, 16 + 9, 9 * 2, 9, 9);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ void OptionsScreen::init() {
|
|||||||
categoryButtons.push_back(new Touch::TButton(3, "Game"));
|
categoryButtons.push_back(new Touch::TButton(3, "Game"));
|
||||||
categoryButtons.push_back(new Touch::TButton(4, "Controls"));
|
categoryButtons.push_back(new Touch::TButton(4, "Controls"));
|
||||||
categoryButtons.push_back(new Touch::TButton(5, "Graphics"));
|
categoryButtons.push_back(new Touch::TButton(5, "Graphics"));
|
||||||
|
categoryButtons.push_back(new Touch::TButton(6, "Tweaks"));
|
||||||
|
|
||||||
btnChangeUsername = new Touch::TButton(10, "Username");
|
btnChangeUsername = new Touch::TButton(10, "Username");
|
||||||
btnCredits = new Touch::TButton(11, "Credits");
|
btnCredits = new Touch::TButton(11, "Credits");
|
||||||
@@ -221,6 +222,7 @@ void OptionsScreen::generateOptionScreens() {
|
|||||||
optionPanes.push_back(new OptionsPane());
|
optionPanes.push_back(new OptionsPane());
|
||||||
optionPanes.push_back(new OptionsPane());
|
optionPanes.push_back(new OptionsPane());
|
||||||
optionPanes.push_back(new OptionsPane());
|
optionPanes.push_back(new OptionsPane());
|
||||||
|
optionPanes.push_back(new OptionsPane());
|
||||||
|
|
||||||
// Login Pane
|
// Login Pane
|
||||||
optionPanes[0]->createOptionsGroup("options.group.mojang")
|
optionPanes[0]->createOptionsGroup("options.group.mojang")
|
||||||
@@ -235,7 +237,8 @@ void OptionsScreen::generateOptionScreens() {
|
|||||||
|
|
||||||
// Controls Pane
|
// Controls Pane
|
||||||
optionPanes[2]->createOptionsGroup("options.group.controls")
|
optionPanes[2]->createOptionsGroup("options.group.controls")
|
||||||
.addOptionItem(&Options::Option::INVERT_MOUSE, minecraft);
|
.addOptionItem(&Options::Option::INVERT_MOUSE, minecraft)
|
||||||
|
.addOptionItem(&Options::Option::AUTOJUMP, minecraft);
|
||||||
|
|
||||||
// Graphics Pane
|
// Graphics Pane
|
||||||
optionPanes[3]->createOptionsGroup("options.group.graphics")
|
optionPanes[3]->createOptionsGroup("options.group.graphics")
|
||||||
@@ -246,6 +249,11 @@ void OptionsScreen::generateOptionScreens() {
|
|||||||
.addOptionItem(&Options::Option::VSYNC, minecraft)
|
.addOptionItem(&Options::Option::VSYNC, minecraft)
|
||||||
.addOptionItem(&Options::Option::MUSIC, minecraft)
|
.addOptionItem(&Options::Option::MUSIC, minecraft)
|
||||||
.addOptionItem(&Options::Option::SOUND, minecraft);
|
.addOptionItem(&Options::Option::SOUND, minecraft);
|
||||||
|
|
||||||
|
// Tweaks Pane
|
||||||
|
optionPanes[4]->createOptionsGroup("options.group.tweaks")
|
||||||
|
.addOptionItem(&Options::Option::SPRINTING, minecraft)
|
||||||
|
.addOptionItem(&Options::Option::BARONTOP, minecraft);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsScreen::mouseClicked(int x, int y, int buttonNum) {
|
void OptionsScreen::mouseClicked(int x, int y, int buttonNum) {
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ void LocalPlayer::aiStep() {
|
|||||||
// Sprint: detect W double-tap
|
// Sprint: detect W double-tap
|
||||||
{
|
{
|
||||||
bool forwardHeld = (input->ya > 0);
|
bool forwardHeld = (input->ya > 0);
|
||||||
if (forwardHeld && !prevForwardHeld) {
|
if (forwardHeld && !prevForwardHeld && minecraft->options.useSprinting) {
|
||||||
// leading edge of W press
|
// leading edge of W press
|
||||||
if (sprintDoubleTapTimer > 0)
|
if (sprintDoubleTapTimer > 0)
|
||||||
sprinting = true;
|
sprinting = true;
|
||||||
@@ -271,7 +271,7 @@ void LocalPlayer::move(float xa, float ya, float za) {
|
|||||||
|
|
||||||
float newX = x, newZ = z;
|
float newX = x, newZ = z;
|
||||||
|
|
||||||
if (autoJumpTime <= 0 && autoJumpEnabled)
|
if (autoJumpTime <= 0 && minecraft->options.autoJump)
|
||||||
{
|
{
|
||||||
// auto-jump when crossing the middle of a tile, and the tile in the front is blocked
|
// auto-jump when crossing the middle of a tile, and the tile in the front is blocked
|
||||||
bool jump = false;
|
bool jump = false;
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ static const unsigned int MAX_OFFLINE_DATA_LENGTH=400; // I set this because I l
|
|||||||
#pragma warning(disable:4309) // 'initializing' : truncation of constant value
|
#pragma warning(disable:4309) // 'initializing' : truncation of constant value
|
||||||
#endif
|
#endif
|
||||||
// Make sure highest bit is 0, so isValid in DatagramHeaderFormat is false
|
// Make sure highest bit is 0, so isValid in DatagramHeaderFormat is false
|
||||||
static const char OFFLINE_MESSAGE_DATA_ID[16]={0x00,0xFF,0xFF,0x00,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFD,0xFD,0x12,0x34,0x56,0x78};
|
static const unsigned char OFFLINE_MESSAGE_DATA_ID[16]={0x00,0xFF,0xFF,0x00,0xFE,0xFE,0xFE,0xFE,0xFD,0xFD,0xFD,0xFD,0x12,0x34,0x56,0x78};
|
||||||
|
|
||||||
struct PacketFollowedByData
|
struct PacketFollowedByData
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user