- Fehler in der neuen random_terrain routine gefunden.

- Problem mit altem luabind repariert.
This commit is contained in:
Enno Rehling 2006-01-01 23:29:04 +00:00
parent ba555c842a
commit 0336a0953e
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ random_terrain(boolean distribution)
}
}
n = rand() % distribution?ndistribution:nterrains;
n = rand() % (distribution?ndistribution:nterrains);
for (terrain=terrains();terrain;terrain=terrain->next) {
n -= distribution?terrain->distribution:1;
if (n<0) break;

View File

@ -22,10 +22,10 @@ namespace eressea {
object
objects::get(const char * name) {
lua_State * L = (lua_State *)global.vm_state;
attrib * a = a_find(*mAttribPtr, &at_object);
for (;a;a=a->nexttype) {
if (strcmp(object_name(a), name)==0) {
lua_State * L = (lua_State *)global.vm_state;
variant val;
object_type type;
@ -52,7 +52,7 @@ namespace eressea {
}
}
}
return object(); // nil
return object(L); // nil
}
static void set_object(attrib **attribs, const char * name, object_type type, variant val) {