Commit Graph

16519 Commits (0.7.0)

Author SHA1 Message Date
David Cernat 8a99f215f6 [Client] Add LocalPlayer::sendItemChange() variant with mwmp::Item arg 5 years ago
David Cernat db9c1b9882 [Client] Add MechanicsHelper::getItem() for getting mwmp::Item from Ptr 5 years ago
David Cernat 799241e8c6 [Client] Use informative error message for RefData::setCount() issue 5 years ago
David Cernat 43f195f0c7 [Client] Use clearer debug for actor initializations 5 years ago
David Cernat 2e1d4a9449 [Server] Fix non-Windows builds 5 years ago
David Cernat 81e2e48561 [Client] Fix item magic casting synchronization for spell scrolls
Previously, spell scrolls were used up before their IDs could be included in attacks packets supposed to be sent for them.
5 years ago
David Cernat d83160523f [Client] Add items required for item magic casting when they are missing 5 years ago
David Cernat 433a69a588 [Client] Send all data for newly initialized LocalActors at least once 5 years ago
David Cernat e70fd2cf3a [Server] Accept clients with wrong password on servers with no password 5 years ago
David Cernat eb52babf29 [Server] Print IP instead of name or PID for players unable to connect
The player name was always blank in such situations, providing no useful information. The PID was not useful in any way either.
5 years ago
David Cernat e96091fd6b [General] Use more consistent variable names for password, address, etc. 5 years ago
David Cernat 906d2a837d [Client] Send PlayerInventory packets when recharging items w/ soulgems 5 years ago
David Cernat 71679934a1 [Client] Send PlayerInventory packets when repairing items 5 years ago
David Cernat 5d9893ee92 [Client] Set actor killer correctly for spells that do damage over time
Additionally, clean up comments related to other code that sets actor killers.
5 years ago
David Cernat 6e1504f0a1 [Server] Use clearer variable & function names in TimerAPI 5 years ago
David Cernat 42b5a8054f [Server] Remove unusable position functions for players 5 years ago
Koncord 4ce0331f1b [Server] Fix GCC build 5 years ago
Koncord 9343b8af2f [Server] Remove unused function 5 years ago
Koncord c2230a8a21 [Server] Add MP flag to the server if enabled 5 years ago
Koncord 55cea491ca [Server] Introduce MS VC++ 2017 support 5 years ago
Koncord 6af2400752 [Server] Remove usages of get/set env. Add GetModDir function 5 years ago
Koncord b3456a8841 [Server] Fix invalidation of iterators 5 years ago
David Cernat 343dd8b5ea [Client] Fix addition of items to player inventories
Previously, multiple stacks of the same item ID could overwrite data in each other because of how the logic in ContainerStore::add() works. For example, a stack of 5 grand soul gems with no souls would get added to the player, then the attempt to add a grand soul gem with a particular soul would retrieve the previous stack first before setting all of it to that soul, resulting in 6 grand soul gems with that soul.
5 years ago
David Cernat 76ac905efc [Client] Send PlayerInventory packets when trapping souls in soulgems 5 years ago
David Cernat f853368641 [Client] Fix loss of player items in ContainerStore::unstack()
Previously, unstacking items for a player led to a PlayerInventory packet being sent about the items' removal.

This change makes it so both a packet about their re-addition and their removal are sent instead, cancelling each other out, which is inelegant, but arguably preferable to complicating the sending of PlayerInventory packets again.
5 years ago
David Cernat 5e38e8abdb [Server] Add GetArchitectureType() script function
Additionally, bring GetOperatingSystem() up-to-date by making it use the renamed function in Utils.
5 years ago
David Cernat fa1700e2ab [Server] Add GetOperatingSystemType() script function 5 years ago
David Cernat 50714599d9 [Client] Spawn at exterior 0, -7 by default 5 years ago
David Cernat afd17e5a48 [Client] Don't finish drag & drop that is supposed to be unsuccessful
This prevents items from vanishing when your attempt to drop them in a full container is denied.
6 years ago
David Cernat a6c6db89fc [Client] Send object packets when scripts use PlaceItem/PlaceItemCell 6 years ago
David Cernat d05a82a734 [Client] Avoid repetitive code when unequipping items in resurrection 6 years ago
terrabyte25 35755eb1f1
[Client] Disallow opening inventory menu when not logged in 6 years ago
David Cernat b7090b2550 [Server] Add experimental option for not crashing from Lua script errors
Additionally, fix return type of GetPluginEnforcementState()
6 years ago
David Cernat b39e3f518b [Client] Use correct log levels for inventory and dynamic record packets 6 years ago
David Cernat d8ca268067 [Server] Move plugin enforcement functions to ServerFunctions 6 years ago
David Cernat 2933526995 [Server] Include errors related to Lua calls in server logs 6 years ago
Testman 6b3f598837
Use more descriptive terminology for chat modes
Changed "Chat disabled" to "Chat hidden", "Chat enabled" to "Chat visible" and "Chat in hidden mode" to "Chat appearing when needed".
6 years ago
David Cernat e834a4ec74 [Client] Find closest enchantmentCharge in getItemPtrFromStore()
Enchanted inventory items continuously recharge their enchantment charges, which getItemPtrFromStore() should account for.

Additionally, prevent framelistener errors caused by PlayerItemUse packets about non-existent items.
6 years ago
Koncord e162af0003 [Server] Disallow non void callbacks 6 years ago
Koncord 07a5f5296c [Server] Rework OnRequestPluginList callback. Add AddPluginHash function 6 years ago
Koncord 20a7619a4a [Server] Remove result from the OnPlayerConnect callback
Now it's recommended to use tes3mp.Kick() function
6 years ago
Koncord f1e8569291 [Server] Remove result from the OnPlayerSendMessage callback 6 years ago
Koncord efa362031e [Server] Remove unused Main callback 6 years ago
Koncord b83e4056a8 [Server] Remove CallFF dependency as it not fully supported by Windows and MacOS 6 years ago
Koncord 585557ad8a [Server] Remove argument cast in the Call with va_args 6 years ago
Koncord 3101de5f02 [Server] Add kicked load status 6 years ago
Koncord e5e13b21ae [Client] Fix crash on drag&drop 6 years ago
David Cernat c65d6c1328 [Client] Disable mListener methods in mwworld/containerstore
This should put an end to frequent crashes until I can fix the problem properly.
6 years ago
David Cernat 1baf82db32 [Client] Avoid PlayerSpellbook packet spam in some mods 6 years ago
David Cernat d9bc1abf48 [Client] Don't send ObjectScale packets if not logged in 6 years ago
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 99f8ef88a5 [Server] Add SetObjectActivatingPid() script function 6 years ago
David Cernat 17f13872aa [Client] Use forceUpdate correctly in LocalPlayer::updateStatsDynamic()
Previously, the forceUpdate argument was useless, preventing dynamic stats from being sent by certain newly created characters.
6 years ago
David Cernat bfd7c83c4d [Client] Fix backwards logic when setting type for AI attacks 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 66d666d60c [Client] Use less confusing terminology when displaying plugin mismatch 6 years ago
David Cernat bb834748c5 [Server] Log player kicks 6 years ago
David Cernat a3111fbcc1 [Server] Use clearer error message when failing to bind port 6 years ago
Sam Hellawell df1667b6e4 Cleanup fix for equip item crash on Linux
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
6 years ago
Sam Hellawell 1e171ad9fd Fix crash when equipping item on linux
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
6 years ago
David Cernat e402a17757 [Client] Don't cast non-weapons to weapons in isUsingRangedWeapon()
This makes lockpicks and probes work again.
6 years ago
David Cernat 292536439e [Server] Rename script functions for clearing packet vectors for players 6 years ago
David Cernat c79660f721 [Server] Make inventory script functions consistent with others
Functions that add elements to a vector should not change the action. This fixes the last remaining oddity in Koncord's original implementation of inventory sync.
6 years ago
David Cernat b76e00c66e [Server] Call OnPlayerCellChange script event near start of cell change
This makes it possible to send custom records used by players for their equipment before the hardcoded exchange of equipment packets takes place.

Additionally, remove the check for dead players because it has no real use and can potentially cause problems.
6 years ago
David Cernat f100a660d4 [General] Fix ranged attack sync when using last throwing weapon or ammo 6 years ago
David Cernat 3f304866fd [Client] Use clearer variable names in DedicatedPlayer::setEquipment() 6 years ago
David Cernat 995d20348f [General] Always use correct ranged weapon & ammo for ranged attack sync
Previously, the player's currently selected weapon was being used in ranged attacks as in the original melee-oriented attack sync, which meant that shooting one type of projectile and then equipping another while the old projectile was still in the air turned the old projectile into the new projectile upon impact.

Additionally, avoid running most of the code in MechanicsHelper::assignAttackTarget() for non-hitting melee and ranged attacks.
6 years ago
David Cernat b5f46ada73 [General] Synchronize projectile speed for ranged attacks
This is done by including the final attackStrength used for ranged attacks in packets and then applying it in WeaponAnimation::releaseArrow() on other clients.
6 years ago
David Cernat 7281f9fc42 [Client] Prevent unilateral paralysis of dedicated players & actors
This is a temporary workaround until active effect synchronization is implemented.
6 years ago
David Cernat 33a0886790 [Client] Fix synchronization of knockdown states 6 years ago
David Cernat 490303dc0b [Client] Clean up MechanicsHelper::processAttack() slightly
The debug is now more descriptive and some code is now skipped for non-ranged attacks.
6 years ago
David Cernat 9d2dc96a2e [Client] Use RANGED type for ranged attacks that haven't hit a target 6 years ago
David Cernat af49f711ca [Client] Add isUsingRangedWeapon() method to MechanicsHelper 6 years ago
David Cernat 3f6ca6f22b [Client] Bring drawState fallback for actors up-to-date w/ attack types 6 years ago
David Cernat 9d2cf6629b [Client] Fix logic for hand-to-hand attack sync 6 years ago
David Cernat fcd31bf4a6 [General] Fix problems with the synchronization of ranged attacks
Projectile hits now send Attack packets with RANGED attacks, and their success or failure is now synchronized.

Strike enchantments no longer require a valid victim to be synchronized.

Additional debug messages have been added for attacks.
6 years ago
David Cernat 31a9b77f34 [Client] Reset hitPosition in MechanicsHelper::resetAttack() 6 years ago
David Cernat 7d221509cd [Client] Move item magic hook to correct location
Previously, synchronization for strike enchantments was partially broken because it triggered the sending of ITEM_MAGIC attack packets, which are only supposed to be sent when a spell is cast from a magical inventory item.
6 years ago
David Cernat c9ad411dd3 [Client] Fix logic for setting applyProjectileEnchantment in attack sync 6 years ago
David Cernat 8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 6 years ago
David Cernat dcd4478028 [Client] Always stop sending weather updates when moving to an interior 6 years ago
David Cernat 113002ca19 [Client] Return early when processing actors that can't be initialized 6 years ago
Koncord 48f4792bc1 [Server] Add GetMaxPlayers, GetPort and HasPassword functions to API 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 9e58cc82bd [Server] Set minimum updateRate when communicating with master server 6 years ago
David Cernat d1fa57ac14 [General] Switch to new official master server port when using old one 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 75a64a69c7 [Server] Add GetInventoryChangesAction() script function
Additionally, fix a typo in the description of GetSpellBookChangesAction()
6 years ago
David Cernat 45b011452e [Client] Combine methods for sending spell packets into a single one 6 years ago
David Cernat 140e0ed52c [Client] Also clear aiActors when clearing ActorList 6 years ago
David Cernat aed4ca2fd2 [Client] Allow use of baseId for more record types
Additionally, don't allow new enchantment records to be created if they have no effects, to avoid a crash.
6 years ago
David Cernat a083439139 Merge pull request #469 from davidcernat/master while resolving conflicts
# Conflicts:
#	apps/openmw/main.cpp
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwdialogue/dialoguemanagerimp.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwscript/dialogueextensions.cpp
#	apps/openmw/mwworld/worldimp.hpp
6 years ago
David Cernat 7efee0e968 [Client] Fix GCC build 6 years ago
David Cernat 5bd2244898 [Client] Uninitialize DedicatedActors instantly in some situations
When LocalActors briefly become DedicatedActors as the result of a server script, the DedicatedActors are immediately uninitialized to avoid bugs like them jumping in place or rotating slightly.

Additionally, the playing of animations and sounds received in packets for DedicatedActors is no longer done during their next update, but is instead done instantly when the packets are received.
6 years ago
David Cernat 5fd4113978 [General] Implement sending of ActorSpeech packets from server scripts 6 years ago
David Cernat 338efdb705 [General] Fix issues with MechanicsHelper::getItemPtrFromStore() 6 years ago
David Cernat aec0c5bd49 [Server] Make capitalization consistent for AI-related script functions 6 years ago
David Cernat 9598212aad [Client] Don't add bound items to inventory as a result of item packets
Additionally, don't include bound items when sending PlayerInventory packets.
6 years ago
David Cernat a3b9274365 [Client] Make it possible to check if an item ID belongs to a bound item 6 years ago
David Cernat a1933e7bc2 [Client] Don't declare variable twice in LocalPlayer's setEquipment()
The variable equipmentItem is identical to currentItem, so it should not have been added in commit 58a6a8c3bc

Addditionally, use a more descriptive variable name than "a" for item Ptrs.
6 years ago