forked from mirrors/kolyah35-minecraft-pe-0.6.1
FEAT: ifdef CHEATS (temp solution)
This commit is contained in:
parent
c7d6289781
commit
df99a29258
1 changed files with 83 additions and 82 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
#include "Minecraft.h"
|
#include "Minecraft.h"
|
||||||
|
#include "client/Options.h"
|
||||||
#include "client/player/input/IBuildInput.h"
|
#include "client/player/input/IBuildInput.h"
|
||||||
#include "platform/input/Keyboard.h"
|
#include "platform/input/Keyboard.h"
|
||||||
#include "world/item/Item.h"
|
#include "world/item/Item.h"
|
||||||
|
|
@ -724,10 +725,6 @@ void Minecraft::tickInput() {
|
||||||
setScreen(new ConsoleScreen());
|
setScreen(new ConsoleScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!screen && key == Keyboard::KEY_O || key == 250) {
|
|
||||||
releaseMouse();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (key == Keyboard::KEY_F3) {
|
if (key == Keyboard::KEY_F3) {
|
||||||
options.toggle(OPTIONS_RENDER_DEBUG);
|
options.toggle(OPTIONS_RENDER_DEBUG);
|
||||||
}
|
}
|
||||||
|
|
@ -741,12 +738,15 @@ void Minecraft::tickInput() {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!screen && key == Keyboard::KEY_O || key == 250) {
|
||||||
|
releaseMouse();
|
||||||
|
}
|
||||||
|
|
||||||
if (key == Keyboard::KEY_L) {
|
if (key == Keyboard::KEY_F) {
|
||||||
int dst = options.getIntValue(OPTIONS_VIEW_DISTANCE);
|
int dst = options.getIntValue(OPTIONS_VIEW_DISTANCE);
|
||||||
options.set(OPTIONS_VIEW_DISTANCE, (dst + 1) % 4);
|
options.set(OPTIONS_VIEW_DISTANCE, (dst + 1) % 4);
|
||||||
}
|
}
|
||||||
|
#ifdef CHEATS
|
||||||
if (key == Keyboard::KEY_U) {
|
if (key == Keyboard::KEY_U) {
|
||||||
onGraphicsReset();
|
onGraphicsReset();
|
||||||
player->heal(100);
|
player->heal(100);
|
||||||
|
|
@ -828,6 +828,7 @@ void Minecraft::tickInput() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef PLATFORM_DESKTOP
|
#ifndef PLATFORM_DESKTOP
|
||||||
if (key == 82)
|
if (key == 82)
|
||||||
|
|
@ -1139,7 +1140,7 @@ void Minecraft::init()
|
||||||
checkGlError("Init complete");
|
checkGlError("Init complete");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
user = new User("TestUser", "");
|
user = new User(options.getStringValue(OPTIONS_USERNAME), "");
|
||||||
setIsCreativeMode(false); // false means it's Survival Mode
|
setIsCreativeMode(false); // false means it's Survival Mode
|
||||||
reloadOptions();
|
reloadOptions();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue