1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:19:54 +00:00
openmw-tes3mp/apps/openmw
David Cernat 892d71ce71 [General] Reimplement weather synchronization to allow soft transitions
Although weather sync was added by Koncord to the rewrite in fd721143e2 in a way that used surprisingly few lines of code, it relied on the server requesting weather states every second from authority players and sending them to non-authority players, while also allowing only very sudden weather transitions across regions, i.e. if there was one player in the Ascadian Isles who had stormy weather, and another player with clear weather in the Bitter Coast Region walked across to the Ascadian Isles, that player was instantly made to have stormy weather with no kind of transition at all.

My approach solves both of those problems. It solves the packet spam by only sending weather updates to the server when weather changes happen or when there are new arrivals to a weather authority's region, and it allows for both sudden weather transitions when players teleport to a region and for soft, gradual transitions when players walk across to a region. It is inspired by my previous actor sync, and uses a WorldRegionAuthority packet to set players as region authorities in a similar way to how ActorAuthority sets players as cell AI authorities. Weather changes are created only by the region authority for a given region, and weather packets are also only sent by that authority.

However, it should be noted that gradual weather transitions are used by default in this implementation. To use sudden weather transitions, the serverside Lua scripts need to forward WorldWeather packets with the forceWeather boolean set to true. That is, however, already handled by our default Lua scripts in situations where it makes sense.
2018-07-21 05:20:26 +03:00
..
mwbase [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
mwclass [Client] Don't pop up dialogue screen when an NPC activates another NPC 2018-07-15 04:36:42 +03:00
mwdialogue Merge pull request #456 from OpenMW/master while resolving conflicts 2018-07-04 01:52:29 +03:00
mwgui [Client] Display uniqueIndexes in a less confusing way in console 2018-07-19 11:57:06 +03:00
mwinput Merge pull request #456 from OpenMW/master while resolving conflicts 2018-07-04 01:52:29 +03:00
mwmechanics [General] Rename PlayerKillCount into WorldKillCount 2018-07-15 05:34:59 +03:00
mwmp [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
mwphysics Merge pull request #456 from OpenMW/master while resolving conflicts 2018-07-04 01:52:29 +03:00
mwrender [Client] Avoid sending map tiles for Wilderness cells 2018-07-06 03:54:34 +03:00
mwscript Merge pull request #457 from OpenMW/master while resolving conflicts 2018-07-14 03:57:05 +03:00
mwsound Initialize some missing fields in constructors 2018-06-25 09:35:42 +04:00
mwstate Revert "Merge pull request #1701 from akortunov/standfix" 2018-05-26 11:35:48 +00:00
mwworld [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
android_commandLine.cpp Fix tab indentations in apps/ and components/ 2015-09-16 20:45:37 +02:00
android_commandLine.h Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
android_main.c android: Update for sdl 2.0.8 2018-03-30 12:44:38 -04:00
CMakeLists.txt [General] Turn PlayerRegionAuthority into WorldRegionAuthority 2018-07-17 09:21:13 +03:00
doc.hpp Fixed more spelling mistakes 2016-12-15 13:09:40 +01:00
engine.cpp Merge pull request #457 from OpenMW/master while resolving conflicts 2018-07-14 03:57:05 +03:00
engine.hpp Merge branch 'master' into screenshot360 2018-02-25 11:25:19 +01:00
main.cpp [Client] Verify integrity of credits file 2018-07-16 03:25:01 +03:00