1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:19:57 +00:00
Commit graph

41 commits

Author SHA1 Message Date
David Cernat
3e81371e53 [General] Fix jump synchronization for players
This had been broken by fr3dz10's physics rewrites from the earlier part of the year that made it so dedicated players were always regarded by the movement solver as being on the ground.
2021-10-09 18:11:57 +02:00
David Cernat
1f3a17eff7 [Client] Remove pointless declaration of DedicatedPlayer as struct
This seems to have been a typo left over from Koncord's early work on the project.
2021-05-07 18:40:11 +02:00
David Cernat
58c04530e7 [General] Implement PlayerSpellsActive packet, part 2
The packet can now set the active spells of DedicatedPlayers.
2020-11-17 13:00:02 +02:00
David Cernat
30b179c2dd [Client] Add die() method to DedicatedPlayer 2020-11-15 01:30:13 +02:00
David Cernat
cd835104b7 [Client] Add resurrect() method to DedicatedPlayer 2020-11-15 00:44:10 +02:00
David Cernat
1083fa5196 [Client] Reorder DedicatedPlayer's functions 2020-11-14 23:02:30 +02:00
David Cernat
4389d4417a [Client] Add setStatsDynamic() method to DedicatedPlayer 2020-11-11 14:55:55 +02:00
David Cernat
c99e20e3b4 [Client] Equip items silently for newly met dedicated players/actors 2020-05-25 21:50:19 +03:00
David Cernat
1283d5d487 [General] Synchronize TCL state for players
Additionally, only purge temporary levitation effect for DedicatedPlayers if one has been added.
2019-12-01 18:13:24 +02:00
David Cernat
e15428e139 [General] Remove "created by" stamps added by IntelliJ 2019-08-26 12:33:28 +03:00
David Cernat
57f84914c3 [Client] Prevent permanent deletion of player markers on cell changes 2019-07-14 22:42:55 +03:00
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
David Cernat
50fe54af5d [Client] Update DedicatedPlayer creature if displayCreatureName changes 2018-04-17 15:23:10 +03:00
David Cernat
a01fc577f1 [Client] Add setAttributes() and setSkills() methods to DedicatedPlayer 2018-04-13 16:59:48 +03:00
David Cernat
68ee64902d [Client] Track & use previous race & creatureRefId for DedicatedPlayers 2018-04-13 16:16:43 +03:00
David Cernat
70f9cb535e [General] Use RecordHelper methods to create and update DedicatedPlayers 2018-04-13 08:37:06 +03:00
David Cernat
c132dc70d2 [Client] Make PlayerShapeshift turn DedicatedPlayers into creatures 2018-04-09 15:23:05 +03:00
David Cernat
141eb8b7c2 [Client] Streamline creation of references for DedicatedPlayers
Additionally, delete DedicatedPlayers who disconnect.

Previously, all disconnected DedicatedPlayers were still kept in memory, but never used again. There was code that suggested they were meant to be reused upon reconnecting, but that reuse had never actually been implemented, and would probably not be that useful anyway.
2018-04-08 15:02:43 +03:00
David Cernat
14f90e773d [Client] Split up creation of DedicatedPlayers into multiple methods
Additionally, print player guids using their string representations for consistency.

The creation and updating of DedicatedPlayer references remains very inelegant, but this commit is the first step towards fixing that.
2018-04-08 10:56:33 +03:00
David Cernat
be25decee2 [General] Implement PlayerSpeech packet 2017-10-31 15:19:14 +02:00
David Cernat
413893aa51 [General] Implement PlayerAnimPlay packet 2017-10-27 09:10:29 +03:00
David Cernat
43a3daf0aa [General] Add & implement PlayerShapeshift packet for werewolf states 2017-07-15 09:02:19 +03:00
David Cernat
8f5e6531db [Client] Avoid updating positions and anim flags when framerate is low
Also rename DedicatedPlayer methods so they are consistent with those from DedicatedActor
2017-05-14 10:52:44 +03:00
David Cernat
809b4d78ba [Client] Split off DedicatedPlayer and PlayerList into different files 2017-04-30 14:57:43 +03:00
David Cernat
44476248b7 [Client] Add and use DedicatedPlayer::update() 2017-04-24 18:38:57 +03:00
David Cernat
4e86d8781f [Client] Clean up & simplify logic for DedicatedPlayer cell transitions 2017-04-23 14:01:13 +03:00
David Cernat
2e8714afaa [Client] Rethink and restructure tes3mp combat code so it works for NPCs 2017-04-19 22:06:04 +03:00
David Cernat
07c2d4251e [Client] Add and use mwmp::PlayerList::isDedicatedPlayer() 2017-04-17 20:36:20 +03:00
David Cernat
7c45888f05 [Client] Reorder methods in DedicatedPlayer 2017-04-17 19:34:32 +03:00
David Cernat
0aaf68c994 [Client] Rename mwmp::Players into mwmp::PlayerList for clarity 2017-04-17 19:10:33 +03:00
David Cernat
c05c456b11 [Client] Clean up parts of LocalPlayer and DedicatedPlayer 2017-04-17 18:50:20 +03:00
David Cernat
e7960eee76 [General] Rename DrawState packets into AnimFlags ones for clarity 2017-04-14 16:00:34 +03:00
David Cernat
843e84ba26 Once again use RakNetGUID as index for player map everywhere
Because of frequent server crashes, I tried to simplify the player map indexes with commit c91e240664, but it had no noticeable effect and was later partially reverted by Koncord in commit 902e968fd9, apparently for reasons of readability.

For the sake of consistency, this commit completes his reversion.
2016-11-19 22:16:21 +02:00
David Cernat
fcd24ebb7e Rename methods to show they deal with Equipment instead of Inventory 2016-11-17 22:33:30 +02:00
David Cernat
3a733eb122 Make tes3mp includes consistent 2016-11-17 17:16:25 +02:00
David Cernat
fa9d6e810e Use lowerCamelCase in tes3mp client function names like OpenMW does 2016-11-15 21:54:06 +02:00
Koncord
56959ebfda Implement magic 2016-11-12 19:39:16 +08:00
David Cernat
c91e240664 Simplify the type of map that player objects are stored in 2016-10-26 21:36:58 +03:00
David Cernat
04eb051df6 Make markers get removed when their players quit, rename marker methods 2016-10-24 15:10:32 +03:00
Koncord
b704519078 Show dedicated players on minimap 2016-10-22 17:06:26 +08:00
Koncord
1b259e2d33 Syncing inventory, animations, position, 8 key attributes
Created Package system
2016-07-07 23:50:48 +08:00