forked from github/server
- Fehler in der neuen random_terrain routine gefunden.
- Problem mit altem luabind repariert.
This commit is contained in:
parent
ba555c842a
commit
0336a0953e
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue