David Cernat
4492a7a768
[Client] Add MechanicsHelper method to get actorId of an mwmp::Target
...
Also clean up MechanicsHelper::getPlayerPtr() slightly.
2021-07-21 14:57:55 +02:00
David Cernat
bf0a42fdad
[General] Implement ActorSpellsActive packet, part 1
...
The packet can now set the active spells of DedicatedActors.
2021-04-20 03:25:14 +02:00
David Cernat
053a5a6258
Add OpenMW commits up to 9 May 2020
...
# Conflicts:
# apps/openmw/mwmechanics/spellcasting.cpp
# apps/openmw/mwscript/aiextensions.cpp
2020-05-09 15:17:04 +03:00
David Cernat
25a632c650
Add OpenMW commits up to 13 Apr 2020
...
# Conflicts:
# CMakeLists.txt
# README.md
# apps/openmw/engine.cpp
# apps/openmw/mwclass/creaturelevlist.cpp
# apps/openmw/mwgui/quickkeysmenu.cpp
2020-04-13 19:53:42 +03:00
David Cernat
980edac942
[General] Rename PlayerTeam into PlayerAlly
...
Considering that you can be allies with someone without being allied to their allies, changing the name makes the system more intuitive.
2019-12-05 19:15:11 +02:00
David Cernat
3a52f7dcf5
[Client] Add isTeamMember() method to MechanicsHelper
2019-12-03 17:04:49 +02:00
David Cernat
68f524b822
[Client] Use more succinct methods for PlayerPtr in MechanicsHelper
2019-12-03 14:12:40 +02:00
David Cernat
ed7fe859dd
[Client] Set attackingOrSpell state instantly after Attack/Cast packets
...
It is no longer necessary to wait for the Actors::update() loop to set dedicated players and actors to their new states.
2019-11-30 15:03:51 +02:00
David Cernat
140c1c9c12
[General] Use hard synchronization for melee attack animations
...
Previously, each client chose its own attack animations for DedicatedPlayers and DedicatedActors based on the direction they were walking in, which however led to desyncs for players with "Always Use Best Attack" enabled and for creatures which pick their attack animations randomly.
2019-11-29 10:39:57 +02:00
David Cernat
06b4a4f97c
[Client] Don't tie spellcasting for dedicated players/actors to anim end
...
When Koncord implemented spellcasting, he made it so only the act of initiating a spellcast was synchronized, leaving it to other clients to actually cast a spell for a dedicated player or actor once their spellcasting animation was over. This had led to a lot of desyncs and has always been inconsistent with the handling of attacks, so I've belatedly gone ahead and prevented the end of a spellcasting animation from having any effect for dedicated players and actors, making them cast a spell when an appropriate Cast packet is received from them instead.
Additionally, the logged messages in MechanicsHelper's handling of attacking and casting have been moved around slightly.
2019-11-28 10:34:34 +02:00
David Cernat
9350e1d484
[General] Split up Attack packets into Attack and Cast ones
...
Create an entirely new PlayerCast packet for that purpose, but rename the already existing but unused ActorInteraction into ActorCast.
2019-08-25 09:35:23 +03:00
David Cernat
353e7d530a
Add OpenMW commits up to 18 Aug 2019
...
# Conflicts:
# CMakeLists.txt
# apps/openmw/mwmechanics/character.cpp
# apps/openmw/mwmechanics/spellcasting.cpp
# apps/openmw/mwworld/worldimp.hpp
2019-08-22 22:44:00 +03:00
David Cernat
0339958e21
[General] Rename Log class into TimedLog
2019-08-19 21:39:33 +03:00
David Cernat
db9c1b9882
[Client] Add MechanicsHelper::getItem() for getting mwmp::Item from Ptr
2019-01-11 12:53:26 +02:00
David Cernat
d83160523f
[Client] Add items required for item magic casting when they are missing
2018-12-31 06:55:35 +02:00
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.
2018-11-13 20:36:31 +02:00
David Cernat
e402a17757
[Client] Don't cast non-weapons to weapons in isUsingRangedWeapon()
...
This makes lockpicks and probes work again.
2018-10-09 09:54:13 +03:00
David Cernat
f100a660d4
[General] Fix ranged attack sync when using last throwing weapon or ammo
2018-09-24 11:30:53 +03:00
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.
2018-09-23 02:30:31 +03:00
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.
2018-09-15 04:11:43 +03:00
David Cernat
af49f711ca
[Client] Add isUsingRangedWeapon() method to MechanicsHelper
2018-09-14 13:21:45 +03:00
David Cernat
9d2cf6629b
[Client] Fix logic for hand-to-hand attack sync
2018-09-11 15:07:44 +03:00
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.
2018-09-11 11:56:45 +03:00
David Cernat
31a9b77f34
[Client] Reset hitPosition in MechanicsHelper::resetAttack()
2018-09-10 12:34:33 +03:00
David Cernat
8012d0d7b7
[General] Include hit position in PlayerAttack and ActorAttack packets
2018-09-08 05:29:49 +03:00
David Cernat
338efdb705
[General] Fix issues with MechanicsHelper::getItemPtrFromStore()
2018-08-11 19:00:02 +03:00
David Cernat
8df08c7d10
[General] Implement PlayerItemUse packet
...
Players can no longer unilaterally use items on themselves in their inventory. When they try to use an item, they send a PlayerItemUse packet to the server with the item's details. A serverside script can then check the item and either send the packet back to make the item use go through or drop it.
2018-08-09 18:25:20 +03:00
David Cernat
36ac2d9de4
[Client] Set packetOrigin for all ObjectList packets sent
2018-07-23 01:39:43 +03:00
David Cernat
20e0100706
[General] Rework Attack packets and add synchronization for item magic
2018-07-21 14:41:27 +03:00
David Cernat
b6324e3532
[Client] Clean up debug for spell usage
2018-07-21 09:41:36 +03:00
David Cernat
09da24f1ea
[General] Rename all instances of refNumIndex into refNum
...
This creates symmetry with mpNum and should cause less confusion in the future.
2018-07-13 04:12:03 +03:00
David Cernat
509882b5f6
[Client] Rework MechanicsHelper::getTarget() to avoid crashes
2018-07-07 11:43:57 +03:00
David Cernat
4eb72eecb1
[Client] Fix crash for invalid CellRefs in MechanicsHelper::getTarget()
2018-07-06 18:39:14 +03:00
David Cernat
f02492a593
[General] Temporarily include target names in mwmp::Target
...
These will be removed once the server can get the names matching refIds by reading content files.
2018-07-05 19:40:28 +03:00
David Cernat
130a32ebb0
[Client] Add new methods for handling mwmp::Target in MechanicsHelper
2018-07-05 16:36:52 +03:00
David Cernat
78234f9071
[General] Rename Event into ObjectList & WorldObject into BaseObject
2018-05-13 00:42:24 +03:00
David Cernat
34be9383e5
[General] Add isPlayer boolean to targets in packets
2018-04-05 12:48:53 +03:00
David Cernat
a86c68c5a1
[General] Add sync for ranged weapon & projectile strike enchantments
2018-04-03 14:12:27 +03:00
David Cernat
3f8d94b030
[General] Synchronize strike enchantments in combat
2018-04-03 10:27:02 +03:00
David Cernat
d19d8b0a34
[Client] Add and use enchantmentType argument for unequipItemsByEffect()
2018-01-27 19:37:16 +02:00
David Cernat
c6a85ee8f9
[Client] Add doesEffectListContainEffect() method to MechanicsHelper
2018-01-26 03:18:01 +02:00
David Cernat
aa392ebf20
[Client] Unequip items if necessary when attr/skill modifier is set to 0
2018-01-26 00:45:39 +02:00
David Cernat
4db64e1721
[Client] Synchronize spellcasting for non-bipedal creatures
2017-07-28 20:49:26 +03:00
Koncord
5b2cab4c6b
[General] Change NULL to nullptr
2017-06-27 22:49:28 +08:00
Koncord
0ed0d2417b
[Client] Make foreach style consistent with other
2017-06-27 22:27:02 +08:00
Koncord
6222c20e82
[Client] Convert MechanicsHelper to namespace
2017-06-27 16:43:53 +08:00
David Cernat
e5f5b047bc
[Client] Don't send empty ObjectSpawn packets for cells with no leveled creatures
2017-06-10 11:04:17 +03:00
David Cernat
f4cdedd8cb
[General] Synchronize summoned creatures
2017-05-30 10:11:01 +03:00
David Cernat
4e5c8873e0
[General] Use ObjectSpawn instead of ObjectPlace for actors
2017-05-29 06:59:05 +03:00
David Cernat
7177d56cfb
[Client] Only require refNumIndex & mpNum for CellStore::searchExact()
2017-05-27 16:59:23 +03:00