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

439 commits

Author SHA1 Message Date
David Cernat
9e6459043b [General] Fix typo related to originClientScript in ObjectPacket 2018-07-22 20:29:27 +03:00
David Cernat
3dc2d1b214 [General] Add packetOrigin and originClientScript to ObjectList packets
Additionally, add script functions for getting the packetOrigin and originClientScript of received ObjectList packets.
2018-07-22 18:38:05 +03:00
David Cernat
715cac807d [General] Add compareFloats to Utils 2018-07-22 15:23:23 +03:00
David Cernat
cb6c37a26d [General] Replace doubles with floats in BaseStructs and BaseWorldstate 2018-07-22 14:20:20 +03:00
David Cernat
038757b91a [General] Temporarily revert to original rotation animation sync
I originally added rotation animation sync as part of commit 068a45be87. Unfortunately, it meant the PlayerPosition packets were now twice as large as they had been before, which was less than ideal for such a frequently sent packet, which is why Koncord switched to a more optimized approach in commits 5f30dfd5db and d67db1a9bd.

Recently, there have since been some rotation animation problems in OpenMW, which have broken the way Koncord's approach looks. My original approach still looks somewhat okay, so I'm switching back to it until we can figure out how to reuse it under the current circumstances.
2018-07-21 19:27:36 +03:00
David Cernat
20e0100706 [General] Rework Attack packets and add synchronization for item magic 2018-07-21 14:41:27 +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
9823a77bf2 [General] Turn PlayerRegionAuthority into WorldRegionAuthority
WorldRegionAuthority is a Worldstate packet.
2018-07-17 09:21:13 +03:00
David Cernat
72d286473b [General] Move credits integrity error message to new ErrorMessages file
Additionally, use correct log level for credit integrity message on server.
2018-07-16 03:21:14 +03:00
David Cernat
0b5cb15f71 [General] Turn GameWeather into WorldWeather, now a WorldstatePacket 2018-07-16 02:20:43 +03:00
David Cernat
646111d998 [General] Use correct credits checksum and move it to Version.hpp 2018-07-16 01:05:56 +03:00
David Cernat
22b2b7a9c6 [General] Add Utils methods for checksums 2018-07-15 22:39:57 +03:00
David Cernat
3649cf553f [General] Rename PlayerKillCount into WorldKillCount
This should clarify the real meaning of the packet and its associated event.

The event itself has been renamed from OnPlayerKillCount to OnWorldKillCount.
2018-07-15 05:34:59 +03:00
David Cernat
6ebe09375f [General] Implement ObjectActivate packet & associated script functions 2018-07-15 03:16:04 +03:00
David Cernat
81b160cae8 [General] Add placeholder for ObjectActivate packet 2018-07-15 01:08:31 +03:00
David Cernat
61da0d2475 [General] Turn PlayerInteraction into PlayerInput 2018-07-15 00:36:07 +03:00
David Cernat
32b6134fad [General] Add placeholder for CellReplace packet 2018-07-15 00:17:13 +03:00
David Cernat
a471f5e452 [General] Turn CellCreate into a Worldstate packet 2018-07-14 23:51:49 +03:00
David Cernat
ae55ee7f0b [General] Add getNumberOfDigits to Utils in components 2018-07-14 23:51:49 +03:00
David Cernat
528bd26a3b [General] Allow followers to follow non-authority players through cells 2018-07-13 21:27:29 +03:00
David Cernat
09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
2018-07-13 04:12:03 +03:00
David Cernat
bdf2f03c4f [General] Remove unnecessary MapChanges struct from BaseWorldstate 2018-07-12 05:06:31 +03:00
David Cernat
ceea65f666 [General] Change pre-rewrite's version to 0.7.0-alpha 2018-07-11 19:35:28 +03:00
David Cernat
bff6e9e235 [General] Implement ActorAI packet, part 5
Allow repetition for AiWander package to be turned on and off.
2018-07-10 23:18:32 +03:00
David Cernat
00c13ae96c [General] Implement ActorAI packet, part 4
The server can now make actors activate players and objects, at least in theory. In practice, OpenMW''s AiActivate package needs to be worked so it allows specific objects as targets instead of just refIds.
2018-07-10 07:07:37 +03:00
David Cernat
0e13207afe [General] Implement ActorAI packet, part 3
The server can now cancel actor AI, make actors travel to a location, make actors wander, and make actors get escorted by a player or another actor.
2018-07-10 05:07:58 +03:00
David Cernat
5baef09f79 [General] Implement ActorAI packet, part 2
The server can now make actors start combat with players or other actors.
2018-07-10 02:47:52 +03:00
David Cernat
3ed9d89280 [General] Use separate variables for video & music filenames in packets 2018-07-07 14:40:35 +03:00
David Cernat
c075496748 [General] Replace deathReason in death packets with a killer variable
Add serverside script functions for determining the killers of both players and actors.

Use unsigned ints for script functions returning an object or actor's refNumIndex or mpNum.

Remove updateDeadState() from LocalPlayer and make its code part of updateStatsDynamic() for simplicity.
2018-07-05 22:24:51 +03:00
David Cernat
f02492a593 [General] Temporarily include target names in mwmp::Target
These will be removed once the server can get the names matching refIds by reading content files.
2018-07-05 19:40:28 +03:00
David Cernat
32ad8ef2f0 [General] Fix incorrect capitalization in ObjectMove directives 2018-07-05 06:07:10 +03:00
David Cernat
bbb461a5e5 [General] Make sure data in guiMessageBox is compressed 2018-07-05 02:56:32 +03:00
Koncord
79903c455c [General] Allow different types for vectorContains 2018-07-04 01:31:45 +08:00
Koncord
1f4e6e9114 [General] Add integrity checks to Handshake packet 2018-07-03 18:41:03 +08:00
Koncord
f9ff5f10df [General] Reduce packets size and add integrity checks 2018-07-03 18:41:03 +08:00
Koncord
fa2bf0663e [General] Simplify vectorContains 2018-07-03 18:41:03 +08:00
Koncord
c69819e0db [General] Change type of refNumIndex & mpNum to unsigned 2018-07-03 03:34:30 +08:00
Koncord
99158beb2e [General] Change effectCount type to unsigned 2018-07-03 03:32:46 +08:00
Koncord
779f2a564d [General] Change "unsigned long" to uint32_t for cross platform compatibility 2018-07-03 03:04:41 +08:00
Koncord
23684489da [General] Fix clang-tidy warning
Converting integer literal to bool, use bool literal instead
2018-07-03 02:50:21 +08:00
Koncord
7639db02f3 [General] RW functions return true on success 2018-07-03 02:28:20 +08:00
Koncord
45c7c3a0b6 [General] Add integrity checks to PacketPreInit 2018-07-03 02:21:36 +08:00
Koncord
d999cc0d55 [General] Add packetValid flag to packets 2018-07-03 02:06:52 +08:00
Koncord
695fb7d4a7 [General] Reorder RW(string) arguments
Change limit of default max string size to 64 KiB
2018-07-03 01:12:59 +08:00
Koncord
d162f6fd3a [General] Explicitly use limitations of the master server 2018-07-02 23:29:07 +08:00
Koncord
a48d5b48ef [General] Add maxSize parameter to RW(std::string)
Minor type changes
2018-07-02 23:19:39 +08:00
David Cernat
bef53749ed [General] Replace BaseObject's hasMaster variable with isSummon
Additionally, add a GetObjectSummonState() script function to the server.
2018-07-02 02:25:06 +03:00
David Cernat
958b220835 [General] Send summon duration to server in ObjectSpawn packets 2018-07-01 00:43:29 +03:00
David Cernat
9102df7fde [General] Make WorldCollisionOverride also work with specific refIds
For now, this only makes it possible to enforce collision for specific refIds for placed objects.
2018-06-28 04:53:00 +03:00
David Cernat
c7f10892a9 [General] Add vectorContains util for checking strings in vectors 2018-06-28 04:50:01 +03:00