1
0
forked from 0ad/0ad
Commit Graph

366 Commits

Author SHA1 Message Date
a7c09a500d That what leper said. Refs 9ff7ec3465, 31d1536e52.
This was SVN commit r19688.
2017-05-29 02:56:34 +00:00
31d1536e52 Optionally allow late observers for buddies only.
Differential Revision: https://code.wildfiregames.com/D549
Fixes #4528
Reviewed By: fpre
This was SVN commit r19685.
2017-05-28 18:05:08 +00:00
08b23d0164 Sooner network timeout warnings.
Reviewed By: echotangoecho
This was SVN commit r19574.
2017-05-13 22:52:11 +00:00
00c4adfae8 Add missing Hexify call to the OOS dialog in D105 that became required with the hash comparison in JS. Reported by causative.
Differential Revision: https://code.wildfiregames.com/D476
Reviewed By: leper
This was SVN commit r19562.
2017-05-12 08:50:20 +00:00
09e974e1cb Bump year number of files changed this year in the license headers.
This was SVN commit r19503.
2017-05-01 14:28:22 +00:00
37da3b008a Translate the Out-Of-Sync error message and send it to the JS GUI for convenience and future extension.
Add a hint that multiplayer games with AI are currently not supported.

Differential Revision: https://code.wildfiregames.com/D105
Reviewed By: leper
Refs #3858

This was SVN commit r19491.
2017-05-01 04:55:56 +00:00
65cbf12b7e Don't throw NetServer FSM errors if a client presses not-ready just before the host launches the game.
Differential Revision: https://code.wildfiregames.com/D290
Reviewed By: Imarok
Refs #3199

This was SVN commit r19404.
2017-04-10 16:52:52 +00:00
af4466bc99 Update ready state immediately when receiving the message.
Differential Revision: https://code.wildfiregames.com/D304
Reviewed By: Vladislav
Refs #2447

This was SVN commit r19396.
2017-04-09 22:59:04 +00:00
fdda57565b Display which clients are still in the loading screen
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D120
Fixes #4375

This was SVN commit r19320.
2017-03-21 18:50:29 +00:00
e0f7578fbe Ensure unique client GUIDs. Patch by sbirmi, fixes #3949.
Two clients chosing the same GUID is highly unlikely, yet possible.
A malicious client chosing an existing GUID would have resulted in
unassigning the player with that GUID.

This was SVN commit r19225.
2017-02-14 16:54:34 +00:00
5f8f7bae20 Stay ready button
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D49
Fixes #4369.

This was SVN commit r19216.
2017-02-10 16:09:10 +00:00
fd5bd8e301 Fix 9964bee5bb.
Differential Revision: https://code.wildfiregames.com/D100
Reviewed By: Imarok
This was SVN commit r19182.
2017-01-28 20:47:26 +00:00
9964bee5bb Change the NetServer Broadcast function to send the given message to clients that are in one of the states specified by the caller.
Thus remove the peculiarity to broadcast to clients that are in the
gamesetup, loading screen or ingame, but not rejoining ones.

Fix "unknown player" errors in the GUI by broadcasting player
assignments to rejoining players too. Fixes #4036.

Differential Revision: D17
Reviewed By: Imarok
This was SVN commit r19171.
2017-01-25 19:04:17 +00:00
4f01db4831 Split TurnManager classes into individual files per class. Patch by echotangoecho, fixes #4095.
Remove the "Net" prefix from the non-networked classes.
Use variadic macros and mark the client turnmanager as NONCOPYABLE.

Differential Revision: D16
Reviewed By: leper
This was SVN commit r19165.
2017-01-24 02:04:50 +00:00
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
44f0929ea6 Don't throw FSM update errors (type=16 state=6) when kicking clients while others haven't finished the authentication, loading screen or synchronization yet, refs #3241.
This was SVN commit r18859.
2016-10-23 15:44:02 +00:00
20399b72f1 Fix a bug where the networked game would never start if a client would disconnect while synchronizing, fixes #4289.
This was SVN commit r18858.
2016-10-23 15:13:16 +00:00
caef42084d Add missing JSAutoRequest calls. (hopefully all of them have been spotted now)
Patch by echotangoecho, refs #4053

This was SVN commit r18730.
2016-09-18 09:34:45 +00:00
24a488bacc Increase the maximum observer limit to 32 for the upcoming release, refs #4210.
This was SVN commit r18719.
2016-09-11 22:46:00 +00:00
0cc23c1964 SpiderMonkey 38 upgrade: 33/35
Remove a workaround. Note that this removal is incomplete. Based on
patch by leper.

This was SVN commit r18687.
2016-09-02 16:53:22 +00:00
b01300c222 SpiderMonkey 38 upgrade: 11/35
Renamed JS_CallHeapFooTracer to JS_CallFooTracer. Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1052388

This was SVN commit r18665.
2016-09-02 16:25:42 +00:00
761abd587e SpiderMonkey 38 upgrade: 10/35
Use operator= instead of .set(). Patch by leper.
Addresses https://bugzilla.mozilla.org/show_bug.cgi?id=1128110

This was SVN commit r18664.
2016-09-02 16:24:46 +00:00
bb1f86f515 Remove duplication of the Hexify function.
Remove the useless extern keyword from function declarations in
ps/Util.h.

Patch by echotangoecho, refs #4095

This was SVN commit r18591.
2016-08-08 12:50:39 +00:00
46cabf0fde Add missing JSAutoRequest calls. Based on patch by echotangoecho, refs #4053.
This was SVN commit r18451.
2016-06-29 00:00:44 +00:00
7c21a0cf8e Header cleanup: profile.h is no longer unnecessarily included in scriptinterface.h but rather in the required .cpp files
This was SVN commit r18417.
2016-06-21 10:33:11 +00:00
a874b3c1c3 Colorize playernames in the kick/ban chat notification, refs #3241.
This was SVN commit r18391.
2016-06-16 17:13:02 +00:00
62061557db Host on arbitrary UDP ports. Patch in cooperation with Imarok, fixes #3575.
This was SVN commit r18372.
2016-06-13 16:56:14 +00:00
248a48d88a Major network cleanup. Patch by Imarok.
Access the server from the client only, not from the GUI (except for
autostarted games).
Thereby lay the foundation for clients to setup the game (refs #3806)
and dedicated hosting (refs #3556).
Doesn't transfer nor remove the SetTurnLength showcase from 0ebe3486b6.

This was SVN commit r18322.
2016-06-04 12:08:30 +00:00
903803ceec Gamesetup ready- and PlayerAssignments-cleanup.
Split logic to onClientJoin onClientLeave.
Remove duplicate, yet slightly different ready button caption.
Rename hosts to newAssignments in the GUI message sent by the NetClient.

This was SVN commit r18299.
2016-06-03 02:28:29 +00:00
ac4533f7df Network cleanup, refs #3752.
Replace a TODO comment asking why something is set with a comment
answering that.

This was SVN commit r18268.
2016-05-30 17:59:02 +00:00
b2f3402c50 Network cleanup.
Remove unused netmessage type NMT_LAST.
Use CStr instead of the alias CStr8.
Remove unneeded comments.

This was SVN commit r18226.
2016-05-24 12:21:21 +00:00
7cd43ba8cf Fix whitespace and remove duplicate comment, refs #1950.
This was SVN commit r18208.
2016-05-20 12:51:27 +00:00
ec1696ded3 Send a network message to update the GUI if another player pauses a multiplayer game. Patch by echotangoecho, fixes #1950.
Pause animations then and on disconnect.
Don't unpause unintentionally when closing a message box in
singleplayer.

This was SVN commit r18204.
2016-05-19 22:10:38 +00:00
856dc1c999 Network cleanup.
Send the "client has rejoined" message after the synchronization
finished instead of right after the loading screen.
Patch by echotangoecho, refs #1949, #1950.

This was SVN commit r18203.
2016-05-19 21:03:46 +00:00
883d1aaf48 Fix Windows build. Those includes in 1a3fb29ff3 didn't resolve properly on Windows, refs #3953.
This was SVN commit r18143.
2016-05-08 16:25:00 +00:00
1a3fb29ff3 Network cleanup, fixes #3953.
Don't compare for "127.0.0.1" to identify the host, but check for a new
boolean flag that is set by the client, refs #2854.
Remove an unneeded IP address conversion from u32 to string, refs #3241.

This was SVN commit r18140.
2016-05-08 11:46:19 +00:00
462540585b Network cleanup.
Only send the network-warnings to clients that successfully joined the
gamesetup or game.
Thus save a bit performance and
prevents a rare, harmless FSM update error (like in refs #3199) in case
a client received the message while authenticating.
Reported by fatherbushido, refs #3264.

This was SVN commit r18117.
2016-05-01 10:33:51 +00:00
d70062c348 Cleanup of the network code (range-based for, remove spaces between angle brackets, and other little things).
Based on a patch by elexis, fixes #3907

This was SVN commit r18091.
2016-04-24 20:48:53 +00:00
d3255168b9 enet backward-compatibility fix, refs #2854. Patch by texane, fixes #3863.
This was SVN commit r17960.
2016-03-27 23:27:37 +00:00
d61e315f4d Fix few style issues remarked by leper.
Add a unit (seconds) to the network-timeout warning.
Rename isChatAddressee to parseChatAddressee as it changes the message.
Early return for EnableOOSLog to avoid printing duplicate messages.

This was SVN commit r17895.
2016-03-15 04:37:41 +00:00
042c9a9334 Allow hosting matches with 8 players and up to 16 observers, fixes #3254.
The host can change the number of allowed observers in running games.

Make sure that joining observers won't take the "slot" of disconnected
players, fixes #3671.

Send clients a new disconnect reason "Server full" instead of letting
them timeout.

This was SVN commit r17881.
2016-03-13 16:52:00 +00:00
e0a9dfd5a2 Allow changing the late-observer flag in a running game, fixes #3669.
Remove it from the game-attributes, since it is not used in the
simulation, nor are they supposed to change in running games.

This was SVN commit r17861.
2016-03-10 11:35:43 +00:00
2305218d9f Optionnames are in lower case, refs #3604.
This was SVN commit r17860.
2016-03-10 11:16:15 +00:00
f2ed0098ee Make the playername-deduplication ("User" -> "User (2)") optional.
Have it disabled by default to fix #3604.
Prevents players from rejoining as late-observers in case they timed-out
on the client-side but not on the server-side.

This was SVN commit r17851.
2016-03-09 15:02:38 +00:00
2e7e1c0b2b Prevent the local client of the host from becoming disconnected in case of lag, fixes #2854.
This was SVN commit r17772.
2016-02-18 13:10:59 +00:00
f8b20d181d Add chat-addressee dropdown, refs #1767.
Add observer-only chat and allow private messages from observer to
observer.
Prevent defeated players from using the team-chat, fixes #3441.

This was SVN commit r17771.
2016-02-18 01:09:56 +00:00
cd9106b664 Fix / finish previous commit.
This was SVN commit r17747.
2016-02-09 14:34:59 +00:00
ca9d06d6ad Correct handling of replays with no turns or only turn 0.
Add a comment for 3ec3f0b160.
Some style fixes.

This was SVN commit r17746.
2016-02-09 12:09:17 +00:00
43f358563c when saving an option to file, write only that value and not all the content of the user configDB, refs #3737
This was SVN commit r17738.
2016-02-07 11:31:23 +00:00
22f5b00fce Implement network-warnings, fixes #3264.
Shows a notification if the local client or other players connections
timeout or have bad latency.

This was SVN commit r17730.
2016-02-04 17:14:46 +00:00
ab16ddb256 Show a more specific disconnect-message in case the host closed the server. Refs #3264, #3570.
This was SVN commit r17710.
2016-01-25 12:56:30 +00:00
3ec3f0b160 Stop the animations at the end of visual replays, refs #3581.
This was SVN commit r17709.
2016-01-25 10:23:03 +00:00
f34dc412b6 Deep freeze simulation commands to prevent accidental updates. Fixes #3647.
This was SVN commit r17673.
2016-01-18 22:24:50 +00:00
893ca29723 Allow 10 clients to conncet to the server by default (allows 8 players and 2 observers). Refs #3254.
This was SVN commit r17620.
2016-01-10 01:06:07 +00:00
b790403c87 Strip trailing whitespace from network code.
This was SVN commit r17524.
2015-12-21 13:58:32 +00:00
39f572af88 Stop processing turns after a replay finishes. Patch by elexis. Fixes #3581
The animations continue because we currently have no easy way to stop
interpolating. My suggestion would be to implement a network
synchronised pause and use something like that.

This was SVN commit r17265.
2015-11-15 15:08:46 +00:00
32da740f14 Allow kicking/banning players from gamesetup and session. Patch by elexis. Fixes #3241.
This was SVN commit r17217.
2015-11-11 02:05:23 +00:00
6493974800 Fix #2676 by only acknowledging commands matching the sender's name if cheats are disabled. Based on patch by historic_bruno.
This was SVN commit r17170.
2015-11-02 03:20:44 +00:00
a6111ff8b7 Fix #3309 by capping m_DeltaSimTime in NetTurnManager.cpp. Patch by elexis. Review by Philip.
This was SVN commit r17159.
2015-10-31 21:04:47 +00:00
b97e565017 Fixes path formatting in Windows OOS error message, patch by elexis, fixes #3498
This was SVN commit r17134.
2015-10-15 03:50:45 +00:00
102358a5cb Fix build for recent versions of miniupnpc.
This was SVN commit r17091.
2015-09-30 21:32:54 +00:00
8a8a3b8377 Revert a wrong piece of code from 63e42fbd31. Refs #3293
This was SVN commit r16965.
2015-08-30 20:32:22 +00:00
63e42fbd31 Display which player(s) are OOS when it happens. Also fix some encoding issues with file paths.
Patch by elexis, fixes #3293.

This was SVN commit r16963.
2015-08-30 17:47:18 +00:00
57f340f906 Fix player rejoins. Refs #3242.
This was SVN commit r16955.
2015-08-30 02:03:50 +00:00
e56dddbefb Optionally allow observers to rejoin a game when they weren't here during the game setup.
Patch by elexis, fixes #3242.

This was SVN commit r16945.
2015-08-28 20:20:10 +00:00
36c6b50944 Revert emplace for associative containers. Fixes #3366.
GCC < 4.8.0 does not support emplace for those.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436.

This was SVN commit r16922.
2015-08-19 03:32:47 +00:00
1a8096a920 Reliably send the ReplayFinished message at the very end of visual replays. Patch by elexis.
This was SVN commit r16902.
2015-07-30 21:55:34 +00:00
8bfe16cac8 Use in-place construction.
This was SVN commit r16894.
2015-07-29 23:44:17 +00:00
c6ca83949c Prevent players from rejoining that were not present on game start. Patch by elexis. Fixes #3305.
This was SVN commit r16792.
2015-06-18 18:20:54 +00:00
e7707f0f0c Fix issue with OOS in replays. Patch by elexis
This was SVN commit r16790.
2015-06-18 15:29:03 +00:00
2457b69fb3 Fix const attribute for some function parameters.
This was SVN commit r16730.
2015-06-07 09:24:19 +00:00
be93b31411 Visual replay of command files, patch by elexis.
Works with the command line argument
"-replay-visual=/path/to/commands.txt". It is not integrated to the main
menu GUI yet.

Refs #9.

This was SVN commit r16727.
2015-06-06 08:45:49 +00:00
7a70c475df Improve rejoin messages. Patch by elexis. Fixes #1949.
This was SVN commit r16614.
2015-05-03 02:06:17 +00:00
bb9de80dd4 Convert CConsole to take UTF-8 strings.
This avoids vswprintf failures when printing non-ASCII char* strings
from CLogger into the console.

Also convert ScriptInterface::ToString to return UTF-8, to avoid some
utf8_from_wstring calls.

Also remove some unused and redundant CConsole functions.

This was SVN commit r16333.
2015-02-14 01:49:34 +00:00
e06a7b37d8 Convert debug_printf to take UTF-8 strings instead of wchar_t.
This fixes the problem where passing a non-ASCII string to
debug_printf(L"%hs", s) caused vswprintf_s to fail on Linux (because it
doesn't know what encoding the char* is meant to have). Now debug
messages will remain as UTF-8 until they reach the OS.

Fixes #3021.

This was SVN commit r16332.
2015-02-14 01:45:13 +00:00
c02a7e1a7b SpiderMonkey 31 upgrade
This upgrade also introduces exact stack rooting (see to the wiki:
JSRootingGuide) and fixes problems with moving GC. This allows us to
enable generational garbage collection (GGC).
Measurements a few months ago have shown a performance improvement of a
non-visual replay of around 13.5%. This probably varies quite a bit, but
it should be somewhere between 5-20%. Memory usage has also been
improved. Check the forum thread for details.

Thanks to everyone from the team who helped with this directly or
indirectly (review, finding and fixing issues, the required C++11
upgrade, the new autobuilder etc.)! Also thanks to the SpiderMonkey
developers who helped on the #jsapi channel or elsewhere!

Fixes #2462, #2415, #2428, #2684, #1374
Refs #2973, #2669

This was SVN commit r16214.
2015-01-24 14:46:52 +00:00
568c415d0a Convert wchar_t*/wstring arguments to UTF-8 strings in CLogger messages.
This was SVN commit r16188.
2015-01-22 20:37:38 +00:00
e02d7ad949 Automatically replace %hs/%ls with %s in CLogger format strings.
Everything is char* now, so we don't need to mess around with different
string types.

Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'

This was SVN commit r16187.
2015-01-22 20:36:24 +00:00
49e2ecea63 Automatically convert all CLogger format strings from wchar_t* to char*.
Done with:

  ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'

This was SVN commit r16183.
2015-01-22 20:31:30 +00:00
b36c78b4c4 Fix build warning
This was SVN commit r16115.
2015-01-05 20:05:53 +00:00
9407dbe45e Remove useless parameter from CFG_GET_VALUE.
This was SVN commit r15984.
2014-11-17 23:29:49 +00:00
c813a11427 Split ScriptRuntime and ScriptInterface code to separate files.
The runtime is becoming more and more important in the JSAPI. As a
result, we also have more functionality on the runtime level and having
the whole ScriptRuntime class hidden in ScriptInterface.cpp doesn't make
sense anymore. ScriptInterface.cpp also has become quite a large file
and pulling out the runtime part makes it a bit smaller.

Refs #2462

This was SVN commit r15961.
2014-11-13 11:19:28 +00:00
8b9847e007 Replace CScriptValRooted with JS::Heap<T> and custom tracer for CNetClient
Refs #2462

This was SVN commit r15946.
2014-11-09 15:16:00 +00:00
3b49576fa6 Tunes GC scheduling a bit to reduce memory usage.
The main problem was that GC was only called from the simulation before
this patch. This means when you were waiting in the multiplayer lobby or
just had the GUI open, it only called GC when getting close to the JS
runtime size limit (I assume). Another problem was the Net Server
runtime which didn't GC either. Here the runtime size limit is 16 MB
though, so it's not too terrible. These issues have both been addressed
and GC has been given a bit more time per incremental slice to make sure
it gets done in time. It's still far from perfect, but there are too
many changes in SpiderMonkey related to GC, so I don't want to spend too
much time on this yet.

Refs #2808

This was SVN commit r15787.
2014-09-22 20:13:04 +00:00
2b7e9728b6 Fix failure in TestNetComms::test_basic_DISABLED. Patch by Echelon9. Fixes #2426.
This was SVN commit r15672.
2014-08-24 12:02:52 +00:00
e578d215ea Fix free() of not allocated struct in the UPnP code. Patch by Echelon9. Fixes #2338, #2418.
This was SVN commit r15619.
2014-08-06 14:11:04 +00:00
169174824f Exact stack rooting for ScriptInterface::ToString.
I had to change a few other functions to take JS::MutableHandleValue
because JS::Stringify takes a JS::MutableHandleValue as input parameter.
That seems a bit strange because it should not change that value.
I assume it has historical reasons.

Refs #2415
Refs #2462

This was SVN commit r15605.
2014-08-03 17:29:49 +00:00
a2bd44b23a Exact stack rooting for JSON related ScriptInterface functions.
Refs #2415
Refs #2462

This was SVN commit r15603.
2014-08-02 22:21:50 +00:00
5c07a25ddc More exact stack rooting (CallFunction object).
Changes CallFunction and CallFunctionVoid to use a HandleValue as object
parameter. Also changes some JS serialization/deserialization functions
to only support the JSAPI rooted types (drop support for CScriptVal and
CScriptValRooted there). Some other functions got changed too because
they were closely related.

Refs #2415
Refs #2462

This was SVN commit r15592.
2014-07-31 19:18:40 +00:00
28bdd8540f Quite a lot of stack rooting related changes.
Changes GetProperty, SetProperty and HasProperty and a few other
functions to take handles. The conversions to CScriptVal or
CScriptValRooted at some places should be removed in the future. I've
done that to avoid an even larger patch.

Refs #2415
Refs #2462

This was SVN commit r15568.
2014-07-26 22:33:16 +00:00
1659a28aa0 Correctly remove players who cancel while rejoining. Fixes #2240
This was SVN commit r15402.
2014-06-20 03:22:40 +00:00
2081c62ab4 Support newer version of miniupnpc api. Refs #2552.
This was SVN commit r15174.
2014-05-19 21:01:06 +00:00
dfc7567561 Fix multiple observers on multiplayer games to work more reliably. Fixes #2529
This was SVN commit r15171.
2014-05-19 16:02:42 +00:00
d1d7afe46c Implements ready status into gamesetup. Fixes #2447.
This was SVN commit r15006.
2014-04-26 18:34:34 +00:00
7acdde5c86 Changes tests to use global g_ScriptRuntime instead of creating a new JSRuntime for each test.
The tests crashed on my Debian systems but not on my Ubuntu system.
The crash happened in line 142 of SpiderMonkey's ThreadLocal.h.

I know that I had to use a workarounnd for contexts to avoid destroying
the context that was created first. I also had in mind that in newer
versions a JS_Init function got introduced which presumably solves this
kind of issues.
Based on this experience I assumed runtimes could have a similar problem
and this patch indeed fixes the issues.
Unfortunately the correct usage of JSRuntimes in that regard is not
documented.
There's only a rater misterious comment in JSAPI.h which hasn't been
cleared up so far and is most likely completely outdated
(https://bugzilla.mozilla.org/show_bug.cgi?id=992641).

This was SVN commit r14995.
2014-04-25 21:19:51 +00:00
a7b2f6ba47 Fix more then one observer by allowing a game to have multiple players with the -1 ID.
This was SVN commit r14885.
2014-03-29 15:09:42 +00:00
e9e05f4efc Second (main) commit for the SpiderMonkey upgrade.
This commit contains all the required changes to our source files and
build scripts (hopefully).
A next commit will remove the old stuff of SpiderMonkey 1.8.5.

Spcial thanks to:
 - H4writer who helped a lot mainly with the performance issues we
had/have, but also with other problems or questions.
 - Leper for the review.
 - Historic_bruno for implementing the build scripts on Mac OS X and
testing on the Mac.
 - The people from the #jsapi channel and from
mozilla.dev.tech.js-engine who answered a lot of questions and helped
solving problems.
 - All the other people who helped

Refs #1886
Fixes #2442
Fixes #2416

This was SVN commit r14877.
2014-03-28 20:26:32 +00:00
883f307b40 Implement a basic observer mode. Any player which joins a multiplayer game but is not assigned a player slot automatically becomes an observer. Refs #69
This was SVN commit r14849.
2014-03-16 23:29:27 +00:00
ef888367aa Cleanup tex_codec, fixes #2456, patch by IronNerd.
This was SVN commit r14836.
2014-03-13 04:16:20 +00:00
43377fdc5e Fixes an assertion when DEBUG_SERIALIZER_ANNOTATE is set to 1 and you click on "Host Game" from the main menu.
The reason was that CSimulationMessage uses the CBufferBinarySerializer
which did not add debugging annotations and deserialized the created
data with the CStdDeserializer which expects these annotations.
I did not fix the tests which remain broken as before this patch when
annotation is enabled.

This was SVN commit r14775.
2014-02-22 14:30:29 +00:00
fa85527baf Send messages in queue before closing connection, patch by boeseRaupe. Fixes #2420
This was SVN commit r14732.
2014-02-05 02:44:25 +00:00
9ccaa42a54 Fixes MSVC warning C4706: assignment within conditional expression
This was SVN commit r14519.
2014-01-06 02:16:09 +00:00
4b1297b328 Removes g_ScriptingHost and implements global to compartment 1 to 1 relation.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.

Closes #2241
Refs #1886
Refs #1966

This was SVN commit r14496.
2014-01-04 10:14:53 +00:00
5e23445339 Make ConfigDB properly thread-safe.
Replace CreateValue with SetValueString so we don't pass pointers to
internal
 ConfigDB structures around. Refs #1810.
Remove some splash screen related functions since we can achieve the
same
 with the ConfigDB functions exposed to scripts.

This was SVN commit r14437.
2013-12-29 23:56:18 +00:00
42bc5165ab Add compile time flag to disable use of miniupnpc.
This was SVN commit r14384.
2013-12-18 16:08:56 +00:00
e83f24e3a6 Move UPnP port forwarding to a thread.
Fix some typos.
Do not return the result, as we would need to allocate it, but we never
use it.

This was SVN commit r14372.
2013-12-17 17:03:49 +00:00
4df4c0dec0 Try to actually do the threading my previous commit said it did.
This was SVN commit r14371.
2013-12-17 14:57:26 +00:00
0ba25e9968 Cache UPnP root URL to try to avoid searching each time. Also make searching asyncronous with the GUI to avoid hanging.
This was SVN commit r14370.
2013-12-17 14:21:49 +00:00
62a10ab938 Fixes Windows build.
Fixes UPnP error handling to be more correct and conventional, refs
#2305

This was SVN commit r14352.
2013-12-15 01:02:26 +00:00
5876ec38d1 Make sure we properly free some UPnP-related variables.
This was SVN commit r14348.
2013-12-14 03:21:21 +00:00
551eb3919d Change UPnP lease duration to 0 (permanent) and update comments.
This was SVN commit r14347.
2013-12-14 03:03:22 +00:00
667537ee49 UPnP-based automatic port-forwarding using miniupnpc. Breaks windows build at the moment. Refs #2305
This was SVN commit r14332.
2013-12-13 02:23:02 +00:00
bffe917914 Multiplayer lobby based on the XmPP protocol. Special thanks to Philip, alpha123, scythetwirler, and anyone else who has helped build, debug or test the lobby.
This was SVN commit r14098.
2013-11-07 20:07:24 +00:00
a00e57df72 Fixes hypothetical mem leak in network code (and an error in Cppcheck), patch by Riemer, fixes #2122
This was SVN commit r13980.
2013-10-10 23:46:42 +00:00
0af34b1fcb Removes some unread variables reported by LLVM. Refs #1114
This was SVN commit r12501.
2012-08-20 23:59:50 +00:00
vts
6b50a660b9 Added elapsed real time (as opposed to elapsed simulation time) to MT_Interpolate messages. Fixes leftover TODO from #824. Refs #824.
This was SVN commit r11944.
2012-06-06 19:37:03 +00:00
c036a7d7e3 Adds control groups to saved game data, based on patch by mk12. Fixes #1261.
This was SVN commit r11783.
2012-05-07 04:18:54 +00:00
893cb2668e Renames our sdl.h to libsdl.h, to avoid case sensitivity errors when it includes SDL.h.
This was SVN commit r10904.
2012-01-12 23:32:27 +00:00
4f559e8aff Report quicksave/quickload times, to help identify performance problems.
This was SVN commit r10901.
2012-01-12 12:47:24 +00:00
0ec4242962 Detect and fix printf signedness errors. Fixes #1086, #1087.
This was SVN commit r10846.
2012-01-01 16:43:10 +00:00
c4bb67a1ca Fix #1064 (use ++it instead of it++ for consistency), based on patch by Echelon9
This was SVN commit r10822.
2011-12-29 01:17:03 +00:00
4f6f0b7baf Fix tests, and warnings, and non-PCH build
This was SVN commit r10801.
2011-12-23 13:01:29 +00:00
fbff0aa98d Fix printf argument types
This was SVN commit r10529.
2011-11-13 18:31:06 +00:00
09a02c96d5 Add initial code annotations for the new profiling tool
This was SVN commit r10466.
2011-11-04 01:35:50 +00:00
4ef66a6950 Provide JSON-compatible string escaping
This was SVN commit r10464.
2011-11-04 01:18:34 +00:00
7064565ff6 # Allow saving and loading single-player games.
Support writing zip files based on in-memory data.
Fix menu sliding animations to be framerate independent.

This was SVN commit r10454.
2011-10-30 00:07:28 +00:00
b454ccca79 Fix GUI issues when reconnecting to multiplayer games
This was SVN commit r10452.
2011-10-29 14:53:13 +00:00
bfe2126a17 # Support rejoining multiplayer games after disconnection.
This was SVN commit r10437.
2011-10-27 16:46:48 +00:00
dfc92de51b Avoid outputting non-printable-ASCII characters in the network log
This was SVN commit r10433.
2011-10-27 14:16:28 +00:00
a2bba82b9d Let CFsm actions override the default state transition
This was SVN commit r10432.
2011-10-27 14:10:55 +00:00
a3c03815c0 Experimental quicksave/quickload feature
This was SVN commit r10427.
2011-10-24 14:55:45 +00:00
c2677b4bb0 Upgrade game and build system to ENet 1.3
This was SVN commit r9574.
2011-05-29 20:57:28 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
588bfa11bf remove unnecessary utf8 includes
This was SVN commit r9110.
2011-03-23 16:32:44 +00:00
64a02932e3 refactor headers: path_util -> path, native_path -> os_path, remove where unnecessary
This was SVN commit r9108.
2011-03-23 14:43:35 +00:00
dcd192cb60 refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of
strings/paths; allows safe+easy join via operator/ and convenient
case-insensitive comparison via operator==, avoids NativePathFromString,
similar to boost::filesystem)
- NativePath -> OsPath
- add hash and To/FromJSVal for Path
- add TS_ASSERT_PATH_EQUALS
- replace _wfopen_s with sys_OpenFile
- remove obsolete SortFiles/Directories

This was SVN commit r9107.
2011-03-23 13:36:20 +00:00
c3405e6f50 path improvements/fixes:
- replace more std::wstring with Native or VfsPath; wstring_from_utf8 ->
NativePathFromString
- replace sequences of Join(Path(), Basename+extension) with
ChangeExtension in wsdl, CacheLoader
- add Path::IsDirectory to replace .empty() / path_is_dir_sep(.back()).
also changed behavior to reflect the fact that "" is the VFS root
_directory_
- Path::Join now allows 2 identical path types (e.g. VfsPath) or one
char* literal (prevents inadvertently introducing non-safe characters).
to convert from wstring or wchar_t, use an explicit ctor (e.g.
VfsPath(wchar_t_string))

This was SVN commit r9091.
2011-03-21 19:54:08 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
6f9da85d9f Improve performance of full state hash computation, by skipping script components that are known to have no data.
Switch to much quicker (and less comprehensive) per-turn hashing in
multiplayer games.

This was SVN commit r9036.
2011-03-05 22:30:32 +00:00
e16681f0e5 Fix destruction queue warnings when using some GUI features with time-warp enabled
This was SVN commit r8976.
2011-02-24 02:05:06 +00:00
d75d9c3b75 Make the script profiler more useful, by giving the filename/line for anonymous functions.
Fix the turn-based profiler a bit.

This was SVN commit r8964.
2011-02-21 02:16:12 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
3d997365d8 Fix CStr numeric constructors on 32-bit platforms.
Remove unnecessary assignment operators.

This was SVN commit r8926.
2011-02-16 21:14:08 +00:00
f39f279132 Add AI script code to provide a cleaner API around the engine interface.
Handle AIProxy entirely through scripts.
Support structured clones of script values.
Improve performance.
Support multiple script contexts sharing a runtime.
Use a separate context per AI player.

This was SVN commit r8866.
2011-01-15 23:35:20 +00:00
19548a7379 Fix use of uninitialised variable.
This was SVN commit r8861.
2011-01-12 12:11:31 +00:00
2fd6e2e8cc Fix some more warnings
This was SVN commit r8835.
2010-12-11 12:35:50 +00:00
2540e17f45 Fix non-PCH builds
This was SVN commit r8816.
2010-12-08 18:54:05 +00:00
8ddef2fee0 Add fast-forward/rewind commands, to help with testing.
This was SVN commit r8803.
2010-12-06 19:58:06 +00:00
81f5e0ac5f Allow continuing playing when a client leaves a multiplayer game (fixes #620).
Fix multiplayer autostart.
Make NETTURN_LOG syntax differently ugly.

This was SVN commit r8525.
2010-11-03 00:21:52 +00:00
5d764f1435 Run network server in a separate thread, to minimise latency.
Make some parts of logger and console thread-safe.
Simplify console: remove special commands; remove prefix for script
commands.
Remove LOG_ONCE, to simplify logger.
Change some code to use the new logger interface.
Fix OOS when revealing map.
Clean up some formatting.

This was SVN commit r8511.
2010-10-31 22:00:28 +00:00