1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:19:54 +00:00
Commit graph

25 commits

Author SHA1 Message Date
David Cernat
154a9ce5a6 [General] Fix declarations hiding class members, part 2 2019-12-04 10:17:33 +02:00
David Cernat
47443e19cb [General] Use compression for string values used in Attack packets 2019-11-29 11:19:24 +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
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
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
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.
2018-09-18 01:13:48 +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
8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 2018-09-08 05:29:49 +03:00
David Cernat
ea8a41160c [General] Make ActorAttack packet consistent with PlayerAttack
Additionally, fix a typo in PlayerAttack where a boolean argument was outside of the parentheses it should have been in.
2018-07-24 22:43:00 +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
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
c075496748 [General] Replace deathReason in death packets with a killer variable
Add serverside script functions for determining the killers of both players and actors.

Use unsigned ints for script functions returning an object or actor's refNumIndex or mpNum.

Remove updateDeadState() from LocalPlayer and make its code part of updateStatsDynamic() for simplicity.
2018-07-05 22:24:51 +03:00
Koncord
23684489da [General] Fix clang-tidy warning
Converting integer literal to bool, use bool literal instead
2018-07-03 02:50:21 +08: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
Koncord
556bf18535 [General] Minor improvements for player packets
Add compression, remove useless loop iterations
2017-06-03 02:23:34 +08:00
David Cernat
cc2250815d [General] Add packet data for attacks on and by Actors 2017-04-18 10:03:58 +03:00
David Cernat
a650683bae [General] Add and use Target struct in mwmp::Attack 2017-04-17 18:31:39 +03:00
David Cernat
9882ceedf3 [General] Remove attackerGuid from mwmp::Attack because it is redundant 2017-04-17 18:03:33 +03:00
David Cernat
caf5428532 [General] Rename mwmp::Attack vars in preparation for Actor support 2017-04-17 17:24:11 +03:00
David Cernat
9f226253d4 [General] Rename mwmp::Attack's refid into refId for consistency 2017-04-17 09:35:18 +03:00
Koncord
690211ad99 [General] Extract BaseEvent & BasePlayer from packets to functions
Move Send and Read functions to BasePacket
2017-03-06 18:40:07 +08:00
David Cernat
04d45b9dbb [General] Rename packets to show they are for players only, not NPCs 2017-02-05 09:01:33 +02:00
Renamed from components/openmw-mp/Packets/Player/PacketAttack.cpp (Browse further)