Skip to content

Commit

Permalink
Fix crash when your model is a block and you are holding air in inven…
Browse files Browse the repository at this point in the history
…tory
  • Loading branch information
UnknownShadow200 committed Nov 29, 2018
1 parent 69770cf commit 9af457d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model.c
Expand Up @@ -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;
Expand Down
7 changes: 7 additions & 0 deletions src/Window.h
@@ -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
*/
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 9af457d

Please sign in to comment.