1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-12-25 22:25:46 +00:00

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.
This commit is contained in:
fgenesis 2012-02-06 17:36:07 +01:00
parent ac822ec91d
commit 1d12576322
2 changed files with 3 additions and 3 deletions

View file

@ -499,7 +499,7 @@ Entity *entity(lua_State *L, int slot = 1)
ENSURE_TYPE(ent, SCO_ENTITY); ENSURE_TYPE(ent, SCO_ENTITY);
if (!ent) if (!ent)
{ {
scriptError("Entity Invalid Pointer"); scriptDebug(L, "Entity Invalid Pointer");
} }
return ent; return ent;
} }
@ -519,7 +519,7 @@ Bone *bone(lua_State *L, int slot = 1)
ENSURE_TYPE(b, SCO_BONE); ENSURE_TYPE(b, SCO_BONE);
if (!b) if (!b)
{ {
scriptError("Bone Invalid Pointer"); scriptDebug(L, "Bone Invalid Pointer");
} }
return b; return b;
} }

View file

@ -1546,7 +1546,7 @@ Buffer SoundManager::loadSoundIntoBank(const std::string &filename, const std::s
} }
int loc = f.find_last_of('/'); int loc = f.find_last_of('/');
int loc2 = f.find('.'); int loc2 = f.rfind('.');
if (loc != std::string::npos && loc2 != std::string::npos) if (loc != std::string::npos && loc2 != std::string::npos)
{ {
name = f.substr(loc+1, loc2-(loc+1)); name = f.substr(loc+1, loc2-(loc+1));