Commit Graph

15805 Commits

Author SHA1 Message Date
hiker
0d488b916d Use Synchronised instead of mutex for next protocol id. 2016-02-05 08:24:28 +11:00
hiker
348a300c09 Use Synchronised for m_requests instead of separate mutex. 2016-02-05 08:19:26 +11:00
hiker
263e41ec1f The update messages are now handled in the main thread, which removes the
need for locking. Also only the last update event is handled, older events
are discarded.
2016-02-04 17:15:14 +11:00
hiker
4fa7a89963 Fixed (probably debug only) crash: evaluating the pointer arithmetic
left to right had invalid intermediate result (i>0; offset <0).
2016-02-04 16:56:11 +11:00
hiker
f580603c97 Cosmetic changes. 2016-02-04 16:55:42 +11:00
hiker
878760ed2d Fixed GameEventProtocol (e.g. collecting items). 2016-02-03 09:07:15 +11:00
hiker
f5897001d8 Properly lock data structure (I've seen data corruption, most likely
caused by not locking).
2016-02-03 09:05:26 +11:00
hiker
19053d8ac6 Removed unnecessary call. 2016-02-03 08:48:28 +11:00
hiker
cc017da1d6 Let only the server ping the clients (to reduce network traffic). Reduce
frequency of pings (since it appears that often esp. during loading
clients are busy loading which artificially increases latency).
2016-02-03 08:21:34 +11:00
hiker
4f12a9a66c Prevent usage of duplicated host ids (before if hosts A and B are connected,
then A disconnects and C connects, B and C would have the same host id).
2016-02-02 09:52:07 +11:00
hiker
ef8c04e117 Removed unnecessary lock. 2016-02-01 16:45:07 +11:00
hiker
d78c1b3272 Replaced array with scalar value, minor code cleanups. 2016-02-01 16:42:36 +11:00
hiker
17de128f09 Cosmetic changes only. 2016-01-29 08:18:34 +11:00
hiker
e81935df99 Added convenience functions that encode and decode Vec3s and Quats. 2016-01-29 08:14:13 +11:00
hiker
6039f63c0b Removed need m_self_kart from NetworkWorld, which is not necessary anymore. 2016-01-29 07:42:32 +11:00
hiker
06d1168948 Refactored to remove need for unique kart names. 2016-01-29 07:40:16 +11:00
hiker
497a018667 Cosmetic changes only. 2016-01-28 08:41:50 +11:00
hiker
2606c5230d Refactored ControllerEventsProtocol so that unique kart names
are not necessaruy anymore.
2016-01-28 08:05:48 +11:00
hiker
892e1b58d1 Protocols are now either synchronous or asynchronous. This avoids a problem
that in (rare) circumstances e.g. a message that is only handled synchronously
is deleted from the asynchronous thread (if the main thread is too slow and
a time out is reached).
2016-01-27 10:05:25 +11:00
hiker
e31ce6844e Partial fix for crash when disconnecting clients. 2016-01-27 07:40:25 +11:00
hiker
618248ef4d Added comments. 2016-01-27 07:39:53 +11:00
hiker
560ff7cee4 Moved ActivePlayer out of Controller and into LocalPlayerController. 2016-01-18 16:47:48 +11:00
hiker
affc53fef4 Updated documentation. 2016-01-18 16:22:15 +11:00
hiker
a6386e1f20 Simplified and documented code. 2016-01-18 08:17:44 +11:00
hiker
73d8e18044 Fixed and simplified sendMessageToPeersChangingToken, avoiding
incorrect messages if more than one peer is connected.
2016-01-18 08:16:32 +11:00
hiker
b7870b2377 Fixed crash (when going back from track screen to kart screen). 2016-01-15 16:25:02 +11:00
hiker
d3a7c75a62 Replaced many uses of getPlayer with Controller::canGetAchievements.
Removed some unused variables.
2016-01-15 08:02:36 +11:00
hiker
45399fc43f Removed unused data. 2016-01-14 08:30:02 +11:00
hiker
846fd3f059 Started to support split screen by fixing and improving the handling
of local plauyer ids.
2016-01-14 08:20:14 +11:00
hiker
e70017a1a6 Code simplification. 2016-01-14 08:05:40 +11:00
hiker
b0571e419a Added documentation. 2016-01-13 17:03:01 +11:00
hiker
409862dbe2 Merge branch 'removeLocalPlayerInfo' 2016-01-12 13:15:36 +11:00
hiker
2c232bf400 Merge branch 'master' of https://github.com/supertuxkart/stk-code 2016-01-12 13:15:09 +11:00
hiker
7b6ec4e916 Merge remote-tracking branch 'origin/master' into removeLocalPlayerInfo 2016-01-12 13:02:34 +11:00
hiker
e7dd7f4d1a Replaced setLocalKartInfo with setPlayerKart. Updated some docs. 2016-01-12 13:00:45 +11:00
hiker
6816b08af1 Made m_player private in Controller. 2016-01-11 17:35:24 +11:00
hiker
4d28bb484f Added host id which is used to determine local/remote players. 2016-01-11 17:08:06 +11:00
hiker
f0c5f43fe2 Removed setNumLocalPlayers (which is now part of setNumPlauers)<
fixed coding style in race manager.
2016-01-11 07:58:30 +11:00
Deve
87d474bd1a Fixed compilation.
The __try and __except are not available in mingw.
2016-01-08 20:48:39 +01:00
Deve
2da5efd983 Simplify code a bit 2016-01-08 20:20:03 +01:00
Deve
280ad614bb Fixed creating screenshots in menu screens 2016-01-08 20:20:03 +01:00
hiker
e46c47d5c9 Removed m_local_player_karts data structure in RaceManager. 2016-01-08 17:03:50 +11:00
Benau
283c1a7c37 Update supertuxkart desktop file to support searching with keywords 2016-01-08 09:34:13 +08:00
hiker
6ffe0cc995 Updated comments. 2016-01-07 17:11:14 +11:00
hiker
f5438c433c Removed unused variable. 2016-01-07 17:07:04 +11:00
hiker
a1b05dbb00 Merge branch 'master' of https://github.com/supertuxkart/stk-code 2016-01-07 08:48:00 +11:00
hiker
f3851e44a9 Removed code duplication in StartGameProtocol. 2016-01-07 08:47:43 +11:00
hiker
7826a8a751 Removed compiler warnings. 2016-01-06 18:10:54 +11:00
hiker
eb30294259 Disable access to network races. 2016-01-06 18:01:46 +11:00
hiker
b8ed2025ed Merge remote-tracking branch 'origin/master' into refactor_networking 2016-01-06 17:53:45 +11:00