56769 Commits

Author SHA1 Message Date
anatoly techtonik
81510068e4 scons: Explain out-of-tree build and Repository 2014-05-02 16:30:30 +03:00
Sergey Popov
a6479c5b4d Merge pull request #161 from techtonik/master
scons: Format output for readability
2014-05-02 17:12:44 +04:00
anatoly techtonik
1ee1b16499 scons: Replace ERROR: prefix with WARN:
As noted by @loonycyborg in pr#161 failed Configure tests
are acceptable for some kind of builds.
2014-05-02 15:29:37 +03:00
Alexander van Gessel
0e8c135c14 Fix strict compilation 2014-05-02 14:24:37 +02:00
anatoly techtonik
e780569f82 scons: Format output for readability
Add separators between configure and build phases, prepend
failed prerequisite checks with ERROR: suffix and reformat
code a little.
2014-05-02 03:54:03 +03:00
David Mikos
0e401d31da Add players changelog entry for drag+drop fix. 2014-05-02 07:58:52 +09:30
David Mikos
c53b204abd Fix bug #21491: fix drag+drop for unit movements 2014-05-02 07:56:56 +09:30
Alexander van Gessel
8ab34f0240 Merge branch 'lua_put_unit' (PR #158) 2014-05-01 21:23:10 +02:00
mattsc
82e4ccad4d battle_calcs.attack_rating(): overhaul attack rating system
This was long overdue.  The return value is now much closer to
something describing the actual gain/loss (roughly) in units of gold.
2014-04-30 19:09:28 -07:00
mattsc
7623c5513a battle_calcs: do not use variance of attack in attack rating
This was an idea we tried so that we’d start with the most uncertain
attack first, but it did not work very well.
Keep the code for now, just comment it out.
2014-04-30 19:06:57 -07:00
mattsc
0218b88180 attack_combo_stats(): also cache intermediate battle outcomes
Speeds up some calculations significantly.
2014-04-30 19:05:08 -07:00
mattsc
2336921a81 simulate_combat_fake(): don't fill empty HP chances with zeros
That’s what wesnoth.simulate_combat() does, but is different from the
other functions in battle_calcs.  Only hp_chance[0] needs to be set,
even if it is zero.
2014-04-30 19:02:08 -07:00
mattsc
f0c7ddcab1 ai_helper: make AI move error messages more descriptive 2014-04-30 18:59:25 -07:00
mattsc
6f84e14b89 Hang Out MAI: bug fix in best move selection
In rare cases (when the unit has no hexes to move to, not even the one
it is on because it is in a zone to be avoided), this would cause an
error and crash the AI.
2014-04-30 18:52:02 -07:00
Chris Beck
e0871516fb Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-04-30 04:08:58 -04:00
Chris Beck
71916695c1 fixup bad changelog commit
this fixes up commit 95f11ab70ba723d3fb5a75e82e5104ece62e08a5
which put the changelog entry on the wrong version
2014-04-30 04:07:45 -04:00
Guorui Xi
a81aa56a6d Fix a typo in log message of recruitment CA 2014-04-30 15:05:41 +08:00
Chris Beck
95f11ab70b update changelog 2014-04-29 12:57:23 -04:00
Chris Beck
0597151f15 fix implementation bug in random number generator
Our simple_rng is described in comments (in .cpp file) as coming
from a desription in man pages, man rand(3). Here is a link to
that page:

http://linux.die.net/man/3/rand

Our implementation did not match the specification, because the
rand_pool_ variable was an unsigned int and not an unsigned long.

Since the rand_pool_ should basically be constantly overflowing
under normal operation of the rng, it is obvious to me that this
would affect the long term random results. It is not at all obvious
to me whether significant bias or defect would be introduced... but
it would not be surprising either.
2014-04-29 12:56:46 -04:00
Alexander van Gessel
060cc19008 Give lua_unit a put_map member function
This allows us to remove the destructor-avoidance hack in wesnoth.put_unit
and simplify the function's handing of various lua_unit types.
2014-04-28 16:53:11 +02:00
gfgtdf
7a46832348 more robust replaying of moves
we now set skipsighted to true if there is no fog or shroud.
The intention is that if a player uses fog=no in debugmode we still get
the same move destination in replays.
2014-04-27 20:01:53 +02:00
gfgtdf
5bf4125bf9 tidyup replay.cpp 2014-04-27 20:01:52 +02:00
gfgtdf
357d1a4ce3 more robust replay.cpp functions
we now add nonundoable commands at the current position instead of
assuming
at_end(), this way nonundoable replay entrys like speak can now also be
added
while we are not at end.
Usually playturn_network_adapter ensures that we are always are at_end()
and i didn't get any error with the previous solution but the new
solution
is just more robust in case something goes wrong.
Note that we cannot add nonundoable commands at end if we aren’t at end
because
in that case the user would see the message again when he replays it.
Note that we cannot just do this for normal command because it might
bring the
replay in disorder.
2014-04-27 20:01:51 +02:00
gfgtdf
02a97838b8 enable msvc bool conversion check.
we now enable warning 4800. I ran though the msvc compile with this
warning and i found some (in overlay.hpp, unit.cpp, whiteboard/move.cpp)
unintended implicit bool b = cfg["attributename"] casts that use
the implicit attribute_value to int cast and then a int to bool cast.
So for attributename=true b would be false. So i believe this
is a useful warning.

There are also a lot of implicit int to bool cast from the SDL and LUA
C-libraries which use int instead of bool because C doesn't have bool.
In this case this warning is less useful, but i still think it's worth
it since a "!= 0" or "== 1" isn't cost.

Plus if someone really wants to disable this warning he can still
disable it in the msvc project settings, while before is was not
possible for someone to enable this warning the the settings.
2014-04-27 20:01:50 +02:00
gfgtdf
03721d9fe6 commandline option for precise timestamps 2014-04-27 20:01:49 +02:00
gfgtdf
86b68cf8d6 add precise_timestamps setter 2014-04-27 20:01:48 +02:00
mattsc
bbffa5e88a ai_helper: remove a debug message
It’s served its purpose and is not needed any more.
2014-04-26 18:26:45 -07:00
ln-zookeeper
8f87c62785 Prevent Malifor from respawning in cave wall 2014-04-26 23:58:18 +03:00
mattsc
e99423bad9 Lua AIs: do not use empty tables as filters
It’s faster not to provide any argument to wesnoth.get_units() if all
units are to be found.
2014-04-26 07:18:23 -07:00
mattsc
8e9780d606 ai_helper.get_live_units: don't use filter_wml
It’s slow, the new method is between 10 and 20 times faster.
2014-04-26 06:46:32 -07:00
David Mikos
eadfe4a990 Tutorial: set initial facing directions for the player and Delfador 2014-04-26 10:32:43 +09:30
David Mikos
bf81a314a6 Tutorial: add summon quintain animation to Delfador. 2014-04-26 10:28:48 +09:30
Chris Beck
4a0e7143eb update changelog 2014-04-25 19:45:36 -04:00
Chris Beck
ccb243138c remove spurious WML variable manipulations in playcampaign.cpp
these appear to cause replay corruption, and bugs 19218, 21562

the replay_start cfg is already set correctly as the snapshot
at the start of a game, in playsingle_controller.cpp, in the
play_scenario function:

0aa13d477d/src/playsingle_controller.cpp (L372)
2014-04-25 19:40:41 -04:00
Alexander van Gessel
ab5fec20d9 Insert lua_unit's contained pointer directly
Not copying the unit improves the speed of wesnoth.put_unit by two orders
of magnitude from lua's perspective.

To do this, we have to take ownership of any owned pointer from lua_unit.
We do this by not running lua_unit's destructor, but just overwriting the memory it's in.
2014-04-26 01:37:13 +02:00
Chris Beck
2a5bee8f8c add remark about 21965 to RELEASE_NOTES 2014-04-25 15:26:41 -04:00
Groggy Dice
2a8d4e2d28 html.py: import re module
Bugfix for last commit.
2014-04-25 02:45:26 -04:00
Groggy Dice
c85af755ac html.py: format add-on description for HTML
The description text does not get rendered very well on a webpage. One
solution might be to use pre-wrap/word-wrap in the CSS, but due to
differences between browsers, that's a can of worms (at least for me, I'm
not a web pro).

So, the not-so-elegant solution is to add <br/> to every line.

URLs are also not linked in the plain text. Although in modern browsers
you can select the text and right-click, it's still convenient to turn
them into actual links.
2014-04-25 01:26:11 -04:00
Groggy Dice
b058f29d1e wmllint: change "usage of" magic comment to re.search
There seems no particular reason to require that this magic comment be at
the very beginning of the line, so why not switch from re.match to
re.search.

Also, update comments to reflect the fact that UtBS no longer uses this
magic comment.

A suggestion has been made to get rid of this magic comment now that UtBS
is no longer using it, but it may still be in use in some UMC somewhere.
2014-04-25 00:56:25 -04:00
David Mikos
83836b1516 Fix bug #21967: fix crash when unit modification to traits has empty id 2014-04-25 13:25:39 +09:30
gfgtdf
de30bfcaed fixup fe722172ae (add set_action_bonus_count) 2014-04-24 20:36:51 +02:00
gfgtdf
fe722172ae add set_action_bonus_count when attacking
Duthlet noticed this was missing.
2014-04-24 20:05:42 +02:00
mattsc
664eeae888 battle_calcs.lua: fix bug in get_attack_map_unit() for enemy units
Own units with MP left need to be taken off the map before enemy path
finding, not just added to the table.
2014-04-23 18:48:46 -07:00
Chris Beck
0aa13d477d add a TODO comment to properly fix 21902 2014-04-23 21:40:40 -04:00
gfgtdf
28ebde5741 fix unit move+attack aborted, 21961
stupid c++ allows int to bool implicit cast.
2014-04-23 23:59:03 +02:00
gfgtdf
0da97266da add code for precise timestamps in log
the code is not used yet, You can set precise_timestamp= true to use it.
2014-04-23 23:03:25 +02:00
gfgtdf
8a998964ac use boost::ref in boost::bind 2014-04-23 23:03:13 +02:00
gfgtdf
bf1eb2eef0 use template for config_assign
this removes code dublication,
2014-04-23 23:03:02 +02:00
gfgtdf
80bdd5a20b more robust replaying 2014-04-23 22:57:27 +02:00
gfgtdf
a343d3a1f4 more robust replaying 2014-04-23 22:50:32 +02:00