64867 Commits

Author SHA1 Message Date
Andreas Löf
501eb60743 Fix crash in context destructor
This fixes a crash that was seen when the context destructor was calling
either leave or leave_global while iterating over the list. The current iterator
handle would be invalidated and further calls to it would return invalid values.
2016-07-17 22:06:52 +12:00
Andreas Löf
516daccbba Move the global event context onto the general event queue.
This moves the global event context onto the general event queue
and creates it through RAII instead.
2016-07-17 20:33:09 +12:00
Andreas Löf
6964aa2ba7 Change const_iterator to iterator in an attempt to appease travis. 2016-07-17 16:01:31 +12:00
Andreas Löf
75632003ef Add a destructor to the context class.
This adds a destructor to the context class to ensure that any joined
event_handlers leave the context before it is deallocated.
It also changes the preferences to explicitly leave the global event
context as it is destroyed instead of when the event handler is
destroyed during _exit().
Also replace std::list.splice with push_back and erase(iterator) in
an attempt to avoid compile errors on older versions of gcc.
2016-07-17 15:15:18 +12:00
Gregory A Lundberg
dad9d8f6c8 L Fix the Advisor role
Use a consistent type= list and include all advancements when selecting and Advisor.

Harper and Baldras cannot be the Advisor.

No need to search for an Advisor to recall in S03, S02 set one (or not) and it cannot have changed.

Use the new [role] features.
2016-07-16 16:41:05 -05:00
Gregory A Lundberg
3818fe2326 L Illogical conversation
Choosing Baldras for the role cause him to see the riders and ask who they are. Baldras already has an alternate line for this case, use it.
2016-07-16 16:41:05 -05:00
Gregory A Lundberg
5bb6aa5536 L Fix bugs and tidy up a bit
Bugs:
S02: Use role= for roles, not speaker=
S05: Misplaced ai_algorithm
S08: No constant FOREVER, use 99999

Cleanup:
S01, S07: [if] requires [then]
S01, S05, S07, S08: remove macro artifacts
S07, S08: remove variable artifacts
S04, S08: remove dead  code
utils: Remove unused macros
2016-07-16 16:41:05 -05:00
Gregory A Lundberg
13737dc10f AOI Move extra_recruit to character macros 2016-07-16 16:38:10 -05:00
Gregory A Lundberg
a839124839 AOI Linaera should recruit Mages, not Elves 2016-07-16 16:38:10 -05:00
Gregory A Lundberg
7ec73660e2 AOI Fix missing speakers, use new [role] features
For each speaking part, make sure it is assigned to a unit. For parts where the conversation suffers if not delivered, recall a unit or recruit one if none are available. For parts where the missing the line does not appear to adversely effect the conversation, omit the lines if no unit can be found on the board at the time.
2016-07-16 16:37:18 -05:00
gfgtdf
2825a9d84d add __cfg getter to lua attack userdata 2016-07-16 22:44:50 +02:00
gfgtdf
1d168bce9a fixup on_event.lua 2016-07-16 20:34:33 +02:00
Celtic Minstrel
b145513db3 Fix some issues with fog control
- add_fog removed fog and remove_fog added it
- similarly, [lift_fog] and [clear_fog] were swapped
- make sure first argument is a list of sides before trying to interpret it as one
2016-07-16 10:24:13 -04:00
Andreas Löf
14c0c4487d Update changelog 2016-07-16 19:08:48 +12:00
Andreas
b2f86b6b07 Merge pull request #697 from wesnoth/flickerfix
Hacky fix for the flickering when a screen is fully redrawn.
2016-07-16 19:05:08 +12:00
Andreas Löf
aa58d83b45 Use RAII instead of lock->unlock directly. 2016-07-16 11:25:01 +12:00
Celtic Minstrel
6abd7a6941 Add [message]image_pos=left|right
This is meant to replace ~RIGHT() and also the newer ~LEFT(),
with one exception: ~RIGHT() will still be the standard way to
make a unit's portrait go on the right by default.
2016-07-15 17:35:51 -04:00
Celtic Minstrel
39037a7154 Correct changelog 2016-07-15 17:13:57 -04:00
Celtic Minstrel
232709ea57 A few Micro AI tweaks
- For MAIs using aspects, make the facet ID more unique
- Only shallow-preparse the [micro_ai], rather than fully preparsing it
  (This is so that filters in Micro AIs can use $this_unit if needed)
2016-07-15 16:15:44 -04:00
Celtic Minstrel
01d3156d47 Micro AIs: Fix not properly deleting aspects
(This affects the Protect and Wolves MAIs)
2016-07-15 16:07:22 -04:00
Celtic Minstrel
21e79b5f6a Protect Micro AI: Fix missing aspect ID 2016-07-15 15:50:24 -04:00
Celtic Minstrel
c252ee7566 Fix inconsistent AI status strings 2016-07-15 12:42:51 -04:00
Andreas Löf
d55e884280 Hacky fix for the flickering when a screen is fully redrawn.
The fix supresses the call to flip() while a full redrawn
is performed. The flip calls are instead deferred to
then next draw-cycle.
2016-07-15 23:29:45 +12:00
Sergey Popov
0b88decba5 Merge pull request #693 from AncientLich/wmlxgettext
bugfix: wmlxgettext '--recursive'  option and symlinks
2016-07-15 12:23:55 +03:00
Celtic Minstrel
35d17dcaa1 Add clear button to Lua console 2016-07-15 01:37:30 -04:00
Celtic Minstrel
aedcdfe04b Update changelog 2016-07-14 20:09:15 -04:00
Charles Dang
3bef1c6c91 Merge pull request #695 from GregoryLundberg/GL_cmg
Missing end-of-line showing seed on stderr
2016-07-15 08:01:15 +11:00
Gregory A Lundberg
f377ae44bf Missing end-of-line showing seed on stderr 2016-07-14 15:41:34 -05:00
gfgtdf
ceea75cf0a replace some victory with scenario_end events.
victory is an unsynced event to its potentially unsafe to change the
gamestate in it, this mostly effects LoW (which can be played as a mp
campaign) where i replaced most victory events.

But it also effects sp becasue it can casue bugs to create units in
unsynced events which are used later (here: in later scenarios), so i
replaced also all sp victory events that do that.

Note that the 'scenario_end event'+'proceed_to_next_scenario filter' has
a slightly different meaning than 'victory event': the second gets fired
when there is a local human side who won the scneario while the first
gets fired if there is any human side who on the scenario. In sp this
is the same since there are no remote human sides, but in mp this is the
reason why the first is synced and the second is not.

We could add a seperate event for this case ("before next scenario" or
similar) for easier use, but i didn't find a good name for
that yet.
2016-07-14 22:15:33 +02:00
gfgtdf
9648d9c989 Update changelog 2016-07-14 22:08:06 +02:00
Charles Dang
a399a00717 Use emplace_back when adding new event_contexts member
Thanks to celticminstrel for the suggestion.
2016-07-15 06:23:17 +11:00
Celtic Minstrel
4b513f6a59 Update changelog 2016-07-14 09:19:06 -04:00
Andreas Löf
90b6b58aa4 Fix crashes in the focus cycling code.
This ensures that the focus_handler is correctly initialised and
that cycle_focus() iterates over the current handlers correctly.
2016-07-14 23:19:49 +12:00
Andreas Löf
fb02c3442f Merge branch 'event_handling_fixes' of https://github.com/Vultraz/wesnoth into Vultraz-event_handling_fixes 2016-07-14 20:00:15 +12:00
Nobun
ffb1588b57 bugfix: wmlxgettext '--recursive' option now work correctly also on path containing symlinks 2016-07-14 06:59:01 +02:00
Charles Dang
61ccf2fc16 WIP: some refactoring of event handling w/ celticminstrel 2016-07-14 14:48:09 +11:00
Charles Dang
5649379426 Swapped order of two frames in the fireball animation
It makes more sense to go from largest to smallest, instead of large, small, medium.
2016-07-13 17:39:58 +11:00
Celtic Minstrel
7e04c7f8e9 Fix issues with constructing name generators from Lua 2016-07-12 11:08:34 -04:00
Celtic Minstrel
c39af95a44 Move name generator and formula API to base Lua kernel 2016-07-12 11:08:33 -04:00
Celtic Minstrel
3c96dbc145 Fix compile error 2016-07-12 11:08:31 -04:00
Celtic Minstrel
0ec01c595b Update XCode project 2016-07-12 11:08:30 -04:00
Charles Dang
49cf5cbbda Fixed assertion failure when selecting a randomly generated map (bug #24709) 2016-07-12 23:40:42 +11:00
Charles Dang
eebfc466b8 Merge pull request #666 from pubudug/registered_users_only_squashed
Added new checkbox to multiplayer game configure dialog to allow only registered users to join the game
2016-07-12 23:33:24 +11:00
Pubudu
129ce2982b Added new checkbox to multiplayer game configure dialog to allow only
registered users to join the game
2016-07-12 11:50:50 +05:30
Celtic Minstrel
d4b8fec953 New features in [role] WML tag
- search_recall_list=yes|no (default yes)
- [else] tag which is run if no unit matches
- auto_recall=yes|no (default no) which recalls the unit if it's on the recall list
2016-07-11 20:13:57 -04:00
ln-zookeeper
937df219c9 Don't issue a warning when no unit found for [role] 2016-07-11 23:41:33 +03:00
gfgtdf
dd82ed03dc fix comments 2016-07-11 22:33:55 +02:00
Charles Dang
24ca142d8d Merge pull request #686 from GregoryLundberg/vscode
Add .vscode to .gitignore
2016-07-12 05:11:28 +11:00
Gregory A Lundberg
5a27d9513f Add .vscode to .gitignore 2016-07-11 11:50:07 -05:00
gfgtdf
f9d8a9a0ab fix compiler warning 2016-07-11 17:50:16 +02:00