forked from github/server
Reichweitenlimit für sail() augebaut.
This commit is contained in:
parent
cfb3b9655f
commit
f9826a2674
|
@ -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 */
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue