openmw-tes3coop/apps/openmw/mwmechanics
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
..
activespells.cpp [Client] Clear FortifyAttribute effects when server sets modifier to 0 2017-12-02 09:22:36 +02:00
activespells.hpp [Client] Clear FortifyAttribute effects when server sets modifier to 0 2017-12-02 09:22:36 +02:00
actor.cpp MechanicsManager, frame update 2015-04-25 15:19:17 +02:00
actor.hpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
actors.cpp [Client] Use correct count for items in equipment packets 2018-03-12 23:31:37 +02:00
actors.hpp Merge pull request #351 from OpenMW/master while resolving conflicts 2017-11-30 10:06:38 +02:00
actorutil.cpp Added MWMechanics::isPlayerInCombat() 2015-09-10 18:48:34 +12:00
actorutil.hpp actorutil.hpp includes mwworld/ptr.hpp 2015-09-11 18:43:06 +12:00
aiactivate.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aiactivate.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiavoiddoor.cpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiavoiddoor.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aibreathe.cpp Added AiBreathe package (feature #1374) 2017-07-25 10:58:04 +04:00
aibreathe.hpp Added AiBreathe package (feature #1374) 2017-07-25 10:58:04 +04:00
aicombat.cpp Merge pull request #349 from OpenMW/master 2017-11-29 03:52:15 +02:00
aicombat.hpp purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 2017-06-09 19:08:53 +02:00
aicombataction.cpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00
aicombataction.hpp Combat AI: use WhenUsed enchantments 2017-08-05 12:18:38 +04:00
aiescort.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aiescort.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
aiface.cpp Implement Face instruction (Feature #1424) 2016-07-09 02:16:47 +02:00
aiface.hpp Implement Face instruction (Feature #1424) 2016-07-09 02:16:47 +02:00
aifollow.cpp AiFollow: add a threshold when turning to target 2017-08-17 22:52:34 +04:00
aifollow.hpp Don't make Command spells cancel AI packages 2017-01-12 00:07:22 +09:00
aipackage.cpp AiWander: do not allow flying/swimming creatures to use pathgrid 2017-11-28 18:03:13 +04:00
aipackage.hpp AiWander: do not allow flying/swimming creatures to use pathgrid 2017-11-28 18:03:13 +04:00
aipursue.cpp [Client] Prevent guards from arresting players who are currently jailed 2018-02-25 21:33:04 +02:00
aipursue.hpp Don't stack Ai packages (Fixes #3101, Fixes #3080, Fixes #2697) 2016-02-02 22:20:56 +01:00
aisequence.cpp Merge pull request #1326 from akortunov/spellpriority 2017-07-31 17:51:51 +00:00
aisequence.hpp Make guards that are attacked try to arrest player 2017-06-15 01:47:10 +09:00
aistate.hpp Remove BOOST_STATIC_ASSERT to fix clang warnings 2015-06-04 20:11:40 +02:00
aitravel.cpp convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
aitravel.hpp AiPackage: fix path recalc on cell change 2016-09-06 01:11:10 +03:00
aiwander.cpp AiWander: do not allow flying/swimming creatures to use pathgrid 2017-11-28 18:03:13 +04:00
aiwander.hpp AiWander fast forwarding improvements (bug #3638) 2017-11-11 15:31:06 +04:00
alchemy.cpp Update alchemy effects after every created potion (#4079) 2017-09-06 15:11:47 +04:00
alchemy.hpp Don't reveal unknown potion effects in alchemy window (Fixes #3146) 2016-02-02 22:50:11 +01:00
autocalcspell.cpp Move spell magicka cost calculation to standalone function 2017-07-24 21:11:59 +04:00
autocalcspell.hpp Show starting abilities, powers and spells in stat-review window (Fixes #2410) 2016-11-19 21:51:19 +01:00
character.cpp Merge pull request #392 from OpenMW/master while resolving conflicts 2018-03-09 21:07:46 +02:00
character.hpp Don't update off-screen animations 2018-01-11 01:49:35 +00:00
combat.cpp Merge pull request #313 from OpenMW/master while resolving conflicts 2017-10-16 07:37:29 +03:00
combat.hpp Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
coordinateconverter.cpp Fixed errors pointed out by Zini. 2015-09-12 14:17:46 +12:00
coordinateconverter.hpp Fixed errors pointed out by Zini. 2015-09-12 14:17:46 +12:00
creaturestats.cpp [General] Synchronize summoned creatures 2017-05-30 10:11:01 +03:00
creaturestats.hpp [General] Synchronize summoned creatures 2017-05-30 10:11:01 +03:00
difficultyscaling.cpp [General] Repurpose GameConsole packet as GameSettings & add difficulty to it 2017-06-20 05:28:45 +03:00
difficultyscaling.hpp Implement difficulty scaling (Fixes #1505) 2014-07-20 16:38:20 +02:00
disease.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
drawstate.hpp Savegame: store most of CreatureStats 2014-05-12 21:37:36 +02:00
enchanting.cpp Remove missing souls, remove some runaway exceptions (Fixes #4111) 2018-03-08 23:38:04 +00:00
enchanting.hpp Pass parameters by const reference 2017-04-20 23:47:03 +09:00
levelledlist.hpp Cleanup of #include statements 2016-06-18 10:56:28 +09:00
magiceffects.cpp Remove empty line at the beginning of files 2015-08-18 23:06:12 +02:00
magiceffects.hpp Fix various MSVC warnings 2015-02-15 20:10:21 -06:00
mechanicsmanagerimp.cpp Merge pull request #392 from OpenMW/master while resolving conflicts 2018-03-09 21:07:46 +02:00
mechanicsmanagerimp.hpp Merge pull request #349 from OpenMW/master 2017-11-29 03:52:15 +02:00
movement.hpp Readded collision objects and movement physics 2015-05-12 03:02:15 +02:00
npcstats.cpp Merge pull request #287 from OpenMW/master while resolving conflicts 2017-09-12 07:38:49 +03:00
npcstats.hpp [Client] Delineate tes3mp-only code more clearly, part 1 2017-02-26 16:59:53 +02:00
objects.cpp More consistent wording of errors/warnings 2017-03-04 21:48:31 +01:00
objects.hpp Save scripted animation state (Fixes #1931, #2150, #3393) 2016-08-03 03:52:35 +02:00
obstacle.cpp AI: Check angle between actor and door 2017-07-31 19:28:02 +04:00
obstacle.hpp Added door detection based by ray casting 2017-07-03 22:08:29 +04:00
pathfinding.cpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
pathfinding.hpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
pathgrid.cpp http to https for supported urls (#1625) 2018-03-08 21:23:24 +01:00
pathgrid.hpp Move PathgridGraph out of CellStore 2017-11-27 21:20:31 +00:00
pickpocket.cpp Move rng to components 2015-04-22 17:58:55 +02:00
pickpocket.hpp Implement pickpocket detection. Play a voiced dialogue entry when detected. 2014-01-07 03:01:33 +01:00
repair.cpp Added a special function for GUI sounds playing 2017-07-10 15:48:00 +04:00
repair.hpp Added PC repair feature 2013-03-23 08:16:46 +01:00
security.cpp [Client] Send ObjectTrap packets when disarming traps with keys & probes 2017-05-26 01:47:59 +03:00
security.hpp Cleanup Security class 2013-05-19 23:19:48 +02:00
spellcasting.cpp [General] Implement Mark location sync as part of PlayerMiscellaneous 2018-01-31 04:50:29 +02:00
spellcasting.hpp Added checkMagicka parameter 2017-11-28 23:35:54 +01:00
spellpriority.cpp Do not summon the bound bow if there is no suitable ammo 2018-01-11 21:08:30 +04:00
spellpriority.hpp Split weapons and spells rating code from combat actions 2017-08-01 09:05:35 +04:00
spells.cpp Cache magic effects in MWMechanics::Spells 2016-07-02 12:50:00 +02:00
spells.hpp Cache magic effects in MWMechanics::Spells 2016-07-02 12:50:00 +02:00
stat.cpp Change bounds behavior of stat script commands 2017-03-22 15:17:44 +09:00
stat.hpp Fix magicka and fatigue calculations from fortifying attributes 2016-06-25 19:21:49 +09:00
steering.cpp Fixed bug in smoothTurn() 2015-09-06 17:39:48 +12:00
steering.hpp Fixes for building with unity build 2015-09-24 15:21:42 +02:00
summoning.cpp Merge pull request #280 from OpenMW/master while resolving conflicts 2017-08-31 15:14:13 +03:00
summoning.hpp Added a delay before summoned creature corpse despawning 2017-08-18 11:58:28 +04:00
trading.cpp Fix selling success chance (Fixes #3802) 2017-03-25 15:21:16 +01:00
trading.hpp Moved mechanics code from MWGui::TradeWindow to MWMechanics::Trading 2016-06-04 12:28:47 -04:00
weaponpriority.cpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00
weaponpriority.hpp implement rateAmmo() function 2018-01-11 21:08:11 +04:00