Commit Graph

82 Commits (1f2349ef6e82b7b1b82e1de6db2776e2043fb18d)

Author SHA1 Message Date
David Cernat a8cf1e02c4 [Client] Allow unilateral scripted container changes not from console
This prevents infinite loops in certain client scripts from mods that use while loops to determine that all items of a certain type have been removed from a container, such as in the script BCSwap2Arg from  Better_Clothes.
6 years ago
David Cernat d9dd7073cf [General] Send certain packets only when logged in
Previously, client mods adding packet-sending scripts to the spawn area made clients send the associated packets as soon as they inputted their character name when joining a server using those mods. This made the clients either get disconnected for not replying to a handshake first, or it made them get kicked for sending object packets that are disallowed for players who are not logged in.

To fix this, LocalPlayer's hasFinishedCharGen() has been replaced with isLoggedIn(), because the former was already returning true when players inputted their names.
6 years ago
David Cernat 3bd8aa82fe [General] Reduce inventory-sending hooks to just 2 in ContainerStore
Whenever an item is added to or removed from the player's ContainerStore, that player sends a PlayerInventory packet with just that addition or removal.

This eliminates all the unnecessary packet spam related to oversized PlayerInventory packets that had existed in one form or another since the initial implementation of inventory sync in 1b259e2d33

Additionally, move booleans from BasePlayer to LocalPlayer when they are only needed on the client, and make the usage of the isReceivingQuickKeys boolean consistent with the new isReceivingInventory boolean by having them both in the processors of their associated packets.
6 years ago
David Cernat 03832f933b [Client] Send only individual items in PlayerInventory packets
For a long time, whenever a PlayerInventory packet was sent, it contained all the items in the player's inventory, because that's how Koncord originally implemented it and I always had too many other priorities to go back and rework it.

From now on, clients only send PlayerInventory packet with the one item added or removed, with the single exception being trading with merchants, where the entire inventory is still sent for the time being.
6 years ago
David Cernat d93b67ef21 [General] Sync soul refIds for items and add related script functions 7 years ago
David Cernat 36ac2d9de4 [Client] Set packetOrigin for all ObjectList packets sent 7 years ago
David Cernat b891acd46e [Client] Send Container packets when items are added/removed via scripts
Additionally, disable unilateral addition and removal of items on clients, and expect the server to reply back with an approved addition or removal.
7 years ago
David Cernat 6cb5ac6e63 Merge pull request #457 from OpenMW/master while resolving conflicts
Conflicts:
	CMakeLists.txt
	apps/openmw/engine.cpp
	apps/openmw/main.cpp
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwmechanics/character.cpp
	components/CMakeLists.txt
7 years ago
Andrei Kortunov c77c50e92b Make Equip console command to bypass most of restrictions (bug #4460) 7 years ago
David Cernat 73e7aa838d Merge pull request #296 from OpenMW/master while resolving conflicts
# Conflicts:
#	apps/openmw/mwgui/container.cpp
7 years ago
Andrei Kortunov 4580024d76 Unequip all items from dead corpse when take all items (bug #4095) 7 years ago
David Cernat fa3baac0f3 Merge pull request #228 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	CMakeLists.txt
#	apps/openmw/main.cpp
8 years ago
Bret Curtis c781d1f8ed purge unnecessary imports
add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back
8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
David Cernat a82646a130 [Client] Delineate tes3mp-only code more clearly, part 2 8 years ago
David Cernat 11a9e3bdb1 Merge pull request #197 from OpenMW/master
Add OpenMW commits up to 14 Apr 2017
8 years ago
Allofich 6e405aed8c Adjustments to RemoveItem behavior
(Fixes #3796)
8 years ago
David Cernat a2ef39c655 Merge pull request #178 from OpenMW/master
Add OpenMW commits up to 2 Mar 2017
8 years ago
Rafael Moura 6c2ce2b2a1 Porting more ContainerStoreIterator usage to const version #4
removed const_cast revision
8 years ago
David Cernat a58601fb2b [Client] Delineate tes3mp-only code more clearly, part 1 8 years ago
Rafael Moura 9963601484 Porting code to ConstContainerStoreIterator #1 8 years ago
David Cernat cdd796aba1 [Client] Send ID_PLAYER_INVENTORY from two more locations 8 years ago
Marc Zinnschlag 03a35c38df add missing item when executing the Equip instruction 8 years ago
scrawl ba3f4f122a Account for the stack count in HasSoulGem (Bug #3340) 9 years ago
Alexander "Ace" Olofsson 7d4125d97f Fixes for building with unity build 9 years ago
scrawl 5aa33fde43 Include cleanup 9 years ago
scrawl fd48c1d6f4 Make the Equip script function "use" items (drink potion, use alchemy, etc) 9 years ago
dteviot 77a1d947cc extracted MWMechanics::getPlayer() 10 years ago
scrawl 67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
10 years ago
Koncord 6c3c85f0d4 Fix indent
Remove misc.hpp in containerstore.cpp
10 years ago
Koncord 7a86c8d8b6 Fix OpAddItem, OpGetItemCount and OpRemoveItem. 10 years ago
scrawl 3879ce6ac1 Get rid of "player" string checks (Fixes #2216) 10 years ago
Alexander "Ace" Olofsson fce404acc5 Remove some including of mwbase/world.hpp
Since ref.hpp is rather well used in OpenMW-CS this should help compile times there
10 years ago
Alexander "Ace" Olofsson d3128a12b6 Remove a large include form mwbase/windowmanager.hpp 10 years ago
scrawl 579f5d232f Move interactive messageBox to separate function 10 years ago
scrawl 8097d9801d Fix HasSoulgem function to return number of soulgems 10 years ago
scrawl 039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
11 years ago
Emanuel Guevel 1e4a854433 Remove static method MWWorld::Class::get(&Ptr)
It was just adding a level of indirection to Ptr.getClass().
All the call were replaced by that instead. The number of lines changed
is important, but the change itself is trivial, so everything should be
fine. :)
11 years ago
scrawl c8c0e5de38 Fixed code issues found with unity build. Missing include guards, duplicated functions, ... 11 years ago
Marc Zinnschlag 367919200f moved CellRefList into a separate file 11 years ago
Emanuel Guevel 8824af30b4 Allow to display message box outside of dialogue window 11 years ago
scrawl 589fbbd871 Issue #777: Create InventoryStore for creatures with weapons/shields 11 years ago
scrawl c04a8afc8b Make sure onPcEquip is also set for Equip script instruction 11 years ago
scrawl b8583124e0 Correction for RemoveSoulgem instruction 11 years ago
scrawl 372cd437d1 Add a utility function for counting items in a container 11 years ago
scrawl 098f9712f1 Add getPlayerPtr() utility method. Reduces dependencies a lot. 11 years ago
scrawl b490e56ba1 Remove redundant setLocals (already done by ContainerStore::add) 11 years ago
scrawl bab657fe2b Add a utility function to add items to a ContainerStore by RefID 11 years ago
scrawl 00af6b5617 Use an inventory store listener for animation parts and VFX update instead of updating them directly. Slightly more flexible, reduces InventoryStore dependencies and solves a crash during character creation due to the preview doll's animation not being registered in World. 11 years ago
Emanuel Guevel aefa54d72d Pass item count to ManualRef constructor
This remove the need to call setCount in multiple places.
11 years ago