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

1063 commits

Author SHA1 Message Date
David Cernat
78a9a428a6 [Client] Remove unnecessary mwmp::Main::pressedKey() function
Additionally, add comment around where it was originally used.
2019-08-26 15:41:45 +03:00
David Cernat
e15428e139 [General] Remove "created by" stamps added by IntelliJ 2019-08-26 12:33:28 +03: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
b57c0bcafe Add OpenMW commits up to 6 June 2019
# Conflicts:
#	apps/openmw/mwgui/hud.cpp
#	apps/openmw/mwgui/jailscreen.cpp
#	apps/openmw/mwgui/waitdialog.cpp
#	apps/openmw/mwinput/inputmanagerimp.cpp
#	apps/openmw/mwworld/worldimp.hpp
2019-08-22 11:42:02 +03:00
David Cernat
95a5607509 Add OpenMW commits up to 22 Feb 2019
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwmechanics/spellcasting.cpp
#	apps/openmw/mwscript/containerextensions.cpp
2019-08-21 17:29:24 +03:00
David Cernat
cbba81df03 Add OpenMW commits up to 14 Nov 2018
# Conflicts:
#	.travis.yml
#	CI/before_install.linux.sh
#	CI/before_script.linux.sh
#	CMakeLists.txt
#	apps/openmw/CMakeLists.txt
#	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
#	apps/openmw/mwworld/containerstore.cpp
#	apps/openmw/mwworld/inventorystore.cpp
2019-08-21 09:04:36 +03:00
David Cernat
fba07194cf Add OpenMW commits up to 29 Oct 2018
# Conflicts:
#	apps/openmw/mwbase/world.hpp
#	apps/openmw/mwinput/inputmanagerimp.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwmechanics/aicombat.cpp
#	apps/openmw/mwmechanics/character.cpp
#	apps/openmw/mwworld/worldimp.cpp
#	apps/openmw/mwworld/worldimp.hpp
2019-08-20 13:15:00 +03:00
David Cernat
0339958e21 [General] Rename Log class into TimedLog 2019-08-19 21:39:33 +03:00
David Cernat
ab93b5ddc5 [General] Use PlayerItemUse packets when using items through quick keys 2019-08-16 05:50:07 +03:00
David Cernat
ae5200cbb2 [General] Implement light records for RecordDynamic packets 2019-08-14 21:10:53 +03:00
David Cernat
1d09763bad [Client] Allow blanking out the enchantment IDs of records using a base 2019-08-08 08:05:10 +03:00
David Cernat
14af0be657 [General] Include AI alarm & flee for creatures/NPCs in RecordDynamic 2019-08-07 11:21:22 +03:00
David Cernat
ef432d1419 [General] Include AI services for creatures/NPCs in RecordDynamic 2019-08-07 10:44:07 +03:00
David Cernat
18e2a14645 [General] Implement tool-related records for RecordDynamic packets 2019-08-04 17:53:18 +03:00
David Cernat
4100d93dea [General] Implement ingredient records for RecordDynamic packets 2019-08-03 06:19:22 +03:00
David Cernat
247d2fad30 [General] Implement activator & static records for RecordDynamic packets 2019-08-01 09:48:57 +03:00
David Cernat
e9336e53fc [General] Implement container and door records for RecordDynamic packets 2019-07-27 03:45:50 +03:00
David Cernat
57f84914c3 [Client] Prevent permanent deletion of player markers on cell changes 2019-07-14 22:42:55 +03:00
David Cernat
77952440f6 [Client] Clean up handling of draw states 2019-06-19 08:24:53 +03:00
David Cernat
01804af100 [Client] Add updateInventoryWindow() method to LocalPlayer 2019-06-09 01:00:01 +03:00
David Cernat
49fa35a516 [Client] Use ObjectActivate packets when picking up items from inventory 2019-06-09 01:00:01 +03:00
David Cernat
f29bfb6b8e [Client] Add debug for received kill counts 2019-05-22 23:20:44 +03:00
David Cernat
437854180c [Client] Clean up variable & function names in mwmp/Main.cpp 2019-04-25 04:29:54 +03:00
uramer
c89efd251c [General] Implement CellReset packet, stage 2 2019-04-07 01:27:15 +02:00
uramer
6cb4d5ec35 [General] Implement CellReset packet, stage 1 2019-03-24 13:23:13 +01:00
David Cernat
3effd5f1ff [General] Update positions for dead players on other clients
Dead players will now show up at the correct cell and position for living players, making server scripts that allow players to revive each other much more functional.
2019-03-24 03:52:05 +02:00
David Cernat
8ff2d1b829 [General] Rename CellReplace packet into CellReset 2019-03-22 21:33:34 +02:00
David Cernat
9fc4c83858 [Client] Send skill/attribute packets when skills/attributes are damaged 2019-03-20 18:40:46 +02:00
David Cernat
dcbc9d1831 [Client] Print cells for actor deaths 2019-02-21 21:51:02 +02:00
David Cernat
1df1515c7e [Client] Add logging for invalid enchantmentIds in RecordHelper 2019-01-23 01:04:59 +02:00
David Cernat
999ce857c7 [Client] Add logging for records ignored due to their invalid baseIds 2019-01-23 00:48:06 +02:00
David Cernat
db7e09f441 [Client] Use more consistent logging when reading dynamic record packets 2019-01-23 00:38:05 +02:00
David Cernat
0fa116b47d [Client] Remove useless lines in RecordHelper 2019-01-23 00:20:51 +02:00
David Cernat
6e47b65205 [Client] Set attribute increases & level progress after correct packets
Originally, the PlayerSkill packet contained skills, attribute increases and level progress. In 78441c769a, the attribute increases were moved to the PlayerAttribute packet and the level progress was moved to the PlayerLevel packet, but – due to an oversight – attribute increases and level progress were still being applied to the local player only when a PlayerSkill packet was received, based on whatever values were stored from the last PlayerAttribute and PlayerLevel packets.
2019-01-11 14:26:13 +02:00
David Cernat
8a99f215f6 [Client] Add LocalPlayer::sendItemChange() variant with mwmp::Item arg 2019-01-11 12:54:47 +02:00
David Cernat
db9c1b9882 [Client] Add MechanicsHelper::getItem() for getting mwmp::Item from Ptr 2019-01-11 12:53:26 +02:00
David Cernat
43f195f0c7 [Client] Use clearer debug for actor initializations 2019-01-05 23:27:35 +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
433a69a588 [Client] Send all data for newly initialized LocalActors at least once 2018-12-31 04:36:59 +02:00
David Cernat
e96091fd6b [General] Use more consistent variable names for password, address, etc. 2018-12-30 17:23:12 +02:00
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.
2018-12-26 13:41:19 +02:00
David Cernat
d05a82a734 [Client] Avoid repetitive code when unequipping items in resurrection 2018-12-04 03:55:03 +02:00
David Cernat
b39e3f518b [Client] Use correct log levels for inventory and dynamic record packets 2018-11-30 23:38:16 +02:00
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".
2018-11-17 16:54:14 +01: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
Koncord
e5e13b21ae [Client] Fix crash on drag&drop 2018-10-28 16:56:04 +08:00
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.
2018-10-22 13:22:23 +03:00
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.
2018-10-13 15:36:13 +03:00
David Cernat
66d666d60c [Client] Use less confusing terminology when displaying plugin mismatch 2018-10-13 14:40:49 +03:00
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
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
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
8012d0d7b7 [General] Include hit position in PlayerAttack and ActorAttack packets 2018-09-08 05:29:49 +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
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
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
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
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
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
David Cernat
9497c7f6f2 [Client] Add back mistakenly removed setting of mpNums for spawns 2018-07-27 00:36:05 +03:00
David Cernat
25fcd09780 [Client] Add doesNpcExist() method to RecordHelper 2018-07-26 23:57:42 +03:00
David Cernat
7995466e3c [Client] Check validity of refIds in ObjectSpawn packets
This reverts c7bcf70c32 because it provides a better solution to the problem solved there, while solving another related problem as well.
2018-07-26 23:57:22 +03:00
David Cernat
8d286657d4 [Client] Update messages when unilaterally creating custom objects 2018-07-26 23:32:31 +03:00
David Cernat
c7bcf70c32 [Client] Ignore ObjectSpawn packets trying to spawn non-actors 2018-07-26 22:41:04 +03:00
David Cernat
d93b67ef21 [General] Sync soul refIds for items and add related script functions 2018-07-26 22:37:04 +03:00
David Cernat
f52364e05c [Client] Always create new references for new creature disguises
Previously, attempts to reuse the same reference for multiple creature disguises led to movement animation issues, as well as a dynamic_cast error in Creature::getInventoryStore() that made a DedicatedPlayer vanish completely when they first lost their creature disguise, then disguised themselves as a creature that could not hold weapons and then disguised themselves as a creature that could hold weapons.
2018-07-26 21:08:12 +03:00
David Cernat
60bc7447d9 [Client] Rework RecordHelper and add methods for other record types
The usage of const_cast has been replaced with usage of MWWorld::getModifiableStore() and ESMStore::overrideRecord()

Methods whose names started with "update" now start with "override", for consistency with ESMStore's overrideRecord()

New methods have been added for "overriding" enchantment, potion and spell records, which actually leads to them being created with their already set refIds if they haven't been created yet, as per the description of ESMStore::overrideRecord(): "Insert a record with set ID, and allow it to override a pre-existing static record."

Usage of RecordHelper methods has been updated in DedicatedPlayer.
2018-07-26 21:01:59 +03:00
David Cernat
b4802e4201 [General] Use Time struct for time in BaseWorldstate 2018-07-26 19:01:27 +03:00
David Cernat
a4b588d1b5 [General] Add optional timestamps to journal entries in PlayerJournal 2018-07-26 04:36:12 +03:00
David Cernat
8fbed1f808 [General] Remove custom data from PlayerSpellbook packet
It has never made sense to have custom spell data in PlayerSpellbook packets, so it has been removed.
2018-07-24 20:58:55 +03:00
David Cernat
b69e6b96e6 [Client] Use verbose logging level for LocalActor debug 2018-07-23 22:11:59 +03:00
David Cernat
36ac2d9de4 [Client] Set packetOrigin for all ObjectList packets sent 2018-07-23 01:39:43 +03:00
David Cernat
692ee01340 [Client] Add ScriptController w/ contextType-to-packetOrigin method 2018-07-23 00:48:23 +03:00
David Cernat
8c0b75d9f4 [Client] Limit PlayerEquipment packets sent by recharging enchantments 2018-07-22 15:30:40 +03:00
David Cernat
18f8725d33 [Client] Remove tab character that somehow made its way into a comment 2018-07-22 10:29:14 +03:00
David Cernat
038757b91a [General] Temporarily revert to original rotation animation sync
I originally added rotation animation sync as part of commit 068a45be87. Unfortunately, it meant the PlayerPosition packets were now twice as large as they had been before, which was less than ideal for such a frequently sent packet, which is why Koncord switched to a more optimized approach in commits 5f30dfd5db and d67db1a9bd.

Recently, there have since been some rotation animation problems in OpenMW, which have broken the way Koncord's approach looks. My original approach still looks somewhat okay, so I'm switching back to it until we can figure out how to reuse it under the current circumstances.
2018-07-21 19:27:36 +03:00
David Cernat
3944c8aec6 [Client] Ignore WorldRegionAuthority packets that have an empty region 2018-07-21 18:28:31 +03:00
David Cernat
99e64bdcd7 [Client] Remove unused localWeather variable from Worldstate 2018-07-21 16:25:49 +03:00
David Cernat
cd1fc590a7 [Client] Differentiate itemPtr from actor Ptr in DedicatedPlayer method
This fixes a mistake from 8f7da49152
2018-07-21 16:14:07 +03:00
David Cernat
5466092582 [Client] Reduce log level for actor cell changes 2018-07-21 14:41:48 +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
0f0e8b7c08 [Client] Adjust log levels used for weather and global map 2018-07-21 12:08:31 +03:00
David Cernat
f1315ef30d [Cllient] Differentiate itemPtr from actor Ptr in DedicatedActor methods
2427a4f877 mistakenly used the variable name "ptr" for both the actor and the items in that actor's inventory.
2018-07-21 10:16:51 +03:00
David Cernat
b6324e3532 [Client] Clean up debug for spell usage 2018-07-21 09:41:36 +03:00
David Cernat
421d0e7a99 [Client] Make forceWeather false by default for client-sent weather 2018-07-21 05:21:26 +03:00
David Cernat
892d71ce71 [General] Reimplement weather synchronization to allow soft transitions
Although weather sync was added by Koncord to the rewrite in fd721143e2 in a way that used surprisingly few lines of code, it relied on the server requesting weather states every second from authority players and sending them to non-authority players, while also allowing only very sudden weather transitions across regions, i.e. if there was one player in the Ascadian Isles who had stormy weather, and another player with clear weather in the Bitter Coast Region walked across to the Ascadian Isles, that player was instantly made to have stormy weather with no kind of transition at all.

My approach solves both of those problems. It solves the packet spam by only sending weather updates to the server when weather changes happen or when there are new arrivals to a weather authority's region, and it allows for both sudden weather transitions when players teleport to a region and for soft, gradual transitions when players walk across to a region. It is inspired by my previous actor sync, and uses a WorldRegionAuthority packet to set players as region authorities in a similar way to how ActorAuthority sets players as cell AI authorities. Weather changes are created only by the region authority for a given region, and weather packets are also only sent by that authority.

However, it should be noted that gradual weather transitions are used by default in this implementation. To use sudden weather transitions, the serverside Lua scripts need to forward WorldWeather packets with the forceWeather boolean set to true. That is, however, already handled by our default Lua scripts in situations where it makes sense.
2018-07-21 05:20:26 +03:00
David Cernat
9823a77bf2 [General] Turn PlayerRegionAuthority into WorldRegionAuthority
WorldRegionAuthority is a Worldstate packet.
2018-07-17 09:21:13 +03:00
David Cernat
0b5cb15f71 [General] Turn GameWeather into WorldWeather, now a WorldstatePacket 2018-07-16 02:20:43 +03:00
David Cernat
3649cf553f [General] Rename PlayerKillCount into WorldKillCount
This should clarify the real meaning of the packet and its associated event.

The event itself has been renamed from OnPlayerKillCount to OnWorldKillCount.
2018-07-15 05:34:59 +03:00
David Cernat
f13705e8be [Client] Improve debug for ObjectActivate and ConsoleCommand 2018-07-15 04:09:19 +03:00
David Cernat
6ebe09375f [General] Implement ObjectActivate packet & associated script functions 2018-07-15 03:16:04 +03:00
David Cernat
81b160cae8 [General] Add placeholder for ObjectActivate packet 2018-07-15 01:08:31 +03:00
David Cernat
61da0d2475 [General] Turn PlayerInteraction into PlayerInput 2018-07-15 00:36:07 +03:00
David Cernat
32b6134fad [General] Add placeholder for CellReplace packet 2018-07-15 00:17:13 +03:00
David Cernat
a471f5e452 [General] Turn CellCreate into a Worldstate packet 2018-07-14 23:51:49 +03:00
David Cernat
743933134d [Client] Simplify sending of ActorAI packets for uninitialized actors 2018-07-14 01:00:27 +03:00
David Cernat
528bd26a3b [General] Allow followers to follow non-authority players through cells 2018-07-13 21:27:29 +03:00
David Cernat
6c1173d598 [Client] Rename searchPtrViaRefIndex into searchPtrViaUniqueIndex 2018-07-13 04:33:54 +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
6316f1e590 [Client] Add ActorList methods for sending ActorAI packets
Additionally, use consistent capitalization for AI-related methods.
2018-07-12 20:48:47 +03:00
David Cernat
0fd8f7660b [Client] Replace LocalActor arg with BaseActor in ActorList functions 2018-07-12 20:15:04 +03:00
David Cernat
bdf2f03c4f [General] Remove unnecessary MapChanges struct from BaseWorldstate 2018-07-12 05:06:31 +03:00
David Cernat
59a56ca35e [Client] Disallow clients from scaling their associated players
Additionally, display messages when trying to scale players.
2018-07-12 03:29:38 +03:00
David Cernat
8ca29dbaac [Client] Fix remaining mistakes in debug for received ActorAI packets 2018-07-11 23:11:37 +03:00
David Cernat
25f7a55495 [Client] Improve debug for received ActorAI packets 2018-07-11 19:54:56 +03:00
David Cernat
bff6e9e235 [General] Implement ActorAI packet, part 5
Allow repetition for AiWander package to be turned on and off.
2018-07-10 23:18:32 +03:00
David Cernat
2e31c212c0 [Client] Make any ActorAI packet override an actor's desire to fight 2018-07-10 11:33:07 +03:00
David Cernat
79ee976c95 [Client] Implement ACTIVATE action in DedicatedActor::setAI()
Additionally, clean up usage of CreatureStats in DedicatedActor.
2018-07-10 11:31:51 +03:00
David Cernat
00c13ae96c [General] Implement ActorAI packet, part 4
The server can now make actors activate players and objects, at least in theory. In practice, OpenMW''s AiActivate package needs to be worked so it allows specific objects as targets instead of just refIds.
2018-07-10 07:07:37 +03:00
David Cernat
0e13207afe [General] Implement ActorAI packet, part 3
The server can now cancel actor AI, make actors travel to a location, make actors wander, and make actors get escorted by a player or another actor.
2018-07-10 05:07:58 +03:00
David Cernat
5baef09f79 [General] Implement ActorAI packet, part 2
The server can now make actors start combat with players or other actors.
2018-07-10 02:47:52 +03:00
David Cernat
5628f3b977 [Client] Fix debug for DedicatedActor::setAI() 2018-07-10 02:05:10 +03:00
David Cernat
b86155dc11 [Client] Allow AiFollow package to have infinite distance when desired 2018-07-10 01:40:57 +03:00
David Cernat
864c66d1d4 [Client] Make sure hasAiTarget is set correctly for DedicatedActors 2018-07-10 01:35:38 +03:00
David Cernat
3ed9d89280 [General] Use separate variables for video & music filenames in packets 2018-07-07 14:40:35 +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
4b30a44816 [Client] Compare crimeTime and deathTime when NPCs forgive player crimes
Previously, all crime witnesses stopped being hostile to a respawning player for as long as the player's diedSinceArrestAttempt was true. That meant that, in an area with no guards to arrest the player, crime witnesses did not enage in combat with the player at all ever again until diedSinceArrestAttempt became false.

This commit makes it so the time of the last crime is recorded for each witness, and that is then compared with the time of the LocalPlayer's last death for a one-time crime forgiveness during that player's current life.

This is essentially a gameplay adjustment for "singleplayer with respawns," and will have to be reworked to make sense for every player in multiplayer, though that requires reworking the crime system as a whole and is thus on hold.
2018-07-06 14:17:54 +03:00
David Cernat
c23fc3446f [Client] Avoid sending map tiles for Wilderness cells 2018-07-06 03:54:34 +03:00
David Cernat
17c234d9ca [Client] Use initial values for LocalPlayer and LocalActor killers 2018-07-06 02:07:55 +03:00
David Cernat
97cd3effa7 [Client] Make actor debug consistent with object debug 2018-07-06 00:32:45 +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
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
691b332d03 [Client] Use MechanicsHelper::getTarget() for summoners in ObjectList 2018-07-05 16:38:03 +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
c2411982d2 [Client] Log object refNumIndexes and mpNums in a consistent way 2018-07-04 21:54:11 +03:00
David Cernat
8a23a96da4 [Client] Update initialization of AiFollow packages in multiplayer code 2018-07-04 04:00:12 +03:00
Koncord
c5c1a160b2 [Client] Comment out an unused variable 2018-07-03 03:35:48 +08:00
David Cernat
bef53749ed [General] Replace BaseObject's hasMaster variable with isSummon
Additionally, add a GetObjectSummonState() script function to the server.
2018-07-02 02:25:06 +03:00
David Cernat
958b220835 [General] Send summon duration to server in ObjectSpawn packets 2018-07-01 00:43:29 +03:00
David Cernat
7ffdb18bf9 [General] Implement ActorDeath packet, part 1
ActorDeath packets are sent for dead actors before their StatsDynamic packets. They contain the actor's deathReason in a manner similar to that of PlayerDeath packets.

A future commit will replace the deathReason with a variable named killer which will be an mwmp::Target.
2018-06-27 21:47:55 +03:00
David Cernat
fec500c4b0 [Client] Reduce container debug spam by requiring VERBOSE logging for it 2018-06-26 23:40:19 +03:00
David Cernat
914b79fcc9 [General] Make it possible to check which placed objects have containers 2018-06-26 16:56:08 +03:00
David Cernat
deda6ec071 [Client] Don't send WorldMap packets for already explored map tiles 2018-06-25 02:34:11 +03:00
David Cernat
7e90d1f2a4 [Client] Fix interior-to-exterior and v.v. cell transitions for actors
Make sure only players who are cell authorities can get actors to teleport across cells for them, and display a message box for players who are not cell authorities.
2018-06-21 16:44:49 +03:00
David Cernat
aa3639f2da
Merge pull request #450 from TES3MP/0.6.2
Add 0.6.2 commits up to 19 Jun 2018
2018-06-19 05:26:38 +03:00
David Cernat
5b461b09ca [Client] Display error when receiving ID_INCOMPATIBLE_PROTOCOL_VERSION 2018-06-19 05:24:26 +03:00
David Cernat
29be79e852 [General] Switch RakNet enums to CrabNet enums
CrabNet is TES3MP's fork of RakNet that has deviated too far from RakNet to still be compatible with it.
2018-06-19 00:37:52 +03:00
David Cernat
72862dc255 [General] Turn PlayerMap into WorldMap, now a Worldstate packet 2018-06-07 12:51:45 +03:00
David Cernat
0d0c4ac235 [Client] Use REPLY_TO_REQUEST container sub-action for partial requests 2018-06-05 19:40:39 +03:00
David Cernat
83014d6381 [Client] Set actors as the owners of their items when editing containers 2018-06-05 14:55:57 +03:00
David Cernat
494edbe5cb [General] Add REPLY_TO_REQUEST container sub-action 2018-06-05 14:16:27 +03:00
David Cernat
8ea9485e6b [Client] Make container debug information more useful 2018-06-05 12:01:16 +03:00
David Cernat
3efe05a88e [General] Implement WorldCollisionOverride packet 2018-05-27 16:05:40 +03:00
David Cernat
e8ec031a81 [Client] Create Worldstate class that inherits BaseWorldstate 2018-05-27 15:57:47 +03:00
David Cernat
f7a084c824 [Client] Use faster check for whether actors are DedicatedPlayers 2018-05-26 08:13:26 +03:00
David Cernat
416ee77639 [General] Add placeholder for WorldCollisionOverride packet 2018-05-25 07:09:32 +03:00
David Cernat
2edb511a0b [Client] Remove unnecessary condition from WorldTime processor 2018-05-25 07:08:51 +03:00
David Cernat
3b5fb9cd6b [General] Make it possible to set year via WorldTime 2018-05-25 03:33:12 +03:00
David Cernat
4acf93b7db [General] Make it possible to set days passed via WorldTime 2018-05-24 14:02:04 +03:00
David Cernat
46744ee90f [General] Make WorldTime script functions more consistent with others 2018-05-24 09:38:06 +03:00
David Cernat
8d36d0d945 [General] Make it possible to change world's time scale via WorldTime 2018-05-23 08:31:25 +03:00
David Cernat
0be6de6607 [General] Turn RecordDynamic into a Worldstate packet 2018-05-23 07:48:28 +03:00
David Cernat
da66face25 [General] Rename GameTime packet into WorldTime 2018-05-23 00:41:29 +03:00
David Cernat
5af1150ab2 [General] Turn GameTime into a Worldstate packet 2018-05-21 07:14:08 +03:00
David Cernat
e87e1dbb30 [General] Fix Worldstate packets by adding missing lines 2018-05-21 07:12:55 +03:00
David Cernat
43a944ddaf [General] Add and implement new Worldstate packet type 2018-05-18 06:40:28 +03:00
David Cernat
049d0d9ba7 [General] Fix remaining references to world packets/events 2018-05-17 00:08:37 +03:00
David Cernat
51698bed48 [Client] Rename WorldProcessor into ObjectProcessor 2018-05-15 22:56:47 +03:00
David Cernat
78234f9071 [General] Rename Event into ObjectList & WorldObject into BaseObject 2018-05-13 00:42:24 +03:00
David Cernat
6bf3a0be1e [General] Rename WorldPackets into ObjectPackets for clarity 2018-05-12 19:40:00 +03:00
David Cernat
77389538e8 [General] Implement ActorAI packet, part 1
The server can now make actors become followers of players or other actors.
2018-05-12 06:29:11 +03:00
David Cernat
7f00005f04 [Client] Fix GCC build
Based on 71040659ac
2018-05-10 07:16:33 +03:00
David Cernat
715012f087 [General] Implement sending of image data for map tiles in PlayerMap 2018-05-08 05:57:04 +03:00
David Cernat
df0f9b0f5e [Client] Require a certain Skill progress amount before sending packet 2018-05-01 19:34:21 +03:00
David Cernat
1b1e5e86d1 [Client] Avoid sending CellStates to server after initialization
Although b4e8560698 made players instantly able to see each other on minimalist servers that did not change their cells from the default, it created problems with the default CoreScripts where players need to be logged in before receipt of a CellStates packet from them is taken into account, with the result being that a player was recorded as having loaded their initial cells on the server's C++ side but not on the Lua side.

It may simply be best to expect servers to set player cells.
2018-05-01 18:19:52 +03:00
David Cernat
099f85be0a [General] Implement PlayerMomentum packet & associated script functions 2018-04-29 23:47:17 +03:00
David Cernat
4b501a39f4 [General] Implement DoorDestination packet & associated script functions 2018-04-29 22:32:22 +03:00
David Cernat
3b07dc4b42 [Client] Send equipment packets whenever an item charge or count changes
Since the beginnings of TES3MP, equipment packets have only been sent whenever an item has been replaced by an item with a different refId, with changes in an item's charge or count not sending a packet (but being included in the next packet sent as a result of a refId change). The reason for this was ostensibly the fact that every single equipment packet always included the details for all 19 equipment items (as per Koncord's original design decision), which would have led to massive packet spam if such a packet was sent every time you shot an arrow or lost a little bit of your armor's condition.

With minimalist equipment packets, it is now viable to send equipment packets whenever any item changes in some way, by having the equipment packet contain only that one item.
2018-04-29 05:40:42 +03:00
David Cernat
399e049d87 [Client] Fix logic for minimal size packets in LocalPlayer
Previously, the index changes were not cleared at the start of their corresponding update functions, which in turn meant that an Attribute/Skill/StatsDynamic/Equipment packet received by a player from the server made that player send back the same packet, as the index changes from it were retained.

Additionally, exchangeFullInfo was not set to false, thus sometimes leading to constant full exchanges of information.
2018-04-27 03:45:17 +03:00
David Cernat
608dcbafe6 [Client] Fix skill updates for LocalPlayer partially broken by 78441c769a 2018-04-22 11:22:36 +03:00
David Cernat
a541d7df3c [General] Rework PlayerStatsDynamic packets so they are of minimal size
(cherry picked from commit fc5e883160)
2018-04-21 00:43:49 +03:00
David Cernat
b9520c11da [General] Rework PlayerEquipment packets so they are of minimal size
Moreover, rename BaseNetCreature's equipedItems into equipmentItems.

(cherry picked from commit d1ad0c91f8)
2018-04-20 22:46:16 +03:00
David Cernat
c5b08d6109 [General] Simplify storing of attribute and skill index changes
(cherry picked from commit bd9e8bd10f)
2018-04-19 23:28:03 +03:00
David Cernat
2c77d5f498 [General] Set enforcedLogLevel to -1 when initializing BasePlayer 2018-04-19 20:42:27 +03:00
David Cernat
b6099024df [General] Rework PlayerAttribute packets so they are of minimal size
Previously, whenever a single attribute value changed for a player, that player then sent a PlayerAttribute packet with all values for all 8 attributes.

This did not cause anywhere as much packet spam as PlayerSkill used to, but there was no good reason not to fix it as well.

(cherry picked from commit b0965f094a)
2018-04-19 17:26:20 +03:00
David Cernat
78441c769a [General] Rework PlayerSkill packets so they are of minimal size
Previously, whenever a single skill value changed for a player, that player then sent a PlayerSkill packet with all values for all 27 skills, plus the player's progress towards the next level and the bonuses to each attribute on the next level up as the result of sklll increases thus far.

This commit makes PlayerSkill contain only the values of specific skills, moves the player's progress towards the next level to PlayerLevel packets, and moves the bonuses to each attribute on the next level up to PlayerAttribute packets.

Players now also send a PlayerSkill packet whenever their progress towards a new point in a skill changes. This was previously avoided so as to not have massive packet spam.

(cherry picked from commit ef79a98544)
2018-04-19 15:18:38 +03:00
David Cernat
af4fcb7261 [Client] Don't force skill update on cell change
Previously, an attempt by the server to simultaneously change a player's cell and skills (as you'd expect when a player file is loaded) led to:

1) The server sending the cell packet first and the skill packet afterwards

2) The player receiving the cell packet and sending their own skill packet as part of the client's forced skill update

3) The player receiving the skill packet from the server

4) The server receiving the skill packet from the player

The result was that, if the player then left the server without sending another skill packet, the server's memory retained the skills the player had sent instead of the skills it had sent to the player.

This is the first step in a solution to that situation and similar ones.

(cherry picked from commit cac4684986)

Note: In 0.6.x, this was only a problem if a player's cell was set by the server first and their skills were set next, i.e. this was not a problem in the default CoreScripts because the opposite order used there masked the problem. It was a more significant problem in 0.7 because all packets were queued for a player and sent in a specific hardcoded order.
2018-04-19 14:22:14 +03:00
David Cernat
28f1c1b0d3 [General] Rework CharGen slightly for clarity purposes
Previously, charGenStage.end was doing double duty as both the variable indicating the number of CharGen stages and – when set to 0 – the variable indicating that CharGen was over. The latter role is now filled by a new boolean.

(cherry picked from commit 926106cf8c)
2018-04-19 13:25:29 +03:00
David Cernat
9d46de88e0 [Client] Send cell states correctly after inputting name
Previously, initial cell states were sent in LocalPlayer::processCharGen() and were ignored by the server because the player was not yet regarded as loaded. The result was that existing players logging in could not see each other until they went through at least one cell change.

(cherry picked from commit b4e8560698)

# Conflicts:
#	apps/openmw/mwmp/LocalPlayer.cpp
2018-04-18 20:30:48 +03:00
David Cernat
50fe54af5d [Client] Update DedicatedPlayer creature if displayCreatureName changes 2018-04-17 15:23:10 +03:00
David Cernat
a01fc577f1 [Client] Add setAttributes() and setSkills() methods to DedicatedPlayer 2018-04-13 16:59:48 +03:00
David Cernat
716809f2db [Client] Prevent errors from NPC-only packets for DedicatedPlayers 2018-04-13 16:23:42 +03:00
David Cernat
68ee64902d [Client] Track & use previous race & creatureRefId for DedicatedPlayers 2018-04-13 16:16:43 +03:00
David Cernat
acb1335d78 [Client] Make creature disguises update correctly 2018-04-13 11:30:38 +03:00
David Cernat
70f9cb535e [General] Use RecordHelper methods to create and update DedicatedPlayers 2018-04-13 08:37:06 +03:00
David Cernat
9d27f5f154 [Client] Create RecordHelper class with initial NPC and creature methods 2018-04-12 14:18:19 +03:00
David Cernat
9697595857 [Client] Don't equip already equipped items in local setEquipment()
This avoids the following error when receiving repeated PlayerBaseInfo packets: "Error in frame: Invalid slot, make sure you are not calling RefData::setCount for a container object"

Additionally, only re-equip items as the result of a PlayerBaseInfo packet if resetStats is true (because of its side effect of auto-equipping items for the player).
2018-04-10 19:02:55 +03:00
David Cernat
72463cfdb6 [Client] Refresh equipment for DedicatedPlayers when setting base info
Additionally, move default fatigue value to DedicatedPlayer initialization.
2018-04-10 19:02:55 +03:00
David Cernat
73dea494c4 [General] Allow changes from PlayerBaseInfo without player stat reset 2018-04-09 19:21:19 +03:00
David Cernat
c132dc70d2 [Client] Make PlayerShapeshift turn DedicatedPlayers into creatures 2018-04-09 15:23:05 +03:00
David Cernat
141eb8b7c2 [Client] Streamline creation of references for DedicatedPlayers
Additionally, delete DedicatedPlayers who disconnect.

Previously, all disconnected DedicatedPlayers were still kept in memory, but never used again. There was code that suggested they were meant to be reused upon reconnecting, but that reuse had never actually been implemented, and would probably not be that useful anyway.
2018-04-08 15:02:43 +03:00
David Cernat
14f90e773d [Client] Split up creation of DedicatedPlayers into multiple methods
Additionally, print player guids using their string representations for consistency.

The creation and updating of DedicatedPlayer references remains very inelegant, but this commit is the first step towards fixing that.
2018-04-08 10:56:33 +03:00
David Cernat
c8abd11f5d [General] Move creature disguises for players to PlayerShapeshift packet
Additionally, make associated variables clearer, and move associated server script functions next to other shapeshifting functions.
2018-04-05 15:42:06 +03:00
David Cernat
34be9383e5 [General] Add isPlayer boolean to targets in packets 2018-04-05 12:48:53 +03:00
David Cernat
0eed05610b [Client] Fix autoequipping for creatures in WorldEvent::editContainers() 2018-04-03 15:22:51 +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
26a56d6a02 [Client] Include NPC/creature containers when adding all cell containers 2018-04-01 14:58:04 +03:00
David Cernat
1e3c4fd488 [Client] Fix ProcessorContainer typos caused by careless copy-pasting 2018-04-01 10:47:57 +03:00
David Cernat
f80f3bd484 [Client] Make it possible to reply to requests about specific containers
Previously, a Container packet with a REQUEST action always made the client respond with the contents of all the containers in that cell.

The previous behavior now only happens for requests that have no WorldObjects attached, while requests that have WorldObjects attached get a reply with the contents of those specific containers.
2018-04-01 10:00:39 +03:00
David Cernat
258e319acb [Client] Require InventoryStore for autoequipping actors 2018-04-01 09:02:26 +03:00
David Cernat
afe8c97cb9 [Client] Require InventoryStore for unequipping actors in editContainers 2018-04-01 08:41:57 +03:00
David Cernat
d8b48f6cf4 [Client] Remove redundant container methods from CellController 2018-04-01 07:11:43 +03:00
David Cernat
5f6ddcfc59 [General] Rework container sync to prevent item duping
A main priority in TES3MP development is to avoid making major changes to OpenMW code, so as to avoid merge conflicts in the future. Whenever avoiding potential conflicts seems especially difficult for the proper implementation of a particular multiplayer feature, that multiplayer feature is often put off until later or partially implemented with the intent of being revisited in the future.

Container sync is the perfect example. Previously, the OpenMW code for container actions was kept exactly as it was, with clients unilaterally accepting their own container changes as per singleplayer-specific code, with only the addition that clients sent container packets every time they made a change in a container, packets which were then forwarded unquestioningly by the server to other players. This meant that two players clicking on the same item in a container at the same time both managed to take it, thus duplicating the item.

Immediately after the packets were already forwarded, server scripts were able to check for incorrect changes, such as the removal of more items than should have existed in a container, but they had to send their own packets that attempted to fix what had already been accepted on the initial client and then forwarded to all clients, which was quite onerous in some scenarios, such as when a player on a slow connection immediately dropped items in the world after taking them from a container (which is why the default TES3MP serverside scripts made no attempt at sending corrective packets at all, preferring to expect the matter to be solved in a later C++ implementation).

This commit fixes item duping in containers by preventing container actions from initially running on clients and by ending the automatic forwarding of container packets by the server. Instead, clients now send container packets that act as requests for container actions, and serverside scripts have to forward these requests themselves. In other words, without a matching Container event in the server's Lua scripts, players are completely unable to affect containers for themselves or for others.

To forward a received Container packet, the following line must be used in a Container event in the Lua scripts:

tes3mp.SendContainer(true, true)

When an invalid action count is used in a container request, the serverside scripts can amend it using the following new function:

tes3mp.SetReceivedContainerItemActionCount(objectIndex, itemIndex, actionCount)

Thus, the serverside scripts are able to allow only container actions that are correct based on their own recorded contents for that container.

The OpenMW code allowing unilateral container actions in mwgui/container.cpp is now prevented from executing. When a player's container request is returned to them, code in mwmp/WorldEvent.cpp simulates those container actions instead.
2018-03-26 19:27:36 +03:00
David Cernat
9165b12d78 [Client] Update inventory views when receiving inventory or equipment 2018-03-26 10:01:26 +03:00
David Cernat
bbdc30628b [Client] Use the correct guid for a received WorldEvent or ActorList 2018-03-21 06:08:04 +02:00
David Cernat
14f0299322 [Client] Don't log InputBox inputs for client 2018-03-20 06:41:04 +02:00
David Cernat
20caea083a [Client] Use correct count for items in equipment packets
Previously, throwing weapon sync was completely broken for players, as the count for their equipped throwing weapons was never set and – as a result – defaulted to a count of 1 on other clients. As a result, any time a player threw a dart, they would then appear as having switched to hand-to-hand for other players.

Moreover, the count of equipped items was mistakenly based on the total count of items with that refId in the inventory. As a result, if – for example – I equipped 1 Daedric Longsword and had 4 others in my inventory, my DedicatedPlayer on other clients would equip a Daedric Longsword with a count of 5. If I was overencumbered by having that many Daedric Longswords on me and then dropped 4 of them, allowing myself to move again, my DedicatedPlayer would still walk around with 5 Daedric Longswords and lack animations due to still being overencumbered on the other clients.

These problems were less prevalent for actors, but their equipment updating code has also been changed to match that of players.
2018-03-12 23:31:37 +02:00
David Cernat
b249162ca1 [General] Implement setting of enforced client log level in GameSettings
Certain servers do not want the players to have debug information about the locations and actions of other players, so a client's log level can now be enforced by the server via the GameSettings packet.
2018-03-11 04:50:59 +02:00
David Cernat
a3a341fee6 [Server] Reimplement 4ebfcc4a21 for 0.6 2018-03-10 22:19:44 +02:00
David Cernat
03266d7648 [Client] Prevent guards from arresting players who are currently jailed 2018-02-25 21:33:04 +02:00
David Cernat
60f686ee43 [General] Implement setting of physics framerate as part of GameSettings 2018-02-14 05:53:44 +02:00
David Cernat
886b3431bc [Client] When resurrecting players, set pcknownwerewolf to 0
This makes it so players are no longer known werewolves and are no longer attacked infinitely by guards.
2018-02-13 21:55:10 +02:00
David Cernat
74765b3ace [General] Implement selected spell sync as part of PlayerMiscellaneous 2018-02-06 06:36:46 +02:00
David Cernat
029dfc56ba [General] Implement player scale as part of PlayerShapeshift 2018-02-01 02:11:45 +02:00
David Cernat
aa448523f8 [Client] Clean up WorldEvent::runConsoleCommands() slightly 2018-01-31 23:23:52 +02:00
David Cernat
ce5670e57e [Client] Ignore invalid object refIds from ObjectPlace packets 2018-01-31 18:51:53 +02:00
David Cernat
66078bfea7 [General] Implement Mark location sync as part of PlayerMiscellaneous 2018-01-31 04:50:29 +02:00
David Cernat
989f6e6b51 [General] Implement PlayerReputation packet 2018-01-30 22:55:29 +02:00
David Cernat
3d80e2db62 [General] Add placeholders for new packet types, part 2 2018-01-30 16:01:33 +02:00
David Cernat
02af7f6ba1 [General] Add placeholders for new packet types 2018-01-29 22:32:51 +02:00
David Cernat
ce11a1dfa9 [Client] Fix potential invalid pointer when storing cell unloads
Notably, builds of the client done with Clang were crashing on startup before this.
2018-01-29 00:14:26 +02:00
David Cernat
420dab10e1 [General] Track objects directly placed by players in ObjectPlace
This allows the OnPCDrop variable to get set correctly even when object placements have to go through the server first in order to gain a unique multiplayer index (mpNum).

Among other things, this makes it possible to roll marijuana joints in the popular mod "Tribunal Code Patch".
2018-01-28 17:46:51 +02:00
David Cernat
d7e29f1f61 [Client] Unequip items with constant effect damage when resurrected 2018-01-27 20:19:39 +02:00
David Cernat
d19d8b0a34 [Client] Add and use enchantmentType argument for unequipItemsByEffect() 2018-01-27 19:37:16 +02:00
David Cernat
6c4bb8c423 [Client] Move resurrection code for local player to LocalPlayer 2018-01-27 19:09:55 +02:00
David Cernat
6b75a82777 [Client] Ignore equipment items for DedicatedActors with count below 0 2018-01-27 18:08:45 +02:00
David Cernat
e3bc11d9eb [Client] Fix ListBox overlap crashes by removing ListBoxes properly 2018-01-27 15:41:11 +02:00
David Cernat
c6a85ee8f9 [Client] Add doesEffectListContainEffect() method to MechanicsHelper 2018-01-26 03:18:01 +02:00