Reichweitenlimit für sail() augebaut.

This commit is contained in:
Enno Rehling 2005-01-14 17:47:51 +00:00
parent cfb3b9655f
commit f9826a2674
5 changed files with 5 additions and 5 deletions

View File

@ -616,7 +616,7 @@ shipspeed (const ship * sh, const unit * u)
if (sh->damage) k = (k * (sh->size * DAMAGE_SCALE - sh->damage) + sh->size * DAMAGE_SCALE- 1) / (sh->size*DAMAGE_SCALE); if (sh->damage) k = (k * (sh->size * DAMAGE_SCALE - sh->damage) + sh->size * DAMAGE_SCALE- 1) / (sh->size*DAMAGE_SCALE);
#endif #endif
return min (k, MAXSPEED); return k;
} }
/* erwartete Anzahl Einheiten x 2 */ /* erwartete Anzahl Einheiten x 2 */

View File

@ -748,8 +748,6 @@ enum {
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
#define MAXSPEED 21
extern int shipspeed(const struct ship * sh, const struct unit * u); extern int shipspeed(const struct ship * sh, const struct unit * u);
extern int init_data(const char * filename); extern int init_data(const char * filename);

View File

@ -162,7 +162,8 @@
WarningLevel="4" WarningLevel="4"
SuppressStartupBanner="TRUE" SuppressStartupBanner="TRUE"
DebugInformationFormat="4" DebugInformationFormat="4"
CompileAs="0"/> CompileAs="0"
DisableSpecificWarnings="4505"/>
<Tool <Tool
Name="VCCustomBuildTool"/> Name="VCCustomBuildTool"/>
<Tool <Tool

View File

@ -220,7 +220,7 @@ region_move(region& r, int x, int y)
} }
rn = findregion(x+delta_x[dir], y+delta_y[dir]); rn = findregion(x+delta_x[dir], y+delta_y[dir]);
if (rn!=NULL) { if (rn!=NULL) {
direction_t reldir = (dir + 3) % MAXDIRECTIONS; direction_t reldir = (direction_t)((dir + 3) % MAXDIRECTIONS);
rn->connect[reldir] = &r; rn->connect[reldir] = &r;
} }
r.connect[dir] = rn; r.connect[dir] = rn;

View File

@ -534,6 +534,7 @@ bind_unit(lua_State * L)
// key-attributes for named flags: // key-attributes for named flags:
.def("set_flag", &set_flag) .def("set_flag", &set_flag)
.def("get_flag", &get_flag) .def("get_flag", &get_flag)
.def_readwrite("flags", &unit::flags)
// items: // items:
.def("get_item", &unit_getitem) .def("get_item", &unit_getitem)