Commit Graph

85 Commits (master)

Author SHA1 Message Date
Dave Corley aba639e601
Fix(Client): Fix rotation order for received onObjectRotate packets 1 year ago
David Cernat 6b1c83f629 [Client] Fix iteration through summoned creature map in ObjectList 3 years ago
David Cernat a6dd76776f [Client] Include refId in ObjectList's object searches 3 years ago
David Cernat cc8c222d18 [General] Combine CellStore's exact object searches 3 years ago
David Cernat a95099cd03 [Client] Use item model's items for Container packet sent from Take All
Previously, a Container packet sent when using the Take All button included all the items in the container, not just all the items in the container window seen on the client. This was a problem when stealing from actors, as the container window does not give access to all of their items.
3 years ago
David Cernat abdaedd752 [Client] Rely on untranslated topics in ObjectDialogueChoice packets
Previously, when using the Russian edition, all dialogue topics were translated into English before being sent to the server in an ObjectDialogueChoice packet and were then translated back into Russian when received again by the client. However, there were situations where different topics in English corresponded to the same Russian word, e.g. "chores" and "duties" were both translated as "задания", which led to the incorrect topic being used on the client in the end.

This commit makes it so that users of the Russian edition send ObjectDialogueChoice packets where the topicId variable contains both the untranslated topic and the translated one, delimited by a | character, with the client simply using the former when receiving the packet again.

This is a hotfix instead of the proper fix, as the proper fix would use different variables for the two versions of the topic and thus require the structure of the ObjectDialogueChoice packet to change.
3 years ago
David Cernat 4aa947ff4b [Client] Prevent player from auto-equipping items taken from containers 3 years ago
David Cernat 1cb10cd1f2 [Client] Use new exact search with ObjectActivate & ObjectDialogueChoice 3 years ago
David Cernat 7393e3def6 [General] Add and use getShortDescription() for ESM::Cell
ESM::Cell's getDescription() method was modified by aa5161f99e despite being used heavily by TES3MP. All instances of it in the TES3MP code have now been changed into the newly added getShortDescription() that is identical to the previous getDescription().
3 years ago
David Cernat a7f517507c [Client] Handle reenabling of harvested objects via Container packet
It is no longer necessary to send ObjectState packets when harvesting objects, as the Container packet will handle the refreshing of those objects' animations instead.
4 years ago
David Cernat b3c40913f6 [Client] Remove 'using namespace std' from multiplayer-related code
This brings TES3MP in line with https://gitlab.com/OpenMW/openmw/-/merge_requests/664
4 years ago
David Cernat db32f7f9f8 [Client] Use ObjectDialogueChoice for highlighted topics in dialogue
The packet is now sent not just for items in the list on the right of the dialogue screen, but also for the clickable topics in the dialogue text itself.
4 years ago
David Cernat 1a4b817b31 [General] Rework ObjectDialogueChoice for multilingual compatibility
Use a different system for sending and applying ObjectDialogueChoice packets.
4 years ago
David Cernat 9dcb0f4c32 [General] Implement ObjectDialogueChoice packet 4 years ago
David Cernat 68837aaf4a Add OpenMW commits up to 15 Oct 2020
# Conflicts:
#   .travis.yml
#   CI/before_script.linux.sh
#   CMakeLists.txt
#   apps/openmw/mwgui/containeritemmodel.cpp
#   apps/openmw/mwgui/tradewindow.cpp
#   apps/openmw/mwphysics/actor.cpp
#   apps/openmw/mwworld/actionteleport.cpp
#   apps/openmw/mwworld/containerstore.cpp
4 years ago
David Cernat 0eedf8fd9f Add OpenMW commits up to 30 Sep 2020
# Conflicts:
#   apps/openmw/mwmechanics/aicombat.cpp
#   apps/openmw/mwmechanics/character.cpp
#   apps/openmw/mwmechanics/summoning.cpp
#   components/CMakeLists.txt
4 years ago
David Cernat d3f23220de [Client] Only require cellStore for ConsoleCommand packets with objects 5 years ago
David Cernat 5e6218ad6d [General] Modernize handling of client script local variables in packets
Disable placeholder handling of client script member variables.
5 years ago
David Cernat ea57aaef34 [Client] Fix compilation error on Linux regarding Timestamp constructor 5 years ago
David Cernat 3c51f1c23a [General] Include last gold restock time in ObjectMiscellaneous packets 5 years ago
David Cernat 23ff7b9610 [General] Synchronize gold pools for traders via ObjectMiscellaneous 5 years ago
David Cernat 001d63b59b [Client] Keep extra item data when adding items to player via Take All 5 years ago
David Cernat 907c5fc6de Merge branch '0.7.1-summons-ordering' into 0.7.1 5 years ago
uramer ee84868b7d [Client] Fix double summoning magical effects 5 years ago
uramer 3476bd7d04 [Client] Play sounds at fixed position if the object is in current cell 5 years ago
David Cernat 27d35d73a2 [General] Implement OnObjectSound packet
Many interactions between players and objects now have their sounds sent to other players.
5 years ago
David Cernat 4b69d1cc51 [Client] Play sound for object placements where droppedByPlayer is true 5 years ago
David Cernat 8b2bf941cd [Client] Only play trap disarm sounds when the server approves disarming 5 years ago
David Cernat ab794f0068 [General] Add handling of longs to ClientScriptLocal
Use better wording in comments related to ClientScriptLocal and ClientScriptGlobal.
5 years ago
David Cernat 8db396d10a [General] Distinguish between shorts & longs in ClientScriptGlobal
Adjust ClientScriptLocal so it refers to its previously handled integers as shorts.
5 years ago
David Cernat a4b10c75e1 [Client] Remove unneccessary addConsoleCommandObject() from ObjectList 5 years ago
David Cernat 643c979d31 [Client] Use getBaseObjectFromPtr() whenever possible in ObjectList 5 years ago
David Cernat abd18745df [General] Include ScriptLocalFloat as part of ClientScriptLocal 5 years ago
David Cernat b97fa7553c [Client] Remove variable redeclarations 5 years ago
David Cernat 4841c1ad4c [General] Rename ScriptLocalShort into ClientScriptLocal 5 years ago
David Cernat 038c5b8231 [Client] Rename ObjectList's addObject() into addBaseObject() 5 years ago
David Cernat 296c04af71 [Client] Combine ObjectList's getBaseObject() and getObjectFromPtr() 5 years ago
David Cernat 975797c09b [General] Implement ObjectRestock packet
Restocking object containers via trading now requires the server to send back an ObjectRestock packet before it can happen.

The unused packet ID ID_SCRIPT_GLOBAL_FLOAT has been replaced with ID_OBJECT_RESTOCK.
5 years ago
David Cernat 59a38164ea [Client] Add generic objects to ObjectList using addObjectGeneric() 5 years ago
David Cernat 989188c171 [Client] Remove ObjectList's confusing addObjectDelete() function 5 years ago
David Cernat 32b5529e18 [Client] Use check with clearer logic in ObjectList::editContainers() 5 years ago
David Cernat d2ba4a12d9 [Client] Simplify container sending with new addContainerItem() methods 5 years ago
David Cernat 51f0acbaf5 [Client] Improve logging for Container packets 5 years ago
David Cernat b0b51dc4d5 [Client] Don't print sending of console command packets 5 years ago
David Cernat e6c626f127 [General] Move handling of client globals to ClientScriptGlobal packet
ClientScriptGlobal is a new Worldstate packet that handles short, long and float values for global variables in clientside scripts.

Previously, short values were handled by the ScriptGlobalShort packet, while a partially implemented ScriptGlobalFloat packet also existed, but both of those packets were Object packets because they were added near the end of 2016 when only Player and Object packets existed (with the latter actually being called WorldEvent packets at the time). Both ScriptGlobalShort and ScriptGlobalFloat have now been removed.

The serverside script functions previously used to interact with ScriptGlobalShort have, however, been kept so they can be adjusted to work with local variables in clientside scripts instead in a future commit.
5 years ago
David Cernat bc093c8596 [General] Implement OnObjectHit packet, part 2
ObjectHit is now also sent when local actors succeed or fail in hitting other actors with melee attacks, with the packet including the success state of their attack.

It is also sent when creatures hit a non-actor object.
5 years ago
David Cernat 96049befe9 [Client] Add and use getObjectFromPtr() method in ObjectList 5 years ago
David Cernat 2973cc4f4d [General] Implement OnObjectHit packet, part 1
ObjectHit is now sent when an NPC hits a non-actor object.
5 years ago
David Cernat eeb77f80d2 [Client] Send ConsoleCommand packets when console is used 5 years ago
David Cernat cd444f8707 [Client] Send actor equipment after Container packet causes autoEquip
Previously, a Container packet with a SET action for an actor would clear their entire InventoryStore, also clearing all of their equipment slots. The actor's authority would then autoEquip new equipment for the actor, but that new equipment would not actually get sent to the other players. As a result, they would see the actor fighting with hand-to-hand attacks, while also not actually wearing anything despite being rendered as wearing the same clothes and armor as before.

This commit makes the actor's authority resend the actor's equipment as soon as the Container packet has caused the autoEquip to happen.
5 years ago