From 25b7c141fb951573882773ddb4bc4a917b2d49d0 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 2 May 2007 02:11:59 +0000 Subject: [PATCH] bind UnloadTexture --- stepmania/src/Sprite.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index a059a7889b..cdac2adb9c 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -963,8 +963,15 @@ class LunaSprite: public Luna public: static int Load( T* p, lua_State *L ) { - RageTextureID ID( SArg(1) ); - p->Load( ID ); + if( lua_isnil(L, 1) ) + { + p->UnloadTexture(); + } + else + { + RageTextureID ID( SArg(1) ); + p->Load( ID ); + } return 0; } static int LoadBackground( T* p, lua_State *L )