Add support for WML unit tests to the VC compiler, and also a nice windows cmd script, porting the bash script which we have, and which uses a timeout program which Aquileia wrote for us and added to the VC project files.
As the --timeout option for Wesnoth can stall the process, we replace it
by an encapsulation comparable to the Unix timeout function.
WindowsTimeout isn't limited to Wesnoth, it can in fact set a timeout for
any executable called through it.
An example on the use of these WinAPI functions can be found on
http://msdn.microsoft.com/en-us/library/windows/desktop/ms682512.aspx
it seems like my compliler sometimes includes windows headers even before we define UNICODE in windows_tray_notification.hpp so the UNICODE define has no effect. Most likeley this is more an issue with strange local compiler adjustments than with the c++ code. This fixes it too.
Now the game ends on all client at the same time even with victory_when_enemies_defeated_= no.
previously in mp the attribute victory_when_enemies_defeated only prevents victory for human sides but doesn't prevent defeats. This means in a simple 1vs1 Mp game with victory_when_enemies_defeated=no when side 1 gets defeated, Player 1 will get the "You have been defeated" message and for client 2 the game continues. I tested with adding victory_when_enemies_defeated =no in 2p_Arcanclave_Citadel.cfg.
When side 1 looses (leader killed) (during side 2' turn) the following happens:
[list=1]
[*]side 1 gets a "you get defeated", side 2 continues
[*]when side 1 checks "end scenario" side 2 gets a "side 1 has left the game... reassign controll to ai/human/idle/..."
[*]I clicked "controll by human" on client 2
[*]I ended side 2's turn and continued playing side 1 on client 2 and didnt get defeated
[/list]
I am sure that this is not the intended behaviour.
this commits also effects when "enemies defeated" is fired accodignly so it is fired on all clients at the same time like any synced event.
This commit borrows ideas from PR #29
If there are enemies, face towards the closest one (with distance reduced by enemy level)
If you have a leader, face away from him.
Otherwise, face towards the center of the map.
An effect that does more than one thing concatenates the descriptions.
The effect description isn't updated when a new weapon which it affects
is added to the unit.
Unit hiding is usually done in replace_temporary, which is called by
proceed_to. As proceed_to exits at the beginning if animate is false, this
would seem like a good place to hide the unit, but it is also unhidden during
this function. This means that was_hidden_ is set multiple times, with the
second time overwriting it with the temporary state of being hidden.
As animate remains false for the entire lifetime of the unit mover, we hide it
at the start and let finish unhide it again.
Reported at http://r.wesnoth.org/p570866