Commit Graph

18554 Commits

Author SHA1 Message Date
Benau
0a5c1a69c7 Use shared_ptr for protocol to avoid leaking
With weak_ptr it's also possible to auto clear LobbyProtocol when
STKHost is shutdown
2018-02-18 12:39:05 +08:00
Benau
bcf8e4e5fe Allow shutdown STKHost from dialog 2018-02-17 16:25:53 +08:00
Benau
4c1cc50955 Don't pause timer in network as it breaks rewind
Also remove the unneed protocol manager checking
2018-02-17 15:38:56 +08:00
Benau
372753f505 Use atomic flag to start / stop listening thread 2018-02-17 11:40:48 +08:00
Benau
cfeadf335c Move some code to header 2018-02-17 10:51:33 +08:00
Benau
c5788a2c90 Move the cleaning of events to destructor of protocol manager
So that the last one who deletes it can clear all the remaining data
properly (ie if it's STKHost listening thread)

Remove the assert in async update thread as it may not be true for
the first thread creation
2018-02-16 00:48:27 +08:00
Benau
05f7c014dd Create a prototype for thread-safe protocol manager
Using weak and shared_ptr, if !lock(), than it was atomtically
destroyed
2018-02-15 16:47:04 +08:00
Benau
3d8efcdfa1 Use >= for counter in case of some peer disconnect in between for completing race end 2018-02-15 15:33:18 +08:00
Benau
fa2a8bccd3 Reset available karts and tracks each selection 2018-02-15 14:07:58 +08:00
Benau
20a2bc3bbb Terminate controller and game event protocols when exit result screen 2018-02-15 13:28:28 +08:00
Benau
e7d3658a53 Merge remote-tracking branch 'origin/network_improvements' into game_protocol 2018-02-15 10:36:14 +08:00
hiker
c0333fe0f7 Bugfix: TimeInfo objects were missing for substeps, resulting in
very stuttering game play.
2018-02-15 10:06:13 +11:00
Benau
469f7d2fc5 Drop player if he has incompatible karts / tracks 2018-02-14 12:23:05 +08:00
hiker
4bd7848431 Removed duplicated update of the ProtocolManager, and only
update it when STKHost exists (otherwise STK will crash since
ProtocolManager can get called when it does not exist).
2018-02-14 09:27:13 +11:00
hiker
2a30f75b78 Avoid crash that can happen if the first DT is large and event
happens during that time.
2018-02-14 09:20:45 +11:00
hiker
df5adbc320 Fixed comment. 2018-02-14 09:20:27 +11:00
Benau
8a1ef31f4a Allow remove unusable karts or tracks in network game 2018-02-14 01:57:05 +08:00
Benau
46416781fa Make it possible to restart race after going back to lobby
At the moment the token is reset by client after each restart
2018-02-13 15:20:55 +08:00
hiker
26401972d2 Merge branch 'fix-timestep' into game_protocol 2018-02-13 08:41:49 +11:00
hiker
4ce66e754b Fixed compiler warnings. 2018-02-12 18:07:51 +11:00
hiker
fa20e4f866 Only issue sfx commands once per rendered frame (during the last
substep).
2018-02-12 18:01:05 +11:00
hiker
c7bc47f2e3 Fixed world update to be fixed at the physics frame rate. 2018-02-12 09:54:46 +11:00
hiker
4d03fbd1fb Made the physics time step size configurable in the config file. 2018-02-12 08:23:06 +11:00
hiker
37d81be033 Made the physics time step size configurable in the config file. 2018-02-10 17:55:45 +11:00
hiker
4f54fb7898 Avoid crash in history replay (dirty workaround), 2018-02-10 17:51:12 +11:00
hiker
52e9330212 Removed debug output. 2018-02-10 17:34:10 +11:00
Benau
3290321c5d PlayerController can become EndController anytime 2018-02-09 18:00:19 +08:00
Benau
366313d29d Avoid an unknown value from attachment rewind 2018-02-09 17:59:48 +08:00
hiker
434a9c5dcc Fixed compiler warnings. 2018-02-09 16:14:38 +11:00
hiker
4d75042f3b Fixed compiler warnings. 2018-02-09 16:12:44 +11:00
hiker
113e3c0c09 Merge branch 'game_protocol' of github.com:supertuxkart/stk-code into game_protocol 2018-02-09 16:09:39 +11:00
hiker
8eddff3e34 Merge branch 'speed-cap-to-physics' into game_protocol 2018-02-09 16:03:58 +11:00
hiker
b3243a3589 Merge branch 'speed-cap-to-physics' 2018-02-09 09:38:34 +11:00
hiker
6c0f97261a Fixed missing startup boost, improved maths to only use
velocity in the current plane for boosting.
2018-02-09 09:15:23 +11:00
Deve
a18351c052 Some fixes for gamepad buttons 2018-02-08 22:34:53 +01:00
Benau
9a5ce54c4f Merge remote-tracking branch 'origin/master' into game_protocol 2018-02-09 00:53:02 +08:00
Benau
7210992e3d Prevent local player == 0 when in network mode 2018-02-09 00:49:55 +08:00
Benau
19c705f27c Make wrong way message always centered, fix #3115 2018-02-08 13:15:22 +08:00
Deve
5e8343a068 Add basic gamepad support for android 2018-02-08 01:24:35 +01:00
Ben Krajancic
d96b6b92ce Split screen regression fixes (#3116)
* Fix lapcount

* Fix selection box color

* Fix messages on screen

* Fix scaling

* Fix for icons

* Styling fixes

* fix style issue

* Fix calls

* Final call fix
2018-02-07 18:52:53 -05:00
Benau
0e5b7b532c Further boost stk by writing 1 less framebuffer attachment
Now we can get determine the background color by depth, so
the alpha tricks in diffuse color fbo is not necessary

And using rgba8 to pack normal doesn't seem to cause visual glitches.
2018-02-07 12:49:45 +08:00
hiker
777435fb35 Merge branch 'master' of github.com:supertuxkart/stk-code 2018-02-07 09:58:22 +11:00
Deve
f101c9e366 Fixed android compilation 2018-02-06 23:17:34 +01:00
samuncle
704fe3e32a Fix a bug in the emissive contribution. Now there is a bigger range of value for bloom 2018-02-06 23:15:21 +01:00
hiker
c37f2887c1 Fixed compiler warnings and coding style issues. 2018-02-07 08:54:15 +11:00
hiker
3788a3d90d Merge remote-tracking branch 'origin/master' into speed-cap-to-physics 2018-02-07 08:36:48 +11:00
Deve
a755dae85f One more fix for android tv 2018-02-06 22:35:46 +01:00
Deve
8fd52cd8e3 Fixed android compilation with different sdk version 2018-02-06 22:35:46 +01:00
hiker
a72ed7ef30 Merge branch 'master' of github.com:supertuxkart/stk-code 2018-02-07 08:34:51 +11:00
hiker
1f7350822c Added buffer flushing if a history replay is aborted. Don't print
data to stdout when using buffering (since it slows down flushing).
2018-02-07 08:32:22 +11:00