mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
Fix crash when your model is a block and you are holding air in inventory
This commit is contained in:
parent
69770cf93a
commit
9af457d63f
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user