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

87 commits

Author SHA1 Message Date
David Cernat
3f3fe66fde [General] Track casters of spells in SpellsActive packets
Also simplify sending of SpellsActive packets slightly.
2021-07-21 18:14:31 +02:00
David Cernat
3222afc8b7 [General] Implement PlayerCooldowns packet
Although this packet may be used for other kinds of cooldowns in the future, it currently only handles cooldowns for magical powers.
2021-07-10 22:15:19 +02:00
David Cernat
294f64d12d [General] Track timestamps for spells in SpellsActive packets
This makes it possible to remove a specific effect in effect stacks by checking its timestamp.
2021-07-04 12:54:11 +02:00
David Cernat
767287ae51 [General] Track stacking spells in SpellsActive packets 2021-06-10 13:27:52 +02:00
David Cernat
ae0e4a929f [Client] Add die() method to LocalPlayer 2020-11-15 01:02:58 +02:00
David Cernat
c56cd7c221 [General] Implement PlayerSpellsActive packet, part 1
Additions and removals of the local player's active spells can now be saved to and loaded from the server.
2020-07-10 02:09:11 +02:00
David Cernat
f8c557fbc0 [General] Read and use weapon quantity in RecordDynamic packets 2020-04-19 23:17:09 +03:00
David Cernat
dae805dbc1 [Client] Avoid PlayerInventory packet spam when creating many potions 2020-02-25 07:45:06 +02:00
David Cernat
31c0f5c976 [Client] Use clearer boolean name for checks regarding inventory sending 2020-02-22 23:59:42 +02:00
David Cernat
154a9ce5a6 [General] Fix declarations hiding class members, part 2 2019-12-04 10:17:33 +02:00
David Cernat
5b4db83d61 [Client] Once again allow beds to be used even if waiting is disallowed
This had been broken by rest-related commits in OpenMW.
2019-12-03 23:55:55 +02:00
David Cernat
c702eab93c [Client] Fix declarations hiding class members 2019-11-30 12:51:48 +02:00
David Cernat
16662d772b [General] Synchronize death animations for players 2019-11-29 12:52:47 +02:00
David Cernat
d163f1b6da [General] Turn WorldKillCount into a Worldstate packet
Rename the old WorldKillCount that was a Player packet into PlayerPlaceholder. Rename the unused CellCreate that was a Worldstate packet into WorldKillCount. On the server, move kill count-related script functions from QuestFunctions to WorldstateFunctions.
2019-10-08 11:09:08 +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
ab93b5ddc5 [General] Use PlayerItemUse packets when using items through quick keys 2019-08-16 05:50:07 +03:00
David Cernat
01804af100 [Client] Add updateInventoryWindow() method to LocalPlayer 2019-06-09 01:00:01 +03:00
David Cernat
8a99f215f6 [Client] Add LocalPlayer::sendItemChange() variant with mwmp::Item arg 2019-01-11 12:54:47 +02: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
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
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
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
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
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
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
72862dc255 [General] Turn PlayerMap into WorldMap, now a Worldstate packet 2018-06-07 12:51:45 +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
099f85be0a [General] Implement PlayerMomentum packet & associated script functions 2018-04-29 23:47:17 +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
73dea494c4 [General] Allow changes from PlayerBaseInfo without player stat reset 2018-04-09 19:21:19 +03: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
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
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
6c4bb8c423 [Client] Move resurrection code for local player to LocalPlayer 2018-01-27 19:09:55 +02:00
David Cernat
cac2c6c1e8 Merge pull request #360 from TES3MP/0.6.1-openmw-updates while resolving conflicts 2017-12-25 02:25:01 +02:00
David Cernat
535fba0cb3 [Client] Finish drag and drops when arrested or teleported by server 2017-12-16 07:21:02 +02:00
David Cernat
6668b9ab42 [General] Implement ConsoleCommand packet 2017-11-23 00:21:47 +02:00
David Cernat
be25decee2 [General] Implement PlayerSpeech packet 2017-10-31 15:19:14 +02:00
David Cernat
413893aa51 [General] Implement PlayerAnimPlay packet 2017-10-27 09:10:29 +03:00
David Cernat
50d5fffb7f [General] Add and implement PlayerQuickKeys packet 2017-10-25 07:21:00 +03:00
David Cernat
711c4d83da [Client] Fix build after recent OpenMW changes to GUI 2017-10-07 23:33:36 +03:00
David Cernat
43a3daf0aa [General] Add & implement PlayerShapeshift packet for werewolf states 2017-07-15 09:02:19 +03:00
David Cernat
e36c0afc59 [General] Send faction reputation via PlayerFaction packets 2017-07-13 13:36:00 +03:00
David Cernat
1d504a665f [General] Add RANK, EXPULSION and BOTH actions to PlayerFaction packets 2017-07-05 07:06:33 +03:00
David Cernat
71313c5aa6 [General] Implement PlayerMap packet, part 1 2017-07-03 09:28:27 +03:00
David Cernat
813a3c89c4 [General] Implement PlayerBook packet to track skill books read 2017-06-27 08:27:14 +03:00