coren's patch #649: Quick replay causing MP automoves

This commit is contained in:
Patrick Parker 2006-12-23 07:00:45 +00:00
parent 8e9a64897d
commit 12249561ca
4 changed files with 9 additions and 0 deletions

View file

@ -25,6 +25,7 @@ Version 1.2:
* revised maps: Blitz, Charge, Den of Onis, Hornshark Island, 4p Morituri,
Meteor Lake, Lagoon
* multiplayer
* fixed some automove bugs (bug #7494 and bug #7251)
* fixed passing controller in mp campaign (bug #7936)
* added help strings so that long map names can be read from the MP Create
screen

View file

@ -573,6 +573,7 @@ Petr Sobotka (Pietro)
Stéphane Gimenez (gim)
Mark de Wever (Mordante/SkeletonCrew)
Josef Reidinger (qk)
Pauli Nieminen (coren)
"
[/about]

View file

@ -923,6 +923,11 @@ bool do_replay(display& disp, const gamemap& map, const game_data& gameinfo,
std::pair<gamemap::location,unit> *up = units.extract(u->first);
up->first = dst;
units.add(up);
if (up->first == up->second.get_goto())
{
//if unit has arrived to destination, goto variable is cleaned
up->second.set_goto(gamemap::location());
}
u = units.find(dst);
check_checksums(disp,units,*cfg);
// Get side now, in case game events change the unit.

View file

@ -224,6 +224,7 @@ unit::unit(const game_data* gamedata, unit_map* unitmap, const gamemap* map,
gender_(dummy_unit ? gender : generate_gender(*t,use_traits)), resting_(false), state_(STATE_STANDING), facing_(gamemap::location::NORTH_EAST),draw_bars_(false),
gamedata_(gamedata),units_(unitmap),map_(map),gamestatus_(game_status),teams_(teams)
{
goto_ = gamemap::location();
side_ = side;
movement_ = 0;
attacks_left_ = 0;
@ -256,6 +257,7 @@ unit::unit(const unit_type* t, int side, bool use_traits, bool dummy_unit, unit_
gender_(dummy_unit ? gender : generate_gender(*t,use_traits)),state_(STATE_STANDING),facing_(gamemap::location::NORTH_EAST),draw_bars_(false),
gamedata_(NULL), units_(NULL),map_(NULL),gamestatus_(NULL),teams_(NULL)
{
goto_ = gamemap::location();
side_ = side;
movement_ = 0;
attacks_left_ = 0;