David Cernat
524363702c
Merge pull request #451 from TES3MP/0.6.3 while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/Networking.cpp
# apps/openmw-mp/main.cpp
# apps/openmw-mp/processors/object/ProcessorObjectDelete.hpp
2018-06-21 22:31:10 +03:00
David Cernat
c3c7f2c8f9
[Server] Don't automatically synchronize ObjectDelete packets
2018-06-20 02:00:12 +03:00
David Cernat
176aa62b15
Merge pull request #446 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Cells.cpp
apps/openmw-mp/Script/Functions/Cells.hpp
apps/openmw-mp/Script/Functions/Worldstate.cpp
apps/openmw-mp/Script/Functions/Worldstate.hpp
apps/openmw-mp/Script/ScriptFunctions.hpp
apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp
apps/openmw/mwmp/processors/player/ProcessorPlayerMap.hpp
components/openmw-mp/Base/BasePlayer.hpp
components/openmw-mp/Packets/Player/PacketPlayerMap.hpp
components/openmw-mp/Packets/Worldstate/PacketWorldMap.cpp
2018-06-07 23:23:19 +03:00
David Cernat
72862dc255
[General] Turn PlayerMap into WorldMap, now a Worldstate packet
2018-06-07 12:51:45 +03:00
David Cernat
3f7e163c92
Merge pull request #439 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/CMakeLists.txt
apps/openmw-mp/Script/Functions/GUI.cpp
apps/openmw-mp/Script/Functions/GUI.hpp
apps/openmw-mp/Script/Functions/Worldstate.cpp
apps/openmw-mp/Script/Functions/Worldstate.hpp
apps/openmw-mp/processors/worldstate/ProcessorRecordDynamic.hpp
apps/openmw/mwmp/processors/worldstate/ProcessorRecordDynamic.hpp
components/CMakeLists.txt
components/openmw-mp/Packets/Player/PacketGUIBoxes.cpp
2018-05-25 06:34:07 +03:00
David Cernat
0be6de6607
[General] Turn RecordDynamic into a Worldstate packet
2018-05-23 07:48:28 +03:00
David Cernat
8a393d2984
Merge pull request #430 from TES3MP/0.6.3 while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/Networking.cpp
# apps/openmw-mp/Networking.hpp
# components/CMakeLists.txt
2018-05-18 08:12:28 +03:00
David Cernat
43a944ddaf
[General] Add and implement new Worldstate packet type
2018-05-18 06:40:28 +03:00
David Cernat
b5922d18fd
Merge pull request #428 from TES3MP/0.6.3 while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/Networking.cpp
# apps/openmw-mp/Script/Functions/Objects.cpp
# apps/openmw-mp/Script/Functions/Objects.hpp
# apps/openmw-mp/processors/ObjectProcessor.cpp
# apps/openmw-mp/processors/object/ProcessorContainer.hpp
# apps/openmw-mp/processors/object/ProcessorDoorState.hpp
# apps/openmw-mp/processors/object/ProcessorMusicPlay.hpp
# apps/openmw-mp/processors/object/ProcessorObjectAnimPlay.hpp
# apps/openmw-mp/processors/object/ProcessorObjectDelete.hpp
# apps/openmw-mp/processors/object/ProcessorObjectLock.hpp
# apps/openmw-mp/processors/object/ProcessorObjectMove.hpp
# apps/openmw-mp/processors/object/ProcessorObjectPlace.hpp
# apps/openmw-mp/processors/object/ProcessorObjectRotate.hpp
# apps/openmw-mp/processors/object/ProcessorObjectScale.hpp
# apps/openmw-mp/processors/object/ProcessorObjectSpawn.hpp
# apps/openmw-mp/processors/object/ProcessorObjectState.hpp
# apps/openmw-mp/processors/object/ProcessorObjectTrap.hpp
# apps/openmw-mp/processors/object/ProcessorScriptGlobalFloat.hpp
# apps/openmw-mp/processors/object/ProcessorScriptGlobalShort.hpp
# apps/openmw-mp/processors/object/ProcessorScriptLocalFloat.hpp
# apps/openmw-mp/processors/object/ProcessorScriptLocalShort.hpp
# apps/openmw-mp/processors/object/ProcessorScriptMemberFloat.hpp
# apps/openmw-mp/processors/object/ProcessorScriptMemberShort.hpp
# apps/openmw-mp/processors/object/ProcessorVideoPlay.hpp
# apps/openmw/mwmp/Networking.cpp
# apps/openmw/mwmp/processors/object/BaseObjectProcessor.hpp
# apps/openmw/mwmp/processors/object/ProcessorMusicPlay.hpp
# apps/openmw/mwmp/processors/object/ProcessorScriptGlobalFloat.hpp
# apps/openmw/mwmp/processors/object/ProcessorScriptGlobalShort.hpp
# apps/openmw/mwmp/processors/object/ProcessorScriptMemberFloat.hpp
# apps/openmw/mwmp/processors/object/ProcessorScriptMemberShort.hpp
# apps/openmw/mwmp/processors/object/ProcessorVideoPlay.hpp
2018-05-16 06:28:24 +03:00
David Cernat
02d8e08c58
[Server] Rename WorldProcessor into ObjectProcessor
2018-05-15 22:07:06 +03:00
David Cernat
d4dbfdfdb6
Merge pull request #423 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Networking.cpp
apps/openmw-mp/Script/Functions/World.cpp
apps/openmw-mp/Script/Functions/World.hpp
apps/openmw-mp/processors/WorldProcessor.cpp
apps/openmw-mp/processors/WorldProcessor.hpp
apps/openmw-mp/processors/world/ProcessorContainer.hpp
apps/openmw-mp/processors/world/ProcessorDoorState.hpp
apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp
apps/openmw-mp/processors/world/ProcessorObjectLock.hpp
apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp
apps/openmw-mp/processors/world/ProcessorObjectScale.hpp
apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp
apps/openmw-mp/processors/world/ProcessorObjectState.hpp
apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp
apps/openmw/mwgui/container.cpp
apps/openmw/mwmp/Networking.cpp
apps/openmw/mwmp/ObjectList.cpp
apps/openmw/mwmp/ObjectList.hpp
apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
components/CMakeLists.txt
components/openmw-mp/Base/BaseObject.hpp
components/openmw-mp/Packets/Object/ObjectPacket.cpp
components/openmw-mp/Packets/Object/PacketConsoleCommand.cpp
components/openmw-mp/Packets/Object/PacketContainer.cpp
components/openmw-mp/Packets/Object/PacketDoorState.hpp
components/openmw-mp/Packets/Object/PacketMusicPlay.hpp
components/openmw-mp/Packets/Object/PacketObjectAnimPlay.hpp
components/openmw-mp/Packets/Object/PacketObjectLock.hpp
components/openmw-mp/Packets/Object/PacketObjectMove.hpp
components/openmw-mp/Packets/Object/PacketObjectPlace.hpp
components/openmw-mp/Packets/Object/PacketObjectRotate.hpp
components/openmw-mp/Packets/Object/PacketObjectScale.hpp
components/openmw-mp/Packets/Object/PacketObjectSpawn.hpp
components/openmw-mp/Packets/Object/PacketObjectState.hpp
components/openmw-mp/Packets/Object/PacketObjectTrap.hpp
components/openmw-mp/Packets/Object/PacketScriptGlobalShort.hpp
components/openmw-mp/Packets/Object/PacketScriptLocalFloat.hpp
components/openmw-mp/Packets/Object/PacketScriptLocalShort.hpp
components/openmw-mp/Packets/Object/PacketScriptMemberShort.hpp
components/openmw-mp/Packets/Object/PacketVideoPlay.hpp
2018-05-13 03:20:01 +03:00
David Cernat
78234f9071
[General] Rename Event into ObjectList & WorldObject into BaseObject
2018-05-13 00:42:24 +03:00
David Cernat
672bb707a7
Merge pull request #422 from TES3MP/0.6.3 while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/Networking.cpp
# apps/openmw-mp/Networking.hpp
# apps/openmw-mp/Script/Functions/World.cpp
# apps/openmw-mp/processors/WorldProcessor.cpp
# apps/openmw-mp/processors/WorldProcessor.hpp
# apps/openmw-mp/processors/world/ProcessorContainer.hpp
# apps/openmw-mp/processors/world/ProcessorDoorState.hpp
# apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp
# apps/openmw-mp/processors/world/ProcessorObjectLock.hpp
# apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp
# apps/openmw-mp/processors/world/ProcessorObjectScale.hpp
# apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp
# apps/openmw-mp/processors/world/ProcessorObjectState.hpp
# apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp
# apps/openmw/mwmp/Networking.cpp
# components/CMakeLists.txt
# components/openmw-mp/Controllers/ObjectPacketController.hpp
# components/openmw-mp/Controllers/WorldPacketController.cpp
# components/openmw-mp/Packets/Object/ObjectPacket.cpp
# components/openmw-mp/Packets/Object/ObjectPacket.hpp
# components/openmw-mp/Packets/Object/PacketConsoleCommand.hpp
# components/openmw-mp/Packets/Object/PacketContainer.hpp
# components/openmw-mp/Packets/Object/PacketDoorState.hpp
# components/openmw-mp/Packets/Object/PacketMusicPlay.hpp
# components/openmw-mp/Packets/Object/PacketObjectAnimPlay.hpp
# components/openmw-mp/Packets/Object/PacketObjectDelete.hpp
# components/openmw-mp/Packets/Object/PacketObjectLock.hpp
# components/openmw-mp/Packets/Object/PacketObjectMove.hpp
# components/openmw-mp/Packets/Object/PacketObjectPlace.hpp
# components/openmw-mp/Packets/Object/PacketObjectRotate.hpp
# components/openmw-mp/Packets/Object/PacketObjectScale.hpp
# components/openmw-mp/Packets/Object/PacketObjectSpawn.hpp
# components/openmw-mp/Packets/Object/PacketObjectState.hpp
# components/openmw-mp/Packets/Object/PacketObjectTrap.hpp
# components/openmw-mp/Packets/Object/PacketScriptGlobalShort.hpp
# components/openmw-mp/Packets/Object/PacketScriptLocalFloat.hpp
# components/openmw-mp/Packets/Object/PacketScriptLocalShort.hpp
# components/openmw-mp/Packets/Object/PacketScriptMemberShort.hpp
# components/openmw-mp/Packets/Object/PacketVideoPlay.hpp
2018-05-12 20:35:34 +03:00
David Cernat
6bf3a0be1e
[General] Rename WorldPackets into ObjectPackets for clarity
2018-05-12 19:40:00 +03:00
David Cernat
c5f33e451f
Merge pull request #418 from TES3MP/0.6.3 while resolving conflicts
2018-05-10 22:33:36 +03:00
David Cernat
715012f087
[General] Implement sending of image data for map tiles in PlayerMap
2018-05-08 05:57:04 +03:00
David Cernat
502751cae0
Merge pull request #413 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp
components/openmw-mp/Base/BasePlayer.hpp
components/openmw-mp/Packets/Player/PacketPlayerEquipment.hpp
components/openmw-mp/Packets/Player/PacketPlayerSkill.cpp
2018-04-29 06:46:28 +03:00
David Cernat
66d5109509
[General] Fix information exchange for players sharing a cell
...
Previously, two players entering the same cell only sent and received their latest changes for dynamic stats, attributes, skills and equipment when they started sharing that cell.
2018-04-26 21:56:14 +03:00
David Cernat
28f1c1b0d3
[General] Rework CharGen slightly for clarity purposes
...
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.
(cherry picked from commit 926106cf8c
)
2018-04-19 13:25:29 +03:00
David Cernat
f50637bdd4
Merge pull request #401 from TES3MP/0.6.3 while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/processors/world/ProcessorContainer.hpp
# apps/openmw/mwmp/WorldEvent.cpp
2018-04-03 02:17:12 +03:00
David Cernat
76468dc8c6
[Server] Remove remnant of hardcoded container sync
2018-04-03 01:35:07 +03:00
David Cernat
3d5860d6f4
Merge pull request #396 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Player.cpp
apps/openmw-mp/Script/Functions/Settings.cpp
apps/openmw-mp/Script/Functions/Settings.hpp
apps/openmw-mp/Script/Functions/World.cpp
apps/openmw-mp/Script/Functions/World.hpp
apps/openmw/mwgui/container.cpp
apps/openmw/mwmp/LocalActor.cpp
apps/openmw/mwmp/LocalPlayer.cpp
apps/openmw/mwmp/WorldEvent.cpp
apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
components/openmw-mp/Base/BaseEvent.hpp
components/openmw-mp/Log.cpp
components/openmw-mp/Log.hpp
2018-03-30 09:32:43 +03:00
David Cernat
5f6ddcfc59
[General] Rework container sync to prevent item duping
...
A main priority in TES3MP development is to avoid making major changes to OpenMW code, so as to avoid merge conflicts in the future. Whenever avoiding potential conflicts seems especially difficult for the proper implementation of a particular multiplayer feature, that multiplayer feature is often put off until later or partially implemented with the intent of being revisited in the future.
Container sync is the perfect example. Previously, the OpenMW code for container actions was kept exactly as it was, with clients unilaterally accepting their own container changes as per singleplayer-specific code, with only the addition that clients sent container packets every time they made a change in a container, packets which were then forwarded unquestioningly by the server to other players. This meant that two players clicking on the same item in a container at the same time both managed to take it, thus duplicating the item.
Immediately after the packets were already forwarded, server scripts were able to check for incorrect changes, such as the removal of more items than should have existed in a container, but they had to send their own packets that attempted to fix what had already been accepted on the initial client and then forwarded to all clients, which was quite onerous in some scenarios, such as when a player on a slow connection immediately dropped items in the world after taking them from a container (which is why the default TES3MP serverside scripts made no attempt at sending corrective packets at all, preferring to expect the matter to be solved in a later C++ implementation).
This commit fixes item duping in containers by preventing container actions from initially running on clients and by ending the automatic forwarding of container packets by the server. Instead, clients now send container packets that act as requests for container actions, and serverside scripts have to forward these requests themselves. In other words, without a matching Container event in the server's Lua scripts, players are completely unable to affect containers for themselves or for others.
To forward a received Container packet, the following line must be used in a Container event in the Lua scripts:
tes3mp.SendContainer(true, true)
When an invalid action count is used in a container request, the serverside scripts can amend it using the following new function:
tes3mp.SetReceivedContainerItemActionCount(objectIndex, itemIndex, actionCount)
Thus, the serverside scripts are able to allow only container actions that are correct based on their own recorded contents for that container.
The OpenMW code allowing unilateral container actions in mwgui/container.cpp is now prevented from executing. When a player's container request is returned to them, code in mwmp/WorldEvent.cpp simulates those container actions instead.
2018-03-26 19:27:36 +03:00
David Cernat
b2a3dd9d60
Revert "[Server] Add previous state to ON_RECORD_DYNAMIC"
...
This reverts commit 2ac01dc02a
.
Commit 2ac01dc02a
had confused the ON_RECORD_DYNAMIC event meant for custom items with a hypothetical ON_PLAYER_STATS_DYNAMIC event meant for dynamic player stats and had added functionality appropriate for the latter.
ON_PLAYER_STATS_DYNAMIC was never implemented because it would have caused too much event spam, with it constantly being triggered by any running player losing fatigue. If it ends up being added, the reverted lines from 2ac01dc02a
should be added to it instead.
2018-03-09 21:14:56 +02:00
Koncord
2ac01dc02a
[Server] Add previous state to ON_RECORD_DYNAMIC
2018-03-05 15:40:38 +08:00
Koncord
4aff1f1833
[Server] Add previous state to ON_PLAYER_SKILL
...
That is array of struct with next content: {base, current, mod, damage, progress}
2018-03-05 15:30:24 +08:00
Koncord
017956366f
[Server] Add previous state argument to ON_PLAYER_ATTRIBUTE event
...
That is array of struct with next content: {base, current, mod, damage}
2018-03-05 15:19:09 +08:00
Koncord
afbafdf806
[Server] Add PreReading virtual method
...
add "const" qualifier to exteriorCellPattern
2018-03-05 15:15:39 +08:00
Koncord
54945b537d
[Server] Get rid handwritten ids in GUI API
2018-02-16 06:08:36 +08:00
Koncord
4bde7d80f5
[Server] Use regular Ptrs where possible to avoid seizure Ptrs by lua
2018-02-16 05:12:01 +08:00
David Cernat
ac374a8ef9
Merge pull request #384 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Player.cpp
apps/openmw-mp/Script/Functions/Mechanics.cpp
apps/openmw-mp/Script/Functions/Mechanics.hpp
apps/openmw-mp/Script/Functions/Quests.cpp
apps/openmw-mp/Script/Functions/Quests.hpp
apps/openmw-mp/Script/ScriptFunctions.hpp
apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp
apps/openmw/mwmp/LocalPlayer.hpp
apps/openmw/mwmp/WorldEvent.cpp
apps/openmw/mwworld/worldimp.cpp
components/openmw-mp/Base/BasePlayer.hpp
2018-02-12 06:50:52 +02:00
David Cernat
88ae0772cf
[Server] Initialize new processors and fix issues with RecordDynamic
2018-01-30 22:51:35 +02:00
David Cernat
5858e05362
Merge pull request #378 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/CMakeLists.txt
apps/openmw-mp/Script/ScriptFunctions.hpp
components/CMakeLists.txt
2018-01-30 00:54:56 +02:00
David Cernat
02af7f6ba1
[General] Add placeholders for new packet types
2018-01-29 22:32:51 +02:00
Koncord
c4949ac5d9
[General] Change regular enums to enum class
2018-01-02 12:44:53 +08:00
David Cernat
09958681cd
Merge pull request #363 from TES3MP/0.6.2 while resolving conflicts, 2nd try
2018-01-01 12:04:25 +02:00
Koncord
aff1859759
[Server] Add new line for help strings
2017-12-10 09:47:35 +08:00
Koncord
dd352f0a91
[Server] Improve Player::sendToLoaded()
2017-12-09 15:03:06 +08:00
Koncord
f35d35741e
[General] Remove redundant code
...
Remove BaseEvent::worldObjectCount
Remove BaseActor::count
Use foreach loops in packets and processors
Remove redundant "&" in CellController::get().getCell() calls
2017-12-09 14:59:41 +08:00
Koncord
ff8b5061b4
[Server] Modernize CellController singleton
2017-12-09 11:08:53 +08:00
Koncord
e97dac7793
[Server] Mark derived processor classes as final
2017-12-09 10:20:55 +08:00
Koncord
aa183e6844
[General] Introduce chat channels
2017-12-08 07:43:29 +08:00
Koncord
c55f0f73b8
[Server] Pass shared_ptr<Player> by reference
2017-12-08 07:32:49 +08:00
Koncord
e657934cef
[Server] Add custom window API
2017-11-25 23:47:02 +08:00
David Cernat
64b57983f0
[General] Add TRACE log messages in player processors
2017-11-24 09:43:45 +02:00
David Cernat
926106cf8c
[General] Rework CharGen slightly for clarity purposes
...
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.
2017-11-13 05:33:27 +02:00
Koncord
64b531aa3c
[Server] Remove redundant argument
2017-11-07 06:37:09 +08:00
David Cernat
50d5fffb7f
[General] Add and implement PlayerQuickKeys packet
2017-10-25 07:21:00 +03:00
David Cernat
76a4abd7c0
Merge pull request #325 from TES3MP/master while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp
2017-10-24 19:45:11 +03:00
David Cernat
3aedc2e5bc
[Server] Don't automatically share PlayerTopic packets between players
2017-10-23 19:39:35 +03:00