56165 Commits

Author SHA1 Message Date
Aishiko
c6d11a5f5e Implement unit instance recall costs.
Actually allows for the unit instance recall costs to be used. Proper
taking of the gold and undoing the cost for each unit is implemented
and works.  At advancement if the unit's current recall matches their
unit_type's recall_cost then it takes the new unit_type's recall_cost
otherwise it keeps whatever value it currently has until it fails this
check.  Recall costs are also now persistant and will carry over from
one scenario into the next as well.

If a cost is not set, it will continue to use the team/side/default
costs, these changes should not affect the current workings when
dealing with unaltered scenarios, and unit config files.  I repeat This
will not affect or change the currently way things work UNLESS a user
alters a file or includes the new recall_cost (as in copies and
modifies a unit in the scenario unit files) for a unit instance in
their scenario file(s).
2014-03-17 17:49:15 -04:00
soliton-
8e9fcd1704 Merge pull request #118 from aquileia/new-branch
minor fixes
2014-03-17 22:29:14 +01:00
Alexander van Gessel
f2bdee1a80 Remove unused ucs2_string. If we want a utf16 type, it should be named for that 2014-03-17 13:44:02 +01:00
Chris Beck
cb6033ceb3 Merge branch 'server_set_to_idle' 2014-03-17 07:59:13 -04:00
Chris Beck
ad4c57f22e implement "last 5 chats" notification properly
(fixup 6d460b98271312f806fadfa037b7ea082e862a24)

proper code to find 5'th \n is:

		int endl_pos = -1;
		for (int ctr = 0; ctr < 5; ctr++)
			endl_pos = i->message.find('\n', endl_pos+1);

and not

		int endl_pos = 0;
		for (int ctr = 0; ctr < 5; ctr++)
			endl_pos = i->message.find('\n', endl_pos);
2014-03-17 07:50:02 -04:00
Chris Beck
f8a01890d1 add debugging output to server 2014-03-17 07:50:01 -04:00
Chris Beck
2430b491df don't show network_ai controllers in :give_control dialog 2014-03-17 07:50:01 -04:00
Chris Beck
b854aab437 don't display network_ai sides as replacements for dropped sides
after 18829 fix, don't display "network_ai" sides as possible
controllers for a dropped side, as all ai sides now have this value.
2014-03-17 07:50:01 -04:00
Chris Beck
736ceaa6c7 fix bug #18829
it turns out that when the "network_ai" controller type was introduced,
it was implemented on the server in the following way:

a4f47a63c7/src/server/game.cpp (L464)

change_controller requests to the type "ai" are always transformed
by the server into either "human_ai" for host or "network_ai" for client,
and in thunderstruck's refactor of the mp_connect dialogs, ai sides are
always set to "ai" in the WML sent to the server (and set this way on
the host).

however, because of code in play_campaign.cpp which long predated this
refactor, all sides on an mp client are either set to human (if that
player controls them) or "network", or "null".

this causes problems because if that player saves the game, the savegame
will record these sides at human controlled rather than ai controlled...
if the game is reloaded oos can occur, although I won't detail it here.

we update the play_campaign.cpp code to ensure that "ai" controller types
always resolve to human_ai or network_ai as appropriate. additionally,
we make sure that on the host, sides always resolve to human_ai rather
than ai. so the type "ai" should never be observed during an mp game,
and only during scenario configuration, and perhaps during replays.

additionally, we ensure in playturn.cpp that if the client gets a message
from the server to set a side to "ai" during the game, it will in fact
set it to "human_ai" or "network_ai", to preserve the invariant.

finally we also switch over observers to follow this behavior --
previously there was a hack here in the server which would make sure
that any observers which join see all sides as controlled by "human"

a4f47a63c7/src/server/game.cpp (L197)

in order that they do not attempt to substitute themselves for a player.

we change this by removing the hack, and programming the client to remember
if the player is an observer, and if so not attempting to substitute themself
at game start.
2014-03-17 07:50:00 -04:00
Chris Beck
886c2390d8 fixup party full bell
after fix of bug #21578, the behavior from 1.10, in which game may not
start until all sides have chosen factions as needed, was restored.
we move the party full bell appropriately.
2014-03-17 07:50:00 -04:00
Chris Beck
186e66cec6 fix bug #21758
in the refactor of mp_connect, one behavior from 1.10 that was
lost was that the host may not start a game until all sides have
chosen faction. we restore this, adding fields to the side engine
to fix in a robust manner, some debugging capabilities left over.
2014-03-17 07:42:58 -04:00
David Mikos
fcaf8b3fc7 Merge branch 'master' of github.com:wesnoth/wesnoth-old 2014-03-17 07:51:03 +10:30
David Mikos
19c78e87b4 Chill tempest animation for lich/ancient lich. 2014-03-17 07:48:02 +10:30
Chris Beck
420f9e8069 recognize server messages to set a side to idle 2014-03-16 15:38:17 -04:00
Nils Kneuper
78df2160d6 updated Scottish Gaelic translation 2014-03-16 09:04:17 +01:00
Chris Beck
ce06371a99 Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-03-16 03:11:42 -04:00
Chris Beck
db153ed19c blindfold_enabled => skip_replay enabled, in playmp_controller
this was suggested by Wintermute, as it is hard to see why you
wouldn't want the replays to go fast if you can't see anything.
2014-03-16 03:09:48 -04:00
Chris Beck
af383e8ebb workaround for bug #21797
when the side engine in multiplayer_connect_engine.cpp loads a side,
if the game is a save game, the side is not allowed to have a human
player, and it is listed as "network", then we set it to ai,
assuming that it "should" be a "network_ai" if bug #18829 is ever
fixed
2014-03-16 03:06:52 -04:00
David Mikos
f5323b627c Khalifate melee attack sound timings fix. 2014-03-16 15:07:48 +10:30
anonymissimus
e45894c17b vc project update 2014-03-15 20:53:33 +01:00
anonymissimus
a52b3846f2 really fix warning about not initialized variable
The invalid read now was on some later line.
fixes https://gna.org/bugs/index.php?21772
Anyway better to init something incorrectly than to not init it.
2014-03-15 20:53:33 +01:00
Mark de Wever
093f19ff9e Remove the usage of the non-standard u_int. 2014-03-15 20:11:20 +01:00
Mark de Wever
835977c437 Remove an old-style-cast. 2014-03-15 20:08:13 +01:00
fendrin
16f08c46d2 Removed obsolete map header. 2014-03-15 17:27:10 +01:00
fendrin
e0186e9f69 No longer write the map_data header anymore.
Like discussed at the FOSDEM, those embedded WML attributes are not used
anymore.
2014-03-15 17:25:50 +01:00
fendrin
c565f92af2 LoW 07: Made the map bigger, adjusted starting positions and more.
* Got a bigger map
* The third former ally is now cotrolled by the player(s)
* Removed the annoying bird sounds
* Introduced an unallied monster side to the south
* Removed the early appearance of Olurf, he will arrive always at end
* Some fixes to the mp port, may still not work properly
2014-03-15 15:18:46 +01:00
Aishiko
a723d5fa59 Add single unit instance recall_costs
Add the variables, lua, and wml support variables to allow a scenario
designer the ability to define different from the standard recall costs
or team recall costs for both individual units and unit types.
from least to highest order of precendent we'll have default, team/side,
unit_type, and finally individual units.

The tag in the scenarios and in the unit config files is recall_cost=int.
2014-03-15 10:03:56 -04:00
fendrin
1e5d58af6a Made the orb and minimap colors configurable by the preferences. 2014-03-15 14:37:16 +01:00
fendrin
dc9a2c89e4 Adds the option to use a suffix to the image paths.
Implemented for using image path functions.
A second change fixes size problems with image type buttons.
2014-03-15 14:37:16 +01:00
Ignacio R. Morelle
0763670a3f sound: Increase the mixer channel allocation from 16 to 32
This raises the sound effect (SOUND_FX) channel group size from 5 to
21.

The rationale for this change is that the current SFX channel group size
is not enough in some situations (particularly during cutscenes and with
accelerated animations enabled), and decreasing the channel group size
for sound sources (currently 8, preserved as-is in this commit) doesn't
seem like the best solution at this point considering that the sound
source feature is neglected enough as it is. Three other channels are
reserved for the turn bell, turn timer countdown sound, and UI sounds,
and it'd be an even worse idea to drop those.

The SDL_mixer documentation suggests that increased mixer channel
allocations may be a memory usage concern with a high number of channels
("We're talking REALLY high!", their words), but hopefully this small
increase is good enough for our and the UMC making community's purposes
without impacting memory usage or performance on our main supported
platforms. At least Wesnoth's RSS didn't seem to change over a megabyte
when testing this patch on Linux (using ALSA).

Note:

Should this increased limit cause issues on some platform that matters
(hopefully not!) an alternative would be to reengineer the sound channel
selection done in sound::play_sound_internal() so instead of skipping
sounds when all channels are busy, the oldest playing channel is stopped
and reset to the requested sound, for channels in the SOUND_FX group.
However, this seems too complicated to do at this point for 1.12, so yet
another alternative would be to simply reduce the number of channels
reserved for sound sources and give those back to SOUND_FX.
2014-03-15 01:34:20 -03:00
Ignacio R. Morelle
faaad1991b sound: Include SDL_Mixer channel layout in debug output 2014-03-15 01:33:38 -03:00
aquileia
bb6bfdcb7d delete deprecated NDEBUG flag from VC project 2014-03-14 23:24:41 +01:00
aquileia
f3bfa19b4a add GUI tag list for Vim syntax highlighting 2014-03-14 23:19:35 +01:00
aquileia
3dea887095 fix indentation of macros in lobby_main.cfg 2014-03-14 23:18:53 +01:00
aquileia
3a3984e1dd add missing <algorithm> header to util.hpp 2014-03-14 23:18:15 +01:00
Boldizsár Lipka
37c71008fe Wrap old SDL code in a preproc directive. 2014-03-14 23:15:49 +01:00
Boldizsár Lipka
8c3c1dfb5c Support for SDL2's mouse wheel event in GUI2. 2014-03-14 23:14:19 +01:00
Boldizsár Lipka
d26ac31b28 Make a constant variable a reference. 2014-03-14 23:00:21 +01:00
Boldizsár Lipka
3318137077 Wrap old SDL code in a preproc directive. 2014-03-14 22:59:52 +01:00
Boldizsár Lipka
8556d7a24e Support for SDL2's mousw wheel event in the palette manager. 2014-03-14 22:57:27 +01:00
Boldizsár Lipka
ea3bd56555 Switch vertical scrolling directions. 2014-03-14 22:56:55 +01:00
Boldizsár Lipka
133218ff7b Wrap old SDL code in a preproc directive. 2014-03-14 22:50:31 +01:00
Boldizsár Lipka
5e96c47d2e Support for SDL2's mouse wheel event in the GUI1 scrollbar. 2014-03-14 22:48:44 +01:00
Boldizsár Lipka
85e8c45273 Support for SDL2's mouse wheel event in the GUI1 scrollarea. 2014-03-14 22:34:48 +01:00
Boldizsár Lipka
60945558a9 Wrap old SDL code in a preproc directive. 2014-03-14 22:23:41 +01:00
Boldizsár Lipka
ec2af1d30d Support for SDL2's mouse wheel event in the GUI1 slider. 2014-03-14 22:19:44 +01:00
Boldizsár Lipka
2d54ec7aca Wrap old SDL code in a preproc directive. 2014-03-14 22:00:22 +01:00
Boldizsár Lipka
821b009948 Support SDL2's mouse wheel event in mouse_handler_base.
Allows to scroll the map with the wheel.
2014-03-14 22:00:22 +01:00
Nils Kneuper
175ae9c899 updated German translation 2014-03-13 13:45:50 +01:00
Nils Kneuper
da7a03a833 updated Slovak translation 2014-03-13 13:44:14 +01:00