Commit Graph

3861 Commits (365f485e8d3af609c4ddcddde9ecb042e24edc39)

Author SHA1 Message Date
David Cernat 365f485e8d Merge pull request #397 from OpenMW/master while resolving conflicts
Conflicts:
	components/CMakeLists.txt
7 years ago
David Cernat ac82124a5d Merge pull request #395 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
7 years ago
bret curtis 4890ecd357 remove native GLESv* support, as it never worked; make things less complicated as result, fixed lighting.glsl to work with gl2es thanks to ptitSeb 7 years ago
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.
7 years ago
scrawl eb723f5ae6
Merge pull request #1629 7 years ago
Capostrophic 002ad9ae1b Print a warning in case a fallback value wasn't found 7 years ago
Capostrophic e4531a6910 Use middle gray instead of pure black as default fallback color (Fixes #2841) 7 years ago
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.
7 years ago
David Cernat b7c6261e16 Merge pull request #392 from OpenMW/master while resolving conflicts
# Conflicts:
#	README.md
7 years ago
scrawl e81faf5f2f
Add an option to disable GUI keyboard navigation (Bug #4333) 7 years ago
Harald H d3b623b5d3 http to https for supported urls (#1625)
* http to https for supported urls

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http tp https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* http to https

* some url fixes

* http to https
7 years ago
David Cernat 60f686ee43 [General] Implement setting of physics framerate as part of GameSettings 7 years ago
David Cernat 65c3472772
Merge pull request #386 from OpenMW/master
Add OpenMW commits up to 13 Feb 2018, part 2
7 years ago
scrawl 9b8c56761b
Fix timing error 7 years ago
Alexander "Ananace" Olofsson 145b47a550
Fix Windows builds
`std::min`/`std::max` are part of algorithm, which is not implicitly included in Windows builds
7 years ago
David Cernat 53d758ba16
Merge pull request #385 from OpenMW/master
Add OpenMW commits up to 13 Feb 2018
7 years ago
scrawl ac1609c433
Merge pull request #1604 7 years ago
scrawl 123f7b83d5
Make the CompositeMapRenderer use available time and add related setting 7 years ago
uramer 5502790ed9 removed the unnecessary comment 7 years ago
uramer 86c25f5dba Removed NIF flag handling to replicate vanilla engine behaviour 7 years ago
David Cernat 74765b3ace [General] Implement selected spell sync as part of PlayerMiscellaneous 7 years ago
David Cernat 029dfc56ba [General] Implement player scale as part of PlayerShapeshift 7 years ago
David Cernat 66078bfea7 [General] Implement Mark location sync as part of PlayerMiscellaneous 7 years ago
David Cernat 989f6e6b51 [General] Implement PlayerReputation packet 7 years ago
David Cernat 3d80e2db62 [General] Add placeholders for new packet types, part 2 7 years ago
David Cernat 273a1f50af
Merge pull request #377 from OpenMW/master
Add OpenMW commits up to 29 Jan 2018
7 years ago
David Cernat 02af7f6ba1 [General] Add placeholders for new packet types 7 years ago
scrawl 25a6a67508
Fix the optimizer messing up LOD node's children (Fixes #4301) 7 years ago
David Cernat 78df8c5ebe
Merge pull request #375 from OpenMW/master
Add OpenMW commits up to 29 Jan 2018
7 years ago
scrawl 89c6b59c30
Merge pull request #1602 7 years ago
David Cernat 420dab10e1 [General] Track objects directly placed by players in ObjectPlace
This allows the OnPCDrop variable to get set correctly even when object placements have to go through the server first in order to gain a unique multiplayer index (mpNum).

Among other things, this makes it possible to roll marijuana joints in the popular mod "Tribunal Code Patch".
7 years ago
David Cernat 613adf6b30 [General] Update version to 0.6.3 7 years ago
David Cernat 5d4b97645d Merge pull request #374 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/CMakeLists.txt
7 years ago
Ilya Zhuravlev 9e9f6f3132 loadtes3: don't pack() non-POD structs 7 years ago
Ilya Zhuravlev 359910762d GraphicsWindowSDL2: support setting up GLESv2 context for android 7 years ago
Ilya Zhuravlev a038327521 SDLCursorManager: fix possibly invalid read when no cursor present
On android we have no cursor so I moved the check closer to usage
7 years ago
David Cernat 28f47c4f81 [General] Update version to 0.6.2-hotfixed 7 years ago
David Cernat 9935f56d46 [General] Use doubles instead of ints for enchantmentCharge
Additionally, include enchantmentCharges for items  in PlayerEquipment packets.
7 years ago
Bret Curtis 588c1df0f0
Merge pull request #1599 from xyzz/android
Update android port.
7 years ago
Ilya Zhuravlev d2121ccd62 Update android port. 7 years ago
scrawl 047c44f265
Ignore duplicate data directories to work around the fallout of (Fixes #3557) 7 years ago
scrawl 259919d125
Print a warning when an ambiguous file on a case-sensitive file system is found 7 years ago
Marc Zinnschlag 2dff3aab22 allow . and - in the name part of a begin script statement, but not at the beginning of a name. Fixes #4061 7 years ago
scrawl bba9a8dd91
Don't update off-screen animations
Make flying creatures animate in-place when out of processing range
7 years ago
David Cernat a818140c14
Merge pull request #365 from OpenMW/master
Add OpenMW commits up to 2 Jan 2017
7 years ago
David Cernat 65d978a3cb
Merge pull request #364 from OpenMW/master
Add OpenMW commits up to 1 Jan 2017
7 years ago
Bret Curtis 93f14c219c camelCase 7 years ago
Bret Curtis 7a7b040216 fix building on mips machines 7 years ago
scrawl c920f95d1e
Don't incorrectly discard root node transformation (Fixes #4272) 7 years ago
David Cernat cac2c6c1e8 Merge pull request #360 from TES3MP/0.6.1-openmw-updates while resolving conflicts 7 years ago