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

12068 commits

Author SHA1 Message Date
Sam Hellawell
df1667b6e4 Cleanup fix for equip item crash on Linux
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
2018-10-11 21:49:24 +01:00
Sam Hellawell
1e171ad9fd Fix crash when equipping item on linux
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
2018-10-11 20:13:22 +01: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
3f304866fd [Client] Use clearer variable names in DedicatedPlayer::setEquipment() 2018-09-24 10:11:42 +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
7281f9fc42 [Client] Prevent unilateral paralysis of dedicated players & actors
This is a temporary workaround until active effect synchronization is implemented.
2018-09-16 15:34:57 +03:00
David Cernat
33a0886790 [Client] Fix synchronization of knockdown states 2018-09-15 04:59:06 +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
9d2dc96a2e [Client] Use RANGED type for ranged attacks that haven't hit a target 2018-09-14 13:23:43 +03:00
David Cernat
af49f711ca [Client] Add isUsingRangedWeapon() method to MechanicsHelper 2018-09-14 13:21:45 +03:00
David Cernat
3f6ca6f22b [Client] Bring drawState fallback for actors up-to-date w/ attack types 2018-09-11 15:12:11 +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
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.
2018-09-10 12:02:21 +03:00
David Cernat
c9ad411dd3 [Client] Fix logic for setting applyProjectileEnchantment in attack sync 2018-09-09 22:33:48 +03:00
David Cernat
8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 2018-09-08 05:29:49 +03:00
David Cernat
dcd4478028 [Client] Always stop sending weather updates when moving to an interior 2018-09-07 08:37:22 +03:00
David Cernat
113002ca19 [Client] Return early when processing actors that can't be initialized 2018-09-05 20:03:35 +03:00
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.
2018-08-28 05:01:52 +03:00
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.
2018-08-21 10:10:06 +03:00
David Cernat
45b011452e [Client] Combine methods for sending spell packets into a single one 2018-08-21 01:20:30 +03:00
David Cernat
140e0ed52c [Client] Also clear aiActors when clearing ActorList 2018-08-20 20:54:34 +03:00
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.
2018-08-20 15:24:20 +03:00
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
2018-08-20 14:08:44 +03:00
David Cernat
7efee0e968 [Client] Fix GCC build 2018-08-20 10:15:30 +03:00
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.
2018-08-16 03:50:41 +03:00
David Cernat
5fd4113978 [General] Implement sending of ActorSpeech packets from server scripts 2018-08-13 20:39:03 +03:00
David Cernat
338efdb705 [General] Fix issues with MechanicsHelper::getItemPtrFromStore() 2018-08-11 19:00:02 +03:00
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.
2018-08-11 16:05:37 +03:00
David Cernat
a3b9274365 [Client] Make it possible to check if an item ID belongs to a bound item 2018-08-11 16:02:09 +03:00
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.
2018-08-11 15:28:03 +03:00
Marc Zinnschlag
1cfc1f9bdb Merged pull request #1666 2018-08-10 12:23:17 +02:00
Marc Zinnschlag
0aedb3aada Merged puil request #1808 2018-08-10 12:22:13 +02:00
Marc Zinnschlag
24212d58e8 Merged pull request #1861 2018-08-10 12:21:05 +02:00
Andrei Kortunov
cde95979d0 Fix combat engagement for creatures 2018-08-10 09:29:01 +04:00
David Cernat
5d66a9bb66 [Client] Fix path to MechanicsHelper in ProcessorPlayerItemUse 2018-08-09 22:33:22 +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
Andrei Kortunov
780648b584 Do not reset idle animations if we do not have ammo 2018-08-09 16:39:46 +04:00
Andrei Kortunov
df577babe9 Increase priority of 1st-person weapon animations to avoid issues with animation blending 2018-08-09 16:39:20 +04:00
Andrei Kortunov
71bcc11ba5 Apply only crossbow reload animation to upper body 2018-08-09 16:37:08 +04:00
Andrei Kortunov
a0d0e5d2db Give jumping animations higher priority than movement ones 2018-08-09 16:19:03 +04:00
Andrei Kortunov
6a03aa6fdb Reduce jittering during turning animations for player 2018-08-09 16:19:00 +04:00
Andrei Kortunov
cd92014533 Do not touch GUI modes when taking screenshots (bug #4528) 2018-08-09 16:19:00 +04:00
Marc Zinnschlag
fe19d8ff35 Merged pull request #1857 2018-08-09 13:52:51 +02:00
Marc Zinnschlag
a2a57cf694 Merged pull request #1858 2018-08-09 13:51:31 +02:00
Marc Zinnschlag
0f510011b3 Merged pull request #1852 2018-08-09 13:49:50 +02:00
Andrei Kortunov
126b2fdd42 Use the isPlayer variable to do not check if the current actor is player every time 2018-08-09 11:16:19 +04:00
Andrei Kortunov
51af729305 Do not use headtracking in the 1st-person view (bug #4573) 2018-08-08 23:29:03 +04:00
Andrei Kortunov
6202b4eca9 Do not touch GUI modes when taking screenshots (bug #4528) 2018-08-08 22:10:53 +04:00
Capostrophic
e9e9c0dd6b Fix guild guide fast travelling to exteriors time 2018-08-08 12:46:36 +03:00
Andrei Kortunov
b7859b3fa9 Cap underwater view distance (bug #4565) 2018-08-08 13:22:40 +04:00
Capostrophic
bcd9cc4baa Check the actor cell instead of the destination cell in fast travel price logic 2018-08-08 02:07:48 +03:00
Marc Zinnschlag
b75b5d139a Merged pull request #1845 2018-08-05 12:28:38 +02:00
Capostrophic
7087bad580 Use special behavior for all topics with reserved names (bug #4557) 2018-08-05 12:39:53 +03:00
David Cernat
888e1dfff8 [General] Allow setting of AI fight & dynamic stats in record packets
Additionally, allow the setting of the Autocalc flag for an NPC record based on an existing record.
2018-08-05 11:00:25 +03:00
Andrei Kortunov
b0f2e00e7f Make forcegreeting a non-op for non-actor objects (bug #4553) 2018-08-05 09:31:45 +04:00
Marc Zinnschlag
452a706047 Merged pull request #1837 2018-08-04 10:26:44 +02:00
Marc Zinnschlag
b6a919a2d1 Merged pull request #1838 2018-08-04 10:26:18 +02:00
Marc Zinnschlag
99c03d55f0 Merged pull request #1841 2018-08-04 10:25:52 +02:00
Marc Zinnschlag
2a621fedd1 Merged pull request #1842 2018-08-04 10:08:11 +02:00
Capostrophic
d15dcaff68
Don't adjust weapon rating according to weapon condition twice 2018-08-03 19:22:58 +03:00
Andrei Kortunov
e2519226aa Move boost include 2018-08-03 17:04:07 +04:00
Andrei Kortunov
eeffe2e557 Check if item model exists inside drag and drop functions 2018-08-03 16:42:43 +04:00
Andrei Kortunov
c2a175c2e0 Move crash catcher wrapper to separate file 2018-08-03 15:51:17 +04:00
Capostrophic
725a9323c4
Merge branch 'master' into sound 2018-08-03 14:16:51 +03:00
Capostrophic
4c7f3cf626
Merge branch 'master' into weaponpriority 2018-08-03 14:07:11 +03:00
Marc Zinnschlag
4d280add81 Merged pull request #1843 2018-08-03 12:56:17 +02:00
Marc Zinnschlag
d7718aae9b Merged pull request #1840 2018-08-03 12:54:56 +02:00
Marc Zinnschlag
eb5f558f6f Merged pull request #1839 2018-08-03 12:53:55 +02:00
Andrei Kortunov
712c9995db Rename mIsScripted variable because its name is ambiguous 2018-08-03 12:01:31 +04:00
Andrei Kortunov
c454f1bdad Use log file for editor (feature #4012) 2018-08-03 09:05:08 +04:00
Capostrophic
9d85b7c2d3
Use the actual damage for deducting weapon rating 2018-08-02 15:20:07 +03:00
Capostrophic
73d5496711
Revert addition change 2018-08-02 13:01:23 +03:00
Capostrophic
16af1a6c1c Replace 0 sound range values separately 2018-08-02 12:40:53 +03:00
Capostrophic
3ac030d75a
Handle explicit calls before handling quotes 2018-08-02 09:49:53 +03:00
Capostrophic
80f3bd9f86 Don't apply iWereWolfFleeMod to creatures 2018-08-02 08:36:15 +03:00
Capostrophic
fa6c205e5d Make tab autocompletion work with explicit reference calls 2018-08-02 03:24:31 +03:00
Capostrophic
bec47dfb7c Make ranged weapon bonus a distance-dependent multiplier 2018-08-01 19:57:05 +03:00
Capostrophic
382b68a081
Combat AI: take the actual hit chance in account when rating weapon 2018-08-01 19:27:19 +03:00
Andrei Kortunov
12144de8ed Initialize missing variables 2018-08-01 20:18:37 +04:00
Andrei Kortunov
c0bed0fde2 Handle case when index < 0 2018-08-01 20:17:59 +04:00
Andrei Kortunov
770d86f9bd Initialize cubeSize variable for 360 degrees screenshots correctly 2018-08-01 19:36:55 +04:00
Andrei Kortunov
a08048da4e Avoid dereference after null check 2018-08-01 19:30:30 +04:00
Capostrophic
ab29f9e13f Add permanent barter disposition change option (feature #3103) 2018-08-01 17:31:35 +03:00
Marc Zinnschlag
1c13256456 Merged pull request #1829 2018-08-01 16:17:37 +02:00
Marc Zinnschlag
0e75e3816a Merged pull request #1830 2018-08-01 16:16:30 +02:00
Marc Zinnschlag
0c507b74bc Merge pull request #1832 2018-08-01 16:13:59 +02:00
Capostrophic
be2e7e9e09 Make casting caster-linked on-self effects no-op (bug #4378) 2018-08-01 02:41:57 +03:00
Andrei Kortunov
5b92910829 Limit difficulty scaling, as mentioned in docs 2018-07-31 21:14:16 +04:00
Andrei Kortunov
c07cc0dc40 Reset animation state after weapon unequipping 2018-07-30 22:24:25 +04:00
Andrei Kortunov
0f2c3ecb17 Rescale player avatar (bug #4539) 2018-07-30 17:41:43 +04:00
David Cernat
b57807407a [General] Implement RecordDynamic packet, part 1
Spell, potion, enchantment, creature, NPC, armor, book, clothing, miscellaneous and weapon record data can now be sent in a RecordDynamic packet. Additionally, the packets include data related to associated magical effects (for spells, potions and enchantments), data related to default inventory contents (for creatures and NPCs) and data related to body parts affected (for armor and clothing).

The server now has associated script functions for setting most of the details of the above, with the main exception being individual creature and NPC stats.

Records can either be created entirely from scratch or can use an existing record (set via the baseId variable) as a starting point for their values. In the latter case, only the values that are specifically set override the starting values. Creature and NPC records also have an inventoryBaseId that can be used on top of the baseId to base their inventories on another existing record.

The client's RecordHelper class has been heavily expanded to allow for the above mentioned functionality.

When players create spells, potions and enchantments as part of regular gameplay, they send RecordDynamic packets that provide the server with the complete details of the records that should be created. When they create enchantments, they also provide the server with armor, book, clothing and weapon records corresponding to the items they've enchanted.

This functionality added by this packet was originally supposed to be exclusive to the rewrite, but I've gone ahead and tried to provide it for the pre-rewrite in a way that can mostly be reused for the rewrite.
2018-07-30 10:56:26 +03:00
Capostrophic
c79f96d0d2 Implement ranged crits (feature #3703) 2018-07-29 19:42:44 +03:00
Andrei Kortunov
1d463d129d Finish AiTarget package, if destination is blocked by other actor 2018-07-29 19:41:31 +04:00
Andrei Kortunov
75835c8326 Prevent NPC from chosing farther pathgrid node 2018-07-29 18:18:05 +04:00
Marc Zinnschlag
9e6cba09a6 Merged pull request #1827 2018-07-29 12:52:51 +02:00
Marc Zinnschlag
78121c1774 Merged pull request #1823 2018-07-29 12:49:50 +02:00