66117 Commits

Author SHA1 Message Date
ln-zookeeper
a624dca7d3 Fixed a shadow 2016-09-22 21:10:17 +03:00
Charles Dang
23106671f6 GUI2: cleaned up utils::string_map usage when appropriate 2016-09-22 19:41:50 +11:00
Charles Dang
c1ca0e360e MP Staging: some basic userlist handling 2016-09-22 05:18:11 +11:00
Charles Dang
e54d8fe832 Merge pull request #794 from matthiaskrgr/unused_var
reports: remove unused variable "str"
2016-09-22 00:42:07 +11:00
Matthias Krüger
9675440c71 reports: remove unused variable "str" 2016-09-21 15:34:01 +02:00
Charles Dang
82cd550cff Chatbox: fixed command messages not working
This line got commented out somewhere with the transition to a standalone widget.
2016-09-21 16:45:37 +11:00
Charles Dang
db0cb45352 Chatbox: big code cleanup 2016-09-21 16:44:13 +11:00
gfgtdf
4d0fbc1d4e attempt to fix UB in tree_view and unit drawer.
since the treeview nodes are not owned by the treeview but by the
content grid, they get destroyed after the treeview so accesing the
treeview in the nodes dtor might result in UB.

Also UB happend in playsingle_controller and unit_drawer::unit_drawer
in case that the teams vector was empty.
2016-09-21 00:35:31 +02:00
Jyrki Vesterinen
9f379b96e3 Fix rare memory corruption in combat simulation
It occurred when a fight was simulated for a
* slowed unit
* that can level up after the fight
* using Monte Carlo simulation.

Monte_carlo_combat_matrix clears the matrix in constructor because it uses
the matrix in a different way than probability_combat_matrix. Clearing was
unnecessarily thorough and marked all the rows and columns as unused.

If the unit was slowed before the fight, no values were ever placed to
plane 0 (neither unit slowed). Thus, all the rows/columns in plane 0 were
still marked as unused even after the simulation.

After the Monte Carlo simulation, the simulation code considered the
possibility that the unit may have leveled up. It does that by moving all
the values that mean "combatant B dead" into the last row of plane 0, that
means "combatant A full HP and not slowed".

The code that moves the values assumes that at least one row and column is
used. If none are, then it dereferences an invalid iterator and corrupts
memory.

I fixed the bug my making prob_matrix::clear() leave row and column 0 as
used.

After applying this fix, I can't reproduce the assertion failure @mattsc
reported or the hang @GregoryLundberg reported. Those problems were likely
caused by the memory corruption.
2016-09-20 23:19:54 +03:00
Charles Dang
0bbcd4055e Uncomment re-selection guard in tgroup::set_member_active
Without this, multiple selections could occur in the Faction Select dialog. However, somehow the
next option immediately to the disabled one gets selected instead of the first available selection
as expected. While this fixes the FLG dialog, it might have repercussions for the Create Unit dialog.

It's possible this issue has something to do with the ordering of the map. Will have to investigate
further after this.
2016-09-21 05:13:06 +11:00
Jyrki Vesterinen
740acecfa5 Update Visual Studio project 2016-09-20 20:41:41 +03:00
Charles Dang
b264ed0626 Added gender and random icons 2016-09-21 04:11:29 +11:00
Charles Dang
42cb2afae5 MP Staging: layout tweaks 2016-09-21 03:06:46 +11:00
Charles Dang
5fead23a32 Fixup tests 2016-09-21 02:49:00 +11:00
mattsc
aecf8ab7bc Demote AI error message to warning and soften text
Changing to warning was done previously for all other messages of this
type but forgotten for this one (commit 7185d6cc80). Also, there’s not
been any recorded bug caused by this in many years, so there is no need
to keep the second part of the text.
2016-09-20 07:51:37 -07:00
Charles Dang
828d82c1ad MP Staging: enable chatbox 2016-09-21 01:49:48 +11:00
Charles Dang
dc69c7f6c1 Pass the lobby_info reference around like a hot potato 2016-09-21 01:49:47 +11:00
Charles Dang
dcc34fc328 Refactored twesnothd_connection member out of lobby_info
It's only use was to pass refresh_lobby on process_gamelist_diff fail. It makes more sense to
delegate that to the caller - in this case, the lobby. This also means the chatbox widget owns
a twesnothd_connection pointer so the chatbox can be used in situations where no server connection
is present.
2016-09-21 01:49:46 +11:00
mattsc
c90294215a Update changelog and release notes with new tunnel functionality 2016-09-20 07:27:52 -07:00
mattsc
09248c7dea Merge pull request #790 from wesnoth/fix-tunnel-issues
Tunnels: fix issues with vision
2016-09-20 06:52:08 -07:00
Charles Dang
ad0a9768b9 MP Staging: wired in more functionality 2016-09-20 23:04:24 +11:00
Charles Dang
96a66dc37c Dropdown List: fixed grow factor for name column 2016-09-20 21:29:47 +11:00
Ignacio R. Morelle
f2efa155c9 gui2/tpreferences: Restore combobox adv. preferences option descriptions
These were lost with the original port and somehow they never got fixed
despite my repeated insistence.
2016-09-20 07:11:43 -03:00
Charles Dang
4ffd212c91 Faction Select: open to any previously selected leader 2016-09-20 19:35:36 +11:00
Charles Dang
b2e6bd5bdc Game Version: removed unnecessary loop 2016-09-20 19:06:39 +11:00
Charles Dang
61b5cde7a0 Game Stats: removed horizontal spacer line 2016-09-20 19:05:29 +11:00
mattsc
aae3b67132 Fix indenting 2016-09-19 18:49:25 -07:00
mattsc
f13123648e Tunnels: fix issues when exit hex is occupied by invisible unit
This can happen when enemy units are hidden under fog or have the hides
ability. Either way, enemy units always blocks the tunnel.

Invisible allied units may or may not block the tunnel, depending on
the setting of pass_allied_units in the [tunnel] tag. It is therefore
necessary to get and check the full teleport map during a unit’s move
through a teleport, but with see_all=true (while the path finding uses
see_all=false).

This commit fixes the behavior and reinstates the ‘failed teleport’
message.
2016-09-19 18:46:02 -07:00
Celtic Minstrel
f096a22e2e Merge pull request #793 from GregoryLundberg/GL_debug_kill
Fix bug: Debug|Kill [have_unit] error
2016-09-19 20:23:34 -04:00
Gregory A Lundberg
c66325856b Fix bug: Debug|Kill [have_unit] error
Set the killed units hit points to zero so [have_unit] does not find it.
2016-09-19 19:13:07 -05:00
Celtic Minstrel
6b9ed2e3d4 Update XCode project 2016-09-19 20:06:30 -04:00
Celtic Minstrel
83bd6cdfbf Merge pull request #792 from GregoryLundberg/GL_harm_unit
Fix bug: Lua harm_unit
2016-09-19 19:41:53 -04:00
Gregory A Lundberg
3809a69a42 Fix bug: Lua harm_unit
Missing local T.

cf https://forums.wesnoth.org/viewtopic.php?f=21&t=44567
2016-09-19 17:40:41 -05:00
Lari Nieminen
60a6519295 Merge pull request #783 from GregoryLundberg/GL_HttT_changelog
HttT Player changelog
2016-09-20 00:13:50 +03:00
Lari Nieminen
d0d4223661 Merge pull request #733 from GregoryLundberg/GL_HttT_S06_logical_thieves
HttT S06 Logical Thieves
2016-09-20 00:11:51 +03:00
Gregory A Lundberg
9b364d25d2 HttT S06 Logical Thieves
If you have already killed Agadla by turn 4, instead of offering a choice, the three who appear simply join your forces.

This means it is possible to never get the Thieves, and not be able to recruit them. But you'd have to win before turn 4; so it's not possible unless you're cheating.
2016-09-19 15:42:22 -05:00
Gregory A Lundberg
d6f7de91ac HttT S06 Thieves join if leader killed
It is possible to take Elesenfar without ever capturing a village. To allow for this, and ensure the player always gets the Theives, they appear when Agadla dies as well as upon capturing a village.
2016-09-19 15:30:11 -05:00
Gregory A Lundberg
11d9891319 HttT S06 Fix bug: Let the player know
However the conversation plays out, once you meet the Theives you can recruit them. So let the player know.
2016-09-19 15:30:11 -05:00
Gregory A Lundberg
0594ebd172 HttT S06 Use capture and radius
Instead of a moveto, use a capture event so the theives only appear when actually capturing a village on the island.

Instead of listing the position of each village, use a radius so we can move them around, or add or remove a village more easily.
2016-09-19 15:13:52 -05:00
Jyrki Vesterinen
b3528593b7 Mention Boost.Thread in INSTALL
Wesnoth requires it, and none of the other Boost modules mentioned in
INSTALL depend on it.
2016-09-19 22:27:04 +03:00
Charles Dang
9721910d98 Initial implementation of GUI2 MP Staging dialog (Connect + Wait) 2016-09-20 05:34:31 +11:00
Charles Dang
8609955b74 Refactored square/minimal button definition code
* Reduced used of macro arguments slightly
* Made overlay images centered instead of stretched to size
2016-09-20 03:42:07 +11:00
Charles Dang
dba4bd78b3 Added short slider definition 2016-09-20 03:42:06 +11:00
Gregory A Lundberg
ccce958692 HttT Player changelog 2016-09-19 11:27:38 -05:00
Lari Nieminen
2970360d49 Merge pull request #734 from GregoryLundberg/GL_HttT_S07_ambushers_reduced
HttT S07 Ambushers Reduced
2016-09-19 19:24:19 +03:00
Charles Dang
2dd8cfdbdc GUI2: added flag to enable markup from WML 2016-09-20 02:06:16 +11:00
Gregory A Lundberg
0493c1eba4 HttT S07 Ambushers reduced
There was an old designer's note that killing the leaders in S01 ('The Elves Besieged') should reduce the number of ambushers hiding in S07 ('Crossroads').
2016-09-19 09:57:25 -05:00
Charles Dang
3e90310038 Fixed warning about no return 2016-09-19 23:51:50 +11:00
gfgtdf
8508b42bed use boost locale for strftime
fixes http://gna.org/bugs/?24927
2016-09-19 13:49:48 +02:00
Wedge009
21f01b0e5c Stop Esperanto date formatting crashing in Windows.
There's no such date format as %J. Also, 12-hour format was still using 24-hour.
2016-09-19 18:52:21 +10:00