Commit Graph

4096 Commits (8f90f8a3b8696a2cc92860d825d2f87dcb498465)

Author SHA1 Message Date
David Cernat f100a660d4 [General] Fix ranged attack sync when using last throwing weapon or ammo 6 years ago
David Cernat 995d20348f [General] Always use correct ranged weapon & ammo for ranged attack sync
Previously, the player's currently selected weapon was being used in ranged attacks as in the original melee-oriented attack sync, which meant that shooting one type of projectile and then equipping another while the old projectile was still in the air turned the old projectile into the new projectile upon impact.

Additionally, avoid running most of the code in MechanicsHelper::assignAttackTarget() for non-hitting melee and ranged attacks.
6 years ago
David Cernat db39c62e89 [Documentation] Update credits 6 years ago
David Cernat b5f46ada73 [General] Synchronize projectile speed for ranged attacks
This is done by including the final attackStrength used for ranged attacks in packets and then applying it in WeaponAnimation::releaseArrow() on other clients.
6 years ago
David Cernat fcd31bf4a6 [General] Fix problems with the synchronization of ranged attacks
Projectile hits now send Attack packets with RANGED attacks, and their success or failure is now synchronized.

Strike enchantments no longer require a valid victim to be synchronized.

Additional debug messages have been added for attacks.
6 years ago
David Cernat 8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 6 years ago
David Cernat 3bd8aa82fe [General] Reduce inventory-sending hooks to just 2 in ContainerStore
Whenever an item is added to or removed from the player's ContainerStore, that player sends a PlayerInventory packet with just that addition or removal.

This eliminates all the unnecessary packet spam related to oversized PlayerInventory packets that had existed in one form or another since the initial implementation of inventory sync in 1b259e2d33

Additionally, move booleans from BasePlayer to LocalPlayer when they are only needed on the client, and make the usage of the isReceivingQuickKeys boolean consistent with the new isReceivingInventory boolean by having them both in the processors of their associated packets.
6 years ago
David Cernat a083439139 Merge pull request #469 from davidcernat/master while resolving conflicts
# Conflicts:
#	apps/openmw/main.cpp
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwdialogue/dialoguemanagerimp.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwscript/dialogueextensions.cpp
#	apps/openmw/mwworld/worldimp.hpp
6 years ago
Marc Zinnschlag b67b17010d Merged pull request #1826 6 years ago
Andrei Kortunov ec9a1b0d05 Handle RootCollisionNode, attached to non-root node (bug #4311) 6 years ago
David Cernat 8df08c7d10 [General] Implement PlayerItemUse packet
Players can no longer unilaterally use items on themselves in their inventory. When they try to use an item, they send a PlayerItemUse packet to the server with the item's details. A serverside script can then check the item and either send the packet back to make the item use go through or drop it.
6 years ago
Bret Curtis 03bf599426
Merge pull request #1856 from Capostrophic/hidden
Revert untextured shapes rendering changes
6 years ago
Capostrophic 348c6f848e
Fix a bunch of MSVC warnings 6 years ago
Capostrophic 85208eff7f Revert untextured shapes rendering changes 6 years ago
Capostrophic bda23c6ad6 Fix nodemask 6 years ago
Capostrophic a1e3b2e586 Don't render NiTriShapes without NiTexturingProperty (bug #4483) 6 years ago
Andrei Kortunov 1f4dd3b393 Make partial binary search case insensitive, as it supposed to be (bug #4558) 6 years ago
David Cernat 888e1dfff8 [General] Allow setting of AI fight & dynamic stats in record packets
Additionally, allow the setting of the Autocalc flag for an NPC record based on an existing record.
6 years ago
Marc Zinnschlag 452a706047 Merged pull request #1837 6 years ago
Andrei Kortunov e2519226aa Move boost include 6 years ago
Andrei Kortunov c2a175c2e0 Move crash catcher wrapper to separate file 6 years ago
Andrei Kortunov ac98797999 Add missing file 6 years ago
Andrei Kortunov c454f1bdad Use log file for editor (feature #4012) 6 years ago
Andrei Kortunov 369ea7e177 Check if a temporary file was successfully closed 7 years ago
Andrei Kortunov 12144de8ed Initialize missing variables 7 years ago
Andrei Kortunov 469bb29621 Do not try to handle shape controllers as node controllers 7 years ago
David Cernat 8c40010c87 [General] Add missing inventoryBaseId to creatures in RecordDynamic 7 years ago
David Cernat b57807407a [General] Implement RecordDynamic packet, part 1
Spell, potion, enchantment, creature, NPC, armor, book, clothing, miscellaneous and weapon record data can now be sent in a RecordDynamic packet. Additionally, the packets include data related to associated magical effects (for spells, potions and enchantments), data related to default inventory contents (for creatures and NPCs) and data related to body parts affected (for armor and clothing).

The server now has associated script functions for setting most of the details of the above, with the main exception being individual creature and NPC stats.

Records can either be created entirely from scratch or can use an existing record (set via the baseId variable) as a starting point for their values. In the latter case, only the values that are specifically set override the starting values. Creature and NPC records also have an inventoryBaseId that can be used on top of the baseId to base their inventories on another existing record.

The client's RecordHelper class has been heavily expanded to allow for the above mentioned functionality.

When players create spells, potions and enchantments as part of regular gameplay, they send RecordDynamic packets that provide the server with the complete details of the records that should be created. When they create enchantments, they also provide the server with armor, book, clothing and weapon records corresponding to the items they've enchanted.

This functionality added by this packet was originally supposed to be exclusive to the rewrite, but I've gone ahead and tried to provide it for the pre-rewrite in a way that can mostly be reused for the rewrite.
7 years ago
Andrei Kortunov 7e0df01c83 Do not optimize animated shapes (bug #3950) 7 years ago
David Cernat 2dbf3893c0 [General] Compress item refIds in PlayerEquipment packets 7 years ago
David Cernat d93b67ef21 [General] Sync soul refIds for items and add related script functions 7 years ago
David Cernat c3ff273a22 [General] Add getVectorSize() and resetVector() to Utils 7 years ago
David Cernat b4802e4201 [General] Use Time struct for time in BaseWorldstate 7 years ago
David Cernat a4b588d1b5 [General] Add optional timestamps to journal entries in PlayerJournal 7 years ago
David Cernat ea8a41160c [General] Make ActorAttack packet consistent with PlayerAttack
Additionally, fix a typo in PlayerAttack where a boolean argument was outside of the parentheses it should have been in.
7 years ago
David Cernat 8fbed1f808 [General] Remove custom data from PlayerSpellbook packet
It has never made sense to have custom spell data in PlayerSpellbook packets, so it has been removed.
7 years ago
David Cernat 63a86f145d [Client] Record type of each InterpreterContext for later checking 7 years ago
David Cernat 3165c84db4 [General] Rework PACKET_ORIGIN enum
Additionally, comment out reading of originClientScript in ObjectPacket for now.
7 years ago
David Cernat 9e6459043b [General] Fix typo related to originClientScript in ObjectPacket 7 years ago
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.
7 years ago
David Cernat 715cac807d [General] Add compareFloats to Utils 7 years ago
David Cernat cb6c37a26d [General] Replace doubles with floats in BaseStructs and BaseWorldstate 7 years ago
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.
7 years ago
David Cernat 20e0100706 [General] Rework Attack packets and add synchronization for item magic 7 years ago
David Cernat 21d5bb4d4e
Merge pull request #460 from OpenMW/master
Add 0.7.0 commits up to 20 Jul 2018
7 years ago
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.
7 years ago
David Cernat 9823a77bf2 [General] Turn PlayerRegionAuthority into WorldRegionAuthority
WorldRegionAuthority is a Worldstate packet.
7 years ago
David Cernat 72d286473b [General] Move credits integrity error message to new ErrorMessages file
Additionally, use correct log level for credit integrity message on server.
7 years ago
David Cernat 0b5cb15f71 [General] Turn GameWeather into WorldWeather, now a WorldstatePacket 7 years ago
David Cernat 646111d998 [General] Use correct credits checksum and move it to Version.hpp 7 years ago