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
6bb2a7e24a
Merge pull request #444 from TES3MP/0.6.3 while resolving conflicts
2018-06-06 08:26:14 +03:00
David Cernat
0d0c4ac235
[Client] Use REPLY_TO_REQUEST container sub-action for partial requests
2018-06-05 19:40:39 +03:00
David Cernat
494edbe5cb
[General] Add REPLY_TO_REQUEST container sub-action
2018-06-05 14:16:27 +03:00
David Cernat
fc4d3fe3fa
Merge pull request #441 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Worldstate.cpp
apps/openmw-mp/Script/Functions/Worldstate.hpp
2018-05-28 05:11:34 +03:00
David Cernat
416ee77639
[General] Add placeholder for WorldCollisionOverride packet
2018-05-25 07:09:32 +03:00
David Cernat
2edb511a0b
[Client] Remove unnecessary condition from WorldTime processor
2018-05-25 07:08:51 +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
3b5fb9cd6b
[General] Make it possible to set year via WorldTime
2018-05-25 03:33:12 +03:00
David Cernat
4acf93b7db
[General] Make it possible to set days passed via WorldTime
2018-05-24 14:02:04 +03:00
David Cernat
46744ee90f
[General] Make WorldTime script functions more consistent with others
2018-05-24 09:38:06 +03:00
David Cernat
8d36d0d945
[General] Make it possible to change world's time scale via WorldTime
2018-05-23 08:31:25 +03:00
David Cernat
0be6de6607
[General] Turn RecordDynamic into a Worldstate packet
2018-05-23 07:48:28 +03:00
David Cernat
7083cb0359
Merge pull request #437 from TES3MP/0.6.3 while resolving conflicts
2018-05-23 06:41:23 +03:00
David Cernat
da66face25
[General] Rename GameTime packet into WorldTime
2018-05-23 00:41:29 +03:00
David Cernat
ad4214d3e2
Merge pull request #434 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Networking.cpp
apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp
components/CMakeLists.txt
components/openmw-mp/Base/BasePlayer.hpp
components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp
2018-05-21 09:26:08 +03:00
David Cernat
5af1150ab2
[General] Turn GameTime into a Worldstate packet
2018-05-21 07:14:08 +03:00
David Cernat
e87e1dbb30
[General] Fix Worldstate packets by adding missing lines
2018-05-21 07:12:55 +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
049d0d9ba7
[General] Fix remaining references to world packets/events
2018-05-17 00:08:37 +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
51698bed48
[Client] Rename WorldProcessor into ObjectProcessor
2018-05-15 22:56:47 +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
7c8dd7380f
Merge pull request #421 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Actors.cpp
apps/openmw-mp/Script/Functions/Actors.hpp
apps/openmw-mp/Script/Functions/Cells.cpp
2018-05-12 18:01:01 +03:00
David Cernat
77389538e8
[General] Implement ActorAI packet, part 1
...
The server can now make actors become followers of players or other actors.
2018-05-12 06:29:11 +03:00
David Cernat
4846497078
Merge pull request #415 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Positions.cpp
apps/openmw-mp/Script/Functions/Positions.hpp
apps/openmw-mp/Script/Functions/World.cpp
apps/openmw-mp/Script/Functions/World.hpp
apps/openmw-mp/Script/Script.hpp
apps/openmw-mp/Script/ScriptFunctions.cpp
components/openmw-mp/Base/BasePlayer.hpp
2018-05-02 23:15:39 +03:00
David Cernat
099f85be0a
[General] Implement PlayerMomentum packet & associated script functions
2018-04-29 23:47:17 +03:00
David Cernat
4b501a39f4
[General] Implement DoorDestination packet & associated script functions
2018-04-29 22:32:22 +03:00
David Cernat
ed15d9ebf5
Merge pull request #406 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Mechanics.cpp
apps/openmw-mp/Script/Functions/Mechanics.hpp
components/openmw-mp/Base/BasePlayer.hpp
2018-04-13 18:05:38 +03:00
David Cernat
a01fc577f1
[Client] Add setAttributes() and setSkills() methods to DedicatedPlayer
2018-04-13 16:59:48 +03:00
David Cernat
716809f2db
[Client] Prevent errors from NPC-only packets for DedicatedPlayers
2018-04-13 16:23:42 +03:00
David Cernat
70f9cb535e
[General] Use RecordHelper methods to create and update DedicatedPlayers
2018-04-13 08:37:06 +03:00
David Cernat
2390744b45
Merge pull request #404 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Player.hpp
apps/openmw-mp/Script/Functions/Mechanics.cpp
apps/openmw-mp/Script/Functions/Mechanics.hpp
apps/openmw-mp/Script/Functions/Settings.hpp
apps/openmw-mp/Script/Functions/Stats.cpp
apps/openmw-mp/Script/Functions/Stats.hpp
components/openmw-mp/Base/BasePlayer.hpp
2018-04-10 08:20:23 +03:00
David Cernat
73dea494c4
[General] Allow changes from PlayerBaseInfo without player stat reset
2018-04-09 19:21:19 +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
5bb09d3bed
Merge pull request #399 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw/mwmp/WorldEvent.cpp
apps/openmw/mwmp/WorldEvent.hpp
apps/openmw/mwmp/processors/world/ProcessorContainer.hpp
2018-04-01 11:34:04 +03:00
David Cernat
1e3c4fd488
[Client] Fix ProcessorContainer typos caused by careless copy-pasting
2018-04-01 10:47:57 +03:00
David Cernat
f80f3bd484
[Client] Make it possible to reply to requests about specific containers
...
Previously, a Container packet with a REQUEST action always made the client respond with the contents of all the containers in that cell.
The previous behavior now only happens for requests that have no WorldObjects attached, while requests that have WorldObjects attached get a reply with the contents of those specific containers.
2018-04-01 10:00:39 +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
bbdc30628b
[Client] Use the correct guid for a received WorldEvent or ActorList
2018-03-21 06:08:04 +02:00
David Cernat
b249162ca1
[General] Implement setting of enforced client log level in GameSettings
...
Certain servers do not want the players to have debug information about the locations and actions of other players, so a client's log level can now be enforced by the server via the GameSettings packet.
2018-03-11 04:50:59 +02:00
David Cernat
a3a341fee6
[Server] Reimplement 4ebfcc4a21
for 0.6
2018-03-10 22:19:44 +02:00
David Cernat
7ec08e125b
Merge pull request #394 from TES3MP/0.6.3 while resolving conflicts
...
Conflicts:
apps/openmw-mp/Script/Functions/Settings.cpp
apps/openmw-mp/Script/Functions/Settings.hpp
2018-03-10 20:03:03 +02:00