Permalink
Browse files

Fix crash when your model is a block and you are holding air in inven…

…tory
  • Loading branch information...
UnknownShadow200 committed Nov 29, 2018
1 parent 69770cf commit 9af457d63f6830ec4c465208c2709037cab43cff
Showing with 8 additions and 1 deletion.
  1. +1 −1 src/Model.c
  2. +7 −0 src/Window.h
@@ -1444,7 +1444,7 @@ static struct Model* ZombieModel_GetInstance(void) {
/*########################################################################################################################*
*---------------------------------------------------------BlockModel------------------------------------------------------*
*#########################################################################################################################*/
static struct Model block_model = { "block" };
static struct Model block_model = { "block", NULL, &human_tex };
static BlockID bModel_block = BLOCK_AIR;
static Vector3 bModel_minBB, bModel_maxBB;
static int bModel_lastTexIndex = -1, bModel_texIndex;
@@ -1,6 +1,7 @@
#ifndef CC_WINDOW_H
#define CC_WINDOW_H
#include "String.h"
#include "Bitmap.h"
/* Abstracts creating and managing a native window.
Copyright 2017 ClassicalSharp | Licensed under BSD-3 | Based on OpenTK code
*/
@@ -100,9 +101,15 @@ bool Window_GetCursorVisible(void);
/* NOTE: You must be careful with this! OS typically uses a counter for visibility,
so setting invisible multiple times means you must then set visible multiple times. */
void Window_SetCursorVisible(bool visible);

/* Shows a dialog box window. */
CC_EXPORT void Window_ShowDialog(const char* title, const char* msg);

void Window_DrawerInit(void);
void Window_DrawerFree(void);
void Window_DrawerGet(Bitmap* bmp, int width, int height);
void Window_Redraw(Bitmap* bmp, Rect2D r);

#ifndef CC_BUILD_D3D9
/* Initialises an OpenGL context that most closely matches the input arguments. */
/* NOTE: You must have created a window beforehand, as the GL context is attached to the window. */

0 comments on commit 9af457d

Please sign in to comment.