Fix never being able to place blocks again after /hold 0

also use version 1.0 beta instead of 1.0.0.0 beta
This commit is contained in:
UnknownShadow200 2019-01-25 13:14:22 +11:00
parent d673a51108
commit 2d1909cb92
6 changed files with 23 additions and 7 deletions

View file

@ -5,6 +5,8 @@ VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClassiCube", "ClassiCube.vcxproj", "{8A7D82BD-178A-4785-B41B-70EDE998920A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Pony", "..\..\PonyModel\Pony.vcxproj", "{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -21,6 +23,14 @@ Global
{8A7D82BD-178A-4785-B41B-70EDE998920A}.Release|x64.Build.0 = Release|x64
{8A7D82BD-178A-4785-B41B-70EDE998920A}.Release|x86.ActiveCfg = Release|Win32
{8A7D82BD-178A-4785-B41B-70EDE998920A}.Release|x86.Build.0 = Release|Win32
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Debug|x64.ActiveCfg = Debug|x64
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Debug|x64.Build.0 = Debug|x64
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Debug|x86.ActiveCfg = Debug|Win32
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Debug|x86.Build.0 = Debug|Win32
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Release|x64.ActiveCfg = Release|x64
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Release|x64.Build.0 = Release|x64
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Release|x86.ActiveCfg = Release|Win32
{8FCE93C4-A65B-4542-A4CC-EEE6A73E0901}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -5,8 +5,8 @@
*/
#define GAME_MAX_CMDARGS 5
#define GAME_APP_NAME "ClassiCube 1.0.0.0 beta"
#define GAME_APP_VER "1.0.0.0"
#define GAME_APP_NAME "ClassiCube 1.0 beta"
#define GAME_APP_VER "1.0"
#define GAME_API_VER 1
/* Max number of characters strings can have. */

View file

@ -18,6 +18,7 @@ bool Inventory_CheckChangeSelected(void) {
void Inventory_SetSelectedIndex(int index) {
if (!Inventory_CheckChangeSelected()) return;
Inventory.CanUse = true;
Inventory.SelectedIndex = index;
Event_RaiseVoid(&UserEvents.HeldBlockChanged);
}
@ -32,6 +33,7 @@ void Inventory_SetSelectedBlock(BlockID block) {
int i;
if (!Inventory_CheckChangeSelected()) return;
/* Swap with the current, if the new block is already in the hotbar */
Inventory.CanUse = true;
for (i = 0; i < INVENTORY_BLOCKS_PER_HOTBAR; i++) {
if (Inventory_Get(i) != block) continue;

View file

@ -835,10 +835,16 @@ static void MainScreen_UnhoverWidget(struct LScreen* s_, struct LWidget* w) {
LWidget_Redraw(&s->LblStatus);
}
/* TODO: Maybe find a not so hacky way.. */
CC_NOINLINE static uint32_t MainScreen_GetVersion(const String* version) {
uint8_t raw[4];
if (!Utils_ParseIP(version, raw)) return 0;
uint8_t raw[4] = { 0, 0, 0, 0 };
String parts[4];
int i, count;
/* 1.0.1 -> { 1, 0, 1, 0 } */
count = String_UNSAFE_Split(version, '.', parts, 4);
for (i = 0; i < count; i++) {
Convert_ParseUInt8(&parts[i], &raw[i]);
}
return Stream_GetU32_BE(raw);
}

View file

@ -518,7 +518,6 @@ void FetchUpdateTask_Run(bool release, bool d3d9) {
const char* exe_d3d9 = "ClassiCube.osx";
const char* exe_ogl = "ClassiCube.osx";
#else
#warn "Unsupported platform, launcher updating will not work"
const char* exe_d3d9 = "ClassiCube.unknown";
const char* exe_ogl = "ClassiCube.unknown";
#endif

View file

@ -54,7 +54,6 @@ const ReturnCode ReturnCode_SocketWouldBlock = WSAEWOULDBLOCK;
#endif
/* POSIX is mainly shared between Linux and OSX */
#ifdef CC_BUILD_POSIX
#include <curl/curl.h>
#include <errno.h>
#include <time.h>
#include <stdlib.h>