1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 09:19:58 +00:00
openmw-tes3mp/apps/openmw/mwworld
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
..
action.cpp Make the PlayMode and PlayType enums scoped 2017-09-15 02:36:59 -07:00
action.hpp Adjustments to RemoveItem behavior 2017-04-13 22:33:13 +09:00
actionalchemy.cpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionalchemy.hpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionapply.cpp
actionapply.hpp
actiondoor.cpp
actiondoor.hpp
actioneat.cpp
actioneat.hpp
actionequip.cpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionequip.hpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionopen.cpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionopen.hpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionread.cpp Merge pull request #403 from OpenMW/master 2018-04-10 06:43:24 +03:00
actionread.hpp Improve WindowManager API with a generic way of passing a Ptr to the opened GUI window 2017-09-24 19:08:12 +02:00
actionrepair.cpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionrepair.hpp Make Equip console command to bypass most of restrictions (bug #4460) 2018-07-11 00:06:21 +04:00
actionsoulgem.cpp
actionsoulgem.hpp
actiontake.cpp [General] Rename Event into ObjectList & WorldObject into BaseObject 2018-05-13 00:42:24 +03:00
actiontake.hpp
actiontalk.cpp Refactor dialogue GUI to talk to the dialogue manager, not the other way around and not both ways. 2017-09-25 23:38:28 +02:00
actiontalk.hpp
actionteleport.cpp [Client] Send ActorAI packet for new cell after being followed to it 2018-07-13 22:34:36 +03:00
actionteleport.hpp Removed "less" character from the documentation by the requested opportunity. 2016-12-26 21:46:43 +01:00
actiontrap.cpp [Client] Disable clientside disarming of traps 2018-07-08 02:38:10 +03:00
actiontrap.hpp Play trap activation sound on trapped object, not actor 2016-07-10 21:39:53 +09:00
cellpreloader.cpp Add abort flag to TerrainPreloadItem 2017-03-14 21:28:57 +01:00
cellpreloader.hpp Fix issues caused by loading multiple views into the same terrain View 2017-03-14 20:27:55 +01:00
cellref.cpp [General] Change type of MpNum to "unsigned int" 2018-07-03 03:25:54 +08:00
cellref.hpp [General] Change type of MpNum to "unsigned int" 2018-07-03 03:25:54 +08:00
cellreflist.hpp Fix possible reference duplication when the refID is modified by a plugin (Bug #3471) 2016-07-22 03:58:23 +02:00
cells.cpp Makes cells cache size configurable 2017-05-25 13:09:40 +04:00
cells.hpp
cellstore.cpp [Client] Adjust log level for actor transfers in CellStore 2018-07-16 03:53:09 +03:00
cellstore.hpp [General] Rename all instances of refNumIndex into refNum 2018-07-13 04:12:03 +03:00
cellvisitors.hpp
class.cpp Merge pull request #457 from OpenMW/master while resolving conflicts 2018-07-14 03:57:05 +03:00
class.hpp Merge pull request #457 from OpenMW/master while resolving conflicts 2018-07-14 03:57:05 +03:00
containerstore.cpp Merged pull request #1753 2018-06-13 18:12:38 +02:00
containerstore.hpp Ignore broken items when search for replacement (bug #4453) 2018-06-13 18:39:02 +04:00
contentloader.hpp Escape content file names before sending them to the GUI 2017-08-25 10:05:56 +00:00
customdata.cpp
customdata.hpp
esmloader.cpp
esmloader.hpp
esmstore.cpp Add NPC validation to esmstore (bug #2772) 2018-06-14 16:48:16 +04:00
esmstore.hpp Add NPC validation to esmstore (bug #2772) 2018-06-14 16:48:16 +04:00
failedaction.cpp Play locked sounds on locked objects instead of actors 2016-08-10 21:31:14 +09:00
failedaction.hpp Play locked sounds on locked objects instead of actors 2016-08-10 21:31:14 +09:00
globals.cpp
globals.hpp
inventorystore.cpp Merge pull request #319 from OpenMW/master while resolving conflicts 2017-10-22 20:27:44 +03:00
inventorystore.hpp Remove item by id from InventoryStore 2017-10-06 10:54:25 +04:00
livecellref.cpp Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
livecellref.hpp [Client] Clean up & simplify logic for DedicatedPlayer cell transitions 2017-04-23 14:01:13 +03:00
localscripts.cpp More consistent wording of errors/warnings 2017-03-04 21:48:31 +01:00
localscripts.hpp Vanilla-compatible activate / onActivate (Fixes #1629) 2016-02-26 13:08:35 +01:00
manualref.cpp [Client] Set mMpNum to 0 for ManualRef 2017-04-05 06:58:59 +03:00
manualref.hpp
nullaction.hpp Add isNullAction() method to fix compiler warning 2016-06-11 18:26:20 +02:00
player.cpp [General] Implement ObjectActivate packet & associated script functions 2018-07-15 03:16:04 +03:00
player.hpp Move previous items to player 2018-06-10 16:21:19 +04:00
projectilemanager.cpp Correct projectile rotation 2017-11-23 20:27:22 +01:00
projectilemanager.hpp Make use of mEffectAnimationTime for projectile rotation 2017-11-23 15:14:15 +01:00
ptr.cpp Added ConstContainerStoreIterator 2017-02-18 13:47:18 +00:00
ptr.hpp Added ConstContainerStoreIterator 2017-02-18 13:47:18 +00:00
recordcmp.hpp
refdata.cpp Reset activation flags when an object is copied (Fixes #3671, Fixes #3719) 2017-01-14 15:29:36 +01:00
refdata.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 2016-08-03 03:52:35 +02:00
scene.cpp Merge pull request #408 from OpenMW/master 2018-04-18 18:05:09 +03:00
scene.hpp Add 'prediction time' setting for cell/terrain pre-loading 2017-07-19 16:44:37 +02:00
store.cpp Get rid of unnecessary find 2018-05-06 16:42:05 +04:00
store.hpp Don't call Store::setUp() unnecessarily 2018-02-13 00:38:55 +00:00
timestamp.cpp
timestamp.hpp
weather.cpp [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
weather.hpp [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
worldimp.cpp [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00
worldimp.hpp [General] Reimplement weather synchronization to allow soft transitions 2018-07-21 05:20:26 +03:00