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) {
|
for (terrain=terrains();terrain;terrain=terrain->next) {
|
||||||
n -= distribution?terrain->distribution:1;
|
n -= distribution?terrain->distribution:1;
|
||||||
if (n<0) break;
|
if (n<0) break;
|
||||||
|
|
|
@ -22,10 +22,10 @@ namespace eressea {
|
||||||
|
|
||||||
object
|
object
|
||||||
objects::get(const char * name) {
|
objects::get(const char * name) {
|
||||||
|
lua_State * L = (lua_State *)global.vm_state;
|
||||||
attrib * a = a_find(*mAttribPtr, &at_object);
|
attrib * a = a_find(*mAttribPtr, &at_object);
|
||||||
for (;a;a=a->nexttype) {
|
for (;a;a=a->nexttype) {
|
||||||
if (strcmp(object_name(a), name)==0) {
|
if (strcmp(object_name(a), name)==0) {
|
||||||
lua_State * L = (lua_State *)global.vm_state;
|
|
||||||
variant val;
|
variant val;
|
||||||
object_type type;
|
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) {
|
static void set_object(attrib **attribs, const char * name, object_type type, variant val) {
|
||||||
|
|
Loading…
Reference in New Issue