[Scummvm-cvs-logs] CVS: residual lua.cpp,1.11,1.12
James Brown
ender at users.sourceforge.net
Wed Aug 20 05:01:03 CEST 2003
Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1:/tmp/cvs-serv9324
Modified Files:
lua.cpp
Log Message:
Remove code duplication
Index: lua.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/lua.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- lua.cpp 20 Aug 2003 08:10:31 -0000 1.11
+++ lua.cpp 20 Aug 2003 10:38:30 -0000 1.12
@@ -238,20 +238,11 @@
Actor *act = check_actor(1);
int index = check_int(2);
int chore = check_int(3);
- Costume *costume;
-
- if (lua_isnil(lua_getparam(4))) {
- costume = act->currentCostume();
- if (costume == NULL)
- error("Actor %s has no costume\n", act->name());
- } else {
- costume = act->findCostume(luaL_check_string(4));
- if (costume == NULL)
- error("Actor %s has no costume %s\n", act->name(), lua_getstring(lua_getparam(4)));
- }
+ Costume *costume = get_costume(act, 4);
costume->setTalkChore(index, chore);
}
+
static void SetActorVisibility() {
Actor *act = check_actor(1);
bool val = getbool(2);
More information about the Scummvm-git-logs
mailing list