diff --git a/s/cmake-init b/s/cmake-init index 2a3e97fc4..5da7e985f 100755 --- a/s/cmake-init +++ b/s/cmake-init @@ -51,7 +51,7 @@ LUA_DIR=/usr if [ -d /usr/include/lua5.1 ]; then LUA_VERSION="5.1" elif [ -d /usr/local/include/lua5.1 ]; then - LUA_DIR=/usr/local + export LUA_DIR=/usr/local LUA_VERSION="5.1" fi @@ -64,8 +64,6 @@ SET (CMAKE_LIBRARY_PATH "$LIBRARY_PATH" CACHE PATH "") SET (CMAKE_PREFIX_PATH "$PREFIX_PATH" CACHE PATH "") HEREDOC -#echo 'SET (LUA_DIR "$LUA_DIR" PATH)' >> $BUILD/config.cmake - path="$(which tolua)" if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "tolua is not installed, building from source" @@ -77,7 +75,11 @@ if [ "$HAVE_TOLUA" = "0" ] || [ -z $path ] ; then echo "building tolua..." cd tolua make - echo 'SET(PC_TOLUA_DIR "$ROOT/tolua" CACHE PATH "tolua root")' >> $BUILD/config.cmake + cd - +cat >> $BUILD/config.cmake <next) { + unit *u, *ub = NULL; if (!is_astral(r) || fval(r->terrain, FORBIDDEN_REGION)) continue; + for (u = r->units; u; u = u->next) { + if (u->_race == rc_brain) { + if (!ub) { + ub = u; + } + else { + int n = u->number + ub->number; + if (n <= MAX_BRAIN_SIZE) { + scale_number(ub, n); + u->number = 0; + } + else { + ub = u; + } + } + } + } + /* Neues Monster ? */ if (next-- == 0) { - unit *u = - create_unit(r, f0, 1 + rng_int() % 10 + rng_int() % 10, - get_race(RC_HIRNTOETER), 0, NULL, NULL); + u = create_unit(r, f, 1 + rng_int() % 10 + rng_int() % 10, + rc_brain, 0, NULL, NULL); equip_unit(u, get_equipment("seed_braineater")); next = rng_int() % (int)(chance * 100);