From 1d125763223b30d31699fbe1f05fa42ecda5f443 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 6 Feb 2012 17:36:07 +0100 Subject: [PATCH] Fix 2 minor typos from the script update patch, and one in SoundManager The latter one caused sounds in mods not being properly cached (and not played), if the internal mod path started with "./", which is the case on windows since an earlier commit. --- Aquaria/ScriptInterface.cpp | 4 ++-- BBGE/SoundManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 0c22e78..228da1d 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -499,7 +499,7 @@ Entity *entity(lua_State *L, int slot = 1) ENSURE_TYPE(ent, SCO_ENTITY); if (!ent) { - scriptError("Entity Invalid Pointer"); + scriptDebug(L, "Entity Invalid Pointer"); } return ent; } @@ -519,7 +519,7 @@ Bone *bone(lua_State *L, int slot = 1) ENSURE_TYPE(b, SCO_BONE); if (!b) { - scriptError("Bone Invalid Pointer"); + scriptDebug(L, "Bone Invalid Pointer"); } return b; } diff --git a/BBGE/SoundManager.cpp b/BBGE/SoundManager.cpp index d73b9f2..94bbf7c 100644 --- a/BBGE/SoundManager.cpp +++ b/BBGE/SoundManager.cpp @@ -1546,7 +1546,7 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s } int loc = f.find_last_of('/'); - int loc2 = f.find('.'); + int loc2 = f.rfind('.'); if (loc != std::string::npos && loc2 != std::string::npos) { name = f.substr(loc+1, loc2-(loc+1));