Benau
2e0558323b
Merge branch 'origin/network_improvements'
2018-03-14 10:05:07 +08:00
auria.mg
f3d1995033
Change assert into warning, it's definitely not fatal
2018-03-13 21:39:27 -04:00
Deve
6621196266
Don't close STK after login screen
2018-03-13 21:22:21 +01:00
Benau
5699a86586
Allow toggling the display of only private server
2018-03-14 00:50:19 +08:00
Benau
901c5eabec
Allow specifying server password in dialog
2018-03-13 16:04:59 +08:00
hiker
d3a60356c9
Merge remote-tracking branch 'origin/fix-timestep' into game_protocol.
...
Started to use ticks instead of time floating point values in networking.
2018-03-13 18:37:12 +11:00
Benau
c73536263f
Add password protected and version info to server
2018-03-13 14:39:20 +08:00
Benau
fe0adadd16
Simplify linebreak
2018-03-13 12:52:04 +08:00
Benau
a33a9a040b
Allow text box widget to listen enter event
2018-03-13 09:00:44 +08:00
Deve
952b973b89
Valgrind complains about changing variable after closeScreen
2018-03-12 23:03:15 +01:00
Benau
b72cf4f406
Don't assert peer size for client as the listening thread is delayed-start
2018-03-13 01:03:02 +08:00
Benau
0f6dbbb4a0
Add default-disabled lobby chatting
2018-03-12 16:51:30 +08:00
Benau
25da48634d
Add kick ban in network console configurable in config.xml
2018-03-12 13:59:38 +08:00
Benau
bb3bcdca3e
Change int to int map to uint32_t for server ban list
2018-03-12 12:39:16 +08:00
Benau
93c910f18b
Use a uniform translated timed out string
2018-03-12 11:38:37 +08:00
Benau
d527c0eee2
Use icon to identify server owner, online and offline players
...
Also hide the friend request button for offline players
2018-03-12 11:28:13 +08:00
Benau
ffd6e84759
Stop threads of texture loading before destroying shader manager
2018-03-12 09:21:30 +08:00
auria.mg
48f2aa3da4
Fix bubblegum flashing, fixes #3133
2018-03-11 19:35:59 -04:00
auria.mg
361e03c375
Fix more keyboard issues, fixes #3131
2018-03-11 19:06:48 -04:00
auria.mg
2087a72cf3
Improve keyboard-only navgation. See #3131
2018-03-11 18:50:55 -04:00
Benau
95208967cf
Add kicking player for server owner
2018-03-12 02:05:38 +08:00
Benau
3bbec8aa27
Initial work on lobby redesign
2018-03-12 00:18:53 +08:00
Benau
4dea283965
Only run enet command in listening thread
...
And use sleep instead of timeout for new code
2018-03-10 14:56:32 +08:00
Benau
c50cdd9d68
Only start listening after trying connect to a server
2018-03-10 13:20:18 +08:00
Benau
98e3d82921
Add kicking players and properly recieve disconnect events
2018-03-10 12:34:33 +08:00
Benau
22ca1cb751
Avoid sending to wrong peer in case of disconnection
2018-03-10 01:07:23 +08:00
Benau
8e1cc2b0c8
Make latency protocol work with weak pointer of STKPeer
2018-03-10 01:00:10 +08:00
Benau
5600d01b2c
Use shared_ptr of STKPeer if needed
2018-03-09 23:54:13 +08:00
Benau
e439e68b60
Move protocol start after creation of STKHost
2018-03-09 23:01:20 +08:00
Benau
5756fd5f48
Use a mutex to make only 1 enet_peer_send happening
...
In reality we need mutex to protect enet_host_service, but it leads
to seriously increased locked time
2018-03-09 23:00:47 +08:00
Benau
d538dfc7e6
Header cleanup
2018-03-09 21:17:31 +08:00
Benau
9c46b70042
Use peerExists to check for establishment of connection
2018-03-09 19:05:25 +08:00
Benau
dd2e32a953
Implement a thread-safe list of STKPeer
...
Block re-connect from the same ip and port and clean up add or
remove of peers
2018-03-09 18:33:19 +08:00
Benau
db68756fd6
Use mutex to prevent joining of players when start selection
2018-03-09 09:22:13 +08:00
Deve
d271e27590
Show progress bar before new data is extracting. It will at least show that the game is not hanged and is doing something.
2018-03-08 21:45:20 +01:00
Benau
2d86adce3c
Fix quitting the server
2018-03-08 13:19:24 +08:00
Benau
0b00640760
Let stk host clean up server id file
2018-03-08 12:00:36 +08:00
hiker
8cf885652f
Merge remote-tracking branch 'origin/master' into game_protocol
2018-03-08 09:51:00 +11:00
hiker
fa624c90e1
Merge remote-tracking branch 'origin/master' into fix-timestep
2018-03-08 09:50:14 +11:00
hiker
e4ea3291b1
Fixed world time differences between client and server.
2018-03-08 09:47:42 +11:00
Benau
cd713f6c99
Move hiding icons for android to beforeAddingWidget
2018-03-07 11:04:00 +08:00
Deve
022dd68a17
Some fixes for gamepad on android
2018-03-06 23:23:15 +01:00
Benau
aa06d3f4e2
Always use lan connection for connect-now
2018-03-07 00:56:43 +08:00
Benau
269c9318e5
Send a broadcast in case of lan connection for wan server
2018-03-07 00:51:59 +08:00
Benau
177c7b147c
Fix connect to wan server in lan network
2018-03-06 16:18:57 +08:00
Benau
1dc7f3aa4e
Move port configuration to user and stk config
2018-03-06 15:38:51 +08:00
Benau
88e9d6a34c
Fix server selection screen loading dots
2018-03-06 14:40:29 +08:00
Benau
821a00c039
Fix some corruption in server only stk
2018-03-06 13:11:05 +08:00
Benau
66626e4ea8
Fix uninitialized value
2018-03-06 11:59:08 +08:00
Deve
e00074cb14
Some work on gamepad support on android.
...
Still it works only for single gamepad, but at least it's preconfigured and google shouldn't complain about stupid button names.
2018-03-06 00:19:01 +01:00
Benau
03285a33a3
Move ModalDialog::dismiss() after setJoinedServer
2018-03-06 01:38:09 +08:00
hiker
ae111d3cfb
Fixed item rotation in network mode.
2018-03-05 22:42:01 +11:00
Benau
d5c1ac30ab
Fix signin leaking
2018-03-05 16:34:15 +08:00
hiker
4f9353e03f
Reduce camera shaking (caused by camera being updated during rewind).
2018-03-05 17:52:06 +11:00
Benau
eec166c90d
Always clean up server id file in case client failed to connect
2018-03-05 13:55:35 +08:00
Benau
4ab04bc546
Don't overwrite user id and token if using client-server
2018-03-05 13:52:04 +08:00
Benau
ebcaa2c1ad
Fix auto connect
2018-03-05 13:04:17 +08:00
auria.mg
aa027bd09c
Fix GUI bug
2018-03-04 18:38:58 -05:00
Benau
2b56a97b08
Clean up Server, ServersManager and quick play
...
For now we choose the server with the least player for quick play
2018-03-05 01:54:44 +08:00
Deve
8f78d4e891
Add a popup on first run on android, so that user can choose if accelerometer should be enabled
2018-03-04 00:08:24 +01:00
Deve
975fc8f84a
Don't show screen keyboard when hardware keyboard is available
2018-03-03 21:06:59 +01:00
Benau
58757c2927
Hide create server buttons for android
2018-03-03 14:31:38 +08:00
Benau
594780a758
Don't use setVisible for IconButtonWidget in beforeAddingWidget
2018-03-03 14:22:44 +08:00
auria.mg
89596af654
UI bugfix
2018-03-02 20:44:00 -05:00
auria.mg
0cd5b5672e
Fix assert failure
2018-03-02 19:46:43 -05:00
Deve
41ba4395d9
Don't spam with old drivers popup on android
2018-03-02 22:34:20 +01:00
Deve
729e508027
Disable accelerometer in options if it's not available
2018-03-02 22:30:22 +01:00
Deve
402b2ffb7a
Fixed compilation
2018-03-02 20:29:25 +01:00
Benau
4e2863294d
Use stun servers that return XOR mapped address
2018-03-02 22:38:04 +08:00
Benau
4f9af9d438
Don't use getifaddrs as it crashes android
2018-03-02 20:03:04 +08:00
Benau
43cf29af86
Merge remote-tracking branch 'origin/network_improvements'
2018-03-02 17:39:16 +08:00
Benau
efa294d4f4
Clean up lan and wan server code
2018-03-02 15:21:27 +08:00
Benau
80a9cc5c48
Auto shutdown the child STK server in windows
2018-03-02 13:25:14 +08:00
Benau
a27512f515
Use ostringstream to add server option
2018-03-01 12:50:51 +08:00
Benau
d76bd49eee
Fix one more non-exist GL call in no graphics
2018-03-01 12:19:25 +08:00
Benau
9d93e0112c
Try to fix OSX no-graphics STK
2018-03-01 10:10:08 +08:00
Deve
a00c1cadc8
Simplify accelerometer selection in settings
2018-02-28 22:01:30 +01:00
Benau
3141b67f89
Use a signal handler to partially clean up STK when terminating
2018-03-01 02:19:26 +08:00
Benau
13d4cc50cf
Use server id file to determine the status of no-graphics server
2018-02-28 16:09:53 +08:00
Benau
e760642842
Use NetworkConfig to set user id and token
2018-02-28 15:29:40 +08:00
Benau
18eb0a613a
Allow non-saved password user to create wan server
2018-02-28 15:05:34 +08:00
samuncle
39c50c838f
Make access to the time of the track in the shader to react to day/night cycle
2018-02-27 23:20:49 +01:00
Benau
cd5cb5ef6d
Use STKHost to determine graphics-client-server
2018-02-27 14:10:44 +08:00
Benau
6536a311b3
Allow logging save only to a file
2018-02-27 13:22:58 +08:00
Benau
4ac34fac76
Don't register LAN server
2018-02-27 12:56:22 +08:00
Deve
4cc56aec1b
Detect system language on android
2018-02-26 21:25:08 +01:00
Benau
0e2d5ab460
Allow server and client together in graphics
2018-02-27 02:40:50 +08:00
Benau
92b5f69220
Move hiker's SSM to a SeparateProcess class for graphics + client server
2018-02-27 01:40:36 +08:00
Benau
d8007c4518
Update server for new xml code
...
And initial work for starting a complete stk server
2018-02-26 14:23:34 +08:00
Deve
78bb9e78ac
Fixed version number for nvidia gles.
...
It uses gl version string: OpenGL ES 3.2 NVIDIA 384.111
2018-02-25 22:40:15 +01:00
Benau
6c18664967
Make sure protocol manager exists when requesting
2018-02-25 15:24:46 +08:00
Benau
c5cf87071c
Use xmlEncode for proper unicode handling
2018-02-25 14:32:38 +08:00
Benau
2fcaeabf1c
Increase timeout in case of busy network
2018-02-25 13:45:43 +08:00
Benau
571a524f59
Update lobby for new gui engine code
2018-02-25 13:31:45 +08:00
auria.mg
7b903a09ba
Add text_valign="top" support to GUI engine
2018-02-24 21:49:49 -05:00
auria.mg
8d565fba11
Unicode fix
2018-02-24 21:38:31 -05:00
Benau
34caab24fe
Update networking lobbdy for better display info
2018-02-25 02:09:07 +08:00
Benau
2a117d8e44
Don't lock in async update in protocol manager
...
It allows GUI interacts with protocol more actively
Also don't handle lan connection request if we are not waiting for
players
2018-02-25 02:07:24 +08:00
Benau
b26b784b6a
Various improvements to WAN and LAN connection
2018-02-24 15:48:30 +08:00
Ethan Uzarowski
b782af2949
Remove "Final lap!" message in one-lap races ( #3127 )
...
* Fix "Final lap!" message on one-lap races
When starting a one-lap race, the game gives the message "Final lap!". This should only be given when there is more than one lap in the race. This commit changes linear_world.cpp so that this message is only given when the number of laps in the race is greater than 1.
* Fix spacing
I accidentally changed the spacing when making my last commit. This commit fixes that accident.
2018-02-23 20:43:46 -05:00
hiker
95f0bf9e3b
Used functions in stk_config to convert between ticks and times.
2018-02-23 23:22:49 +11:00
Benau
d586ab9011
Allow auto-fallback to another unused port if needed
2018-02-23 16:16:43 +08:00
Benau
a93182740e
Reset NetworkConfig when exiting WAN game screen
2018-02-23 15:46:03 +08:00
Benau
7d14954012
Simpify network console
2018-02-23 14:57:59 +08:00
Benau
1023e6580e
Unregister STK server when exiting
2018-02-23 14:01:20 +08:00
hiker
cb712411e0
Converte some pararchute values to use ticks.
2018-02-23 10:01:22 +11:00
Benau
005454ba7b
Use the recieved port to connect, also fix a possible crash
2018-02-22 16:38:53 +08:00
hiker
81342ddd00
Fixed several mixups of ticks and time.
2018-02-22 19:25:11 +11:00
hiker
7a53cf16fe
Fixed compiler warnings.
2018-02-22 19:19:04 +11:00
Benau
33435de026
Fix lan game in localhost, also improve timer behaviour
2018-02-22 16:03:54 +08:00
Benau
4559fd6a2c
Remove unused protocol
2018-02-22 15:14:15 +08:00
Benau
1458f3ef8e
Fix wan connection, move get public address from stun to stk host
2018-02-22 15:11:07 +08:00
hiker
797e35c674
Bugfix, forgot to change the type from float to int.
2018-02-22 09:23:45 +11:00
hiker
1c3da88e77
Replaced more time with ticks.
2018-02-22 09:22:57 +11:00
hiker
09e7a5cc13
Converted more times to using ticks; fixed bug that in case of
...
a race restart the fastest lap was not reset.
2018-02-21 22:46:35 +11:00
hiker
27b5409487
Use ticks (at the physics frame rate) for time measurement, which
...
avoids potential floating point errors (in networking).
2018-02-21 22:18:45 +11:00
hiker
208c5eb6d8
Merge remote-tracking branch 'origin/master' into fix-timestep
2018-02-21 08:35:58 +11:00
Benau
8daebe06e1
Allow creating wan server in command line
...
It can only be used with a saved online player, also fix a weird
crash if server failed to create (wan is NULL)
2018-02-20 15:11:58 +08:00
Benau
22c755a328
Show protocol name when it is terminated (easier for debugging)
2018-02-20 13:33:43 +08:00
Benau
14b401b54e
Use std atomic for server state
2018-02-20 11:14:57 +08:00
Benau
04a6f6d08b
Warn user about multiple instance of STK server
2018-02-20 10:11:09 +08:00
Benau
3223d05c6c
Merge remote-tracking branch 'origin/master' into network_improvements
2018-02-20 00:14:29 +08:00
Benau
4ab823cfbc
Move lan network socket to thread main loop, fixed leaking of it too
...
Also call enet_deinitialize when destroy STKHost
2018-02-19 11:36:32 +08:00
Benau
e393e3d4f0
With shared_ptr protocol is not leakable
2018-02-18 14:50:06 +08:00
Benau
e52ab5888c
Don't crash when close STK window directly
2018-02-18 14:13:24 +08:00
Benau
c5b986e874
Allow going back to online menu if server connection is lost
2018-02-18 14:06:17 +08:00
Benau
6fd7fb0e0e
Allow reconnecting to lan servers as many time as possible
2018-02-18 13:24:29 +08:00
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
Deve
959f33223e
Enable multitouch gui only if touchscreen is available
2018-02-14 22:28:55 +01:00
Benau
469f7d2fc5
Drop player if he has incompatible karts / tracks
2018-02-14 12:23:05 +08:00
auria.mg
e26239e364
Improve the input sensing text to be a bit clearer
2018-02-13 20:35:07 -05: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
auria.mg
196b5a2bbe
Minor ajustments to kart color screen, make kart slightly bigger, make XML cleaner
2018-02-12 20:22:35 -05:00
auria.mg
ceeb79f3a4
Restore accidentally removed resolution ajustment in kart color selection screen
2018-02-12 20:16:31 -05:00
auria.mg
2830dabfc1
Improve kart color selection screen, fixes #3122
2018-02-12 20:08:51 -05:00