Commit graph

20740 commits

Author SHA1 Message Date
David Cernat
ac82124a5d Merge pull request #395 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwmechanics/actors.cpp
2018-03-29 07:28:30 +03:00
David Cernat
1c340568d2 [Client] Disallow resting if player has not finished chargen
Previously, players pressing T rapidly before logging in had the Wait screen show up for them.
2018-03-29 06:04:20 +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
9165b12d78 [Client] Update inventory views when receiving inventory or equipment 2018-03-26 10:01:26 +03:00
David Cernat
bb15ee9215 [Client] Make it possible to get ContainerWindow from elsewhere in code 2018-03-24 09:00:15 +02:00
Bret Curtis
1e600de44e
Merge pull request #1640 from unelsson/typofix_updatecrimepersuit
Typofix: updateCrimePersuit -> updateCrimePursuit
2018-03-23 22:13:22 +01:00
Nelsson Huotari
63e34a5575 Typofix: updateCrimePersuit -> ...Pursuit 2018-03-23 14:10:43 +02:00
David Cernat
bbdc30628b [Client] Use the correct guid for a received WorldEvent or ActorList 2018-03-21 06:08:04 +02:00
scrawl
c02920bcd1
Merge pull request #1634
Conflicts:
	apps/openmw/mwworld/worldimp.hpp
2018-03-20 22:48:20 +00:00
scrawl
f47429d575
Merge pull request #1635 2018-03-20 22:47:36 +00:00
scrawl
ff7f964643
Merge pull request #1636 2018-03-20 22:47:31 +00:00
scrawl
5c1551d1ac
Merge pull request #1637 2018-03-20 22:47:08 +00:00
David Cernat
14f0299322 [Client] Don't log InputBox inputs for client 2018-03-20 06:41:04 +02:00
Andrei Kortunov
fed3e56fc1 Weather manager: get rid of World dependency 2018-03-19 23:08:15 +04:00
Andrei Kortunov
53ef345680 Update magic effect particles after building new animation (bug #2254) 2018-03-19 10:43:22 +04:00
Andrei Kortunov
a0a30cdbf5 AI: hide torches during bad weather (bug #4334) 2018-03-19 08:03:53 +04:00
Andrei Kortunov
bd6c7de579 Do not unequip two-handed weapon when equipping torch 2018-03-19 08:03:53 +04:00
RoadTrain
d626d89c49 OpenMW-CS: Fix a typo in startup warning. 2018-03-19 00:50:50 +03:00
Capostrophic
5b49248d6e
Restrict opening doors to bipedal actors (Fixes #4313) 2018-03-18 17:24:27 +03:00
scrawl
eb723f5ae6
Merge pull request #1629 2018-03-16 23:26:50 +00:00
scrawl
edb57306b6
Merge pull request #1628 2018-03-16 23:25:29 +00:00
scrawl
17fa1a4d51
Merge pull request #1630 2018-03-16 23:24:19 +00:00
scrawl
7a5748a9f1
Merge pull request #1632 2018-03-16 23:24:05 +00:00
Bret Curtis
9b93741c7b
Merge pull request #1631 from elsid/rm_duplicate_includes
Remove duplicated include
2018-03-14 07:42:38 +01:00
Capostrophic
002ad9ae1b Print a warning in case a fallback value wasn't found 2018-03-14 00:25:56 +03:00
elsid
a26483ab26 Fix memory leak
There is no delete for TextFormat objects in PageDisplay destructor.
2018-03-13 21:32:59 +03:00
elsid
26df0e6ebd Remove duplicated include 2018-03-13 21:28:38 +03:00
elsid
2f9b6b536b Label gtest directories as system
To hide all warnings when use custom GTEST_ROOT.
2018-03-13 21:27:14 +03:00
David Cernat
20caea083a [Client] Use correct count for items in equipment packets
Previously, throwing weapon sync was completely broken for players, as the count for their equipped throwing weapons was never set and – as a result – defaulted to a count of 1 on other clients. As a result, any time a player threw a dart, they would then appear as having switched to hand-to-hand for other players.

Moreover, the count of equipped items was mistakenly based on the total count of items with that refId in the inventory. As a result, if – for example – I equipped 1 Daedric Longsword and had 4 others in my inventory, my DedicatedPlayer on other clients would equip a Daedric Longsword with a count of 5. If I was overencumbered by having that many Daedric Longswords on me and then dropped 4 of them, allowing myself to move again, my DedicatedPlayer would still walk around with 5 Daedric Longswords and lack animations due to still being overencumbered on the other clients.

These problems were less prevalent for actors, but their equipment updating code has also been changed to match that of players.
2018-03-12 23:31:37 +02:00
Capostrophic
e4531a6910 Use middle gray instead of pure black as default fallback color (Fixes #2841) 2018-03-12 23:38:59 +03:00
Andrei Kortunov
e0aa5e8e79 Prevent overlapping for journal and books scrolling 2018-03-11 16:19:37 +04: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
bf906b3f0a
Merge pull request #393 from OpenMW/master
Add OpenMW commits up to 10 March 2018
2018-03-10 18:37:51 +02:00
scrawl
27610a85ac
Merge pull request #1627 2018-03-10 00:08:52 +00:00
David Cernat
b7c6261e16 Merge pull request #392 from OpenMW/master while resolving conflicts
# Conflicts:
#	README.md
2018-03-09 21:07:46 +02:00
Andrei Kortunov
62c04c6758 Unstack soulgem, added via AddSoulGem console command (bug #4351) 2018-03-09 21:49:27 +04:00
scrawl
e81faf5f2f
Add an option to disable GUI keyboard navigation (Bug #4333) 2018-03-08 23:39:35 +00:00
scrawl
870c658500
Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
scrawl
7f39dbb129
Merge pull request #1626 2018-03-08 20:52:37 +00:00
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
2018-03-08 21:23:24 +01:00
Thunderforge
dfcd243150 Remove the word "interior" from cell not found message 2018-03-07 19:57:54 -06:00
scrawl
96c2b9374f
Merge pull request #1621 2018-03-07 18:12:43 +00:00
scrawl
bf78c18296
Merge pull request #1624 2018-03-07 18:12:32 +00:00
scrawl
148cda254d
Merge pull request #1617 2018-03-07 18:12:26 +00:00
Capostrophic
3b922d810a Don't use floating point arithmetics for formatted count (Bug #4346) 2018-03-07 15:36:10 +03:00
Capostrophic
60a663ef58 Account for all possible count values in getCountString (Bug #4346) 2018-03-06 16:50:38 +03:00
Thunderforge
6c3ac834c4 Preventing max quicksaves from being saved to settings.cfg if it is unchanged. 2018-03-05 19:57:19 -06:00
Capostrophic
d371bebb33 Prevent items in a container owned by a dead actor from being counted as stolen (Bug #4328) 2018-03-03 15:57:13 +03:00
Capostrophic
cc0c6ddaa6 Account for empty victimRef (Bug #4328) 2018-03-03 15:57:03 +03:00