Commit Graph

71 Commits (01804af100785bc2c162d568258d9662012627a3)

Author SHA1 Message Date
David Cernat 01804af100 [Client] Add updateInventoryWindow() method to LocalPlayer 5 years ago
David Cernat 8a99f215f6 [Client] Add LocalPlayer::sendItemChange() variant with mwmp::Item arg 5 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
David Cernat 45b011452e [Client] Combine methods for sending spell packets into a single one 6 years ago
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.
6 years ago
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.
6 years ago
David Cernat 59a56ca35e [Client] Disallow clients from scaling their associated players
Additionally, display messages when trying to scale players.
6 years ago
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.
6 years ago
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.
6 years ago
David Cernat 72862dc255 [General] Turn PlayerMap into WorldMap, now a Worldstate packet 6 years ago
David Cernat 715012f087 [General] Implement sending of image data for map tiles in PlayerMap 6 years ago
David Cernat 099f85be0a [General] Implement PlayerMomentum packet & associated script functions 6 years ago
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)
6 years ago
David Cernat 73dea494c4 [General] Allow changes from PlayerBaseInfo without player stat reset 6 years ago
David Cernat 74765b3ace [General] Implement selected spell sync as part of PlayerMiscellaneous 6 years ago
David Cernat 029dfc56ba [General] Implement player scale as part of PlayerShapeshift 6 years ago
David Cernat 66078bfea7 [General] Implement Mark location sync as part of PlayerMiscellaneous 6 years ago
David Cernat 989f6e6b51 [General] Implement PlayerReputation packet 6 years ago
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.
6 years ago
David Cernat 6c4bb8c423 [Client] Move resurrection code for local player to LocalPlayer 6 years ago
David Cernat cac2c6c1e8 Merge pull request #360 from TES3MP/0.6.1-openmw-updates while resolving conflicts 6 years ago
David Cernat 535fba0cb3 [Client] Finish drag and drops when arrested or teleported by server 7 years ago
David Cernat 6668b9ab42 [General] Implement ConsoleCommand packet 7 years ago
David Cernat be25decee2 [General] Implement PlayerSpeech packet 7 years ago
David Cernat 413893aa51 [General] Implement PlayerAnimPlay packet 7 years ago
David Cernat 50d5fffb7f [General] Add and implement PlayerQuickKeys packet 7 years ago
David Cernat 711c4d83da [Client] Fix build after recent OpenMW changes to GUI 7 years ago
David Cernat 43a3daf0aa [General] Add & implement PlayerShapeshift packet for werewolf states 7 years ago
David Cernat e36c0afc59 [General] Send faction reputation via PlayerFaction packets 7 years ago
David Cernat 1d504a665f [General] Add RANK, EXPULSION and BOTH actions to PlayerFaction packets 7 years ago
David Cernat 71313c5aa6 [General] Implement PlayerMap packet, part 1 7 years ago
David Cernat 813a3c89c4 [General] Implement PlayerBook packet to track skill books read 7 years ago
David Cernat 70d9374a6a [General] Implement PlayerKillCount packets 7 years ago
David Cernat 11369f6513 [General] Implement sending and reading of PlayerTopic packets 7 years ago
David Cernat e6983993c2 [General] Implement sending and reading of PlayerFaction packets 7 years ago
David Cernat 7b07d6651f [General] Add and use PlayerBounty packet and matching script functions 7 years ago
David Cernat 2e8714afaa [Client] Rethink and restructure tes3mp combat code so it works for NPCs 7 years ago
Koncord a6111b6599 [Client] Add PlayerProcessor & WorldProcessor 7 years ago
David Cernat 678edffb5a [Client] Rename updateDynamicStats() into updateStatsDynamic() 7 years ago
David Cernat e7960eee76 [General] Rename DrawState packets into AnimFlags ones for clarity 7 years ago
David Cernat 60d6a6d463 [Client] See when other players remove items from containers 7 years ago
David Cernat c1427b2558 [General] Simultaneously send loads & unloads in ID_PLAYER_CELL_STATE 7 years ago
David Cernat b5b5551fcd [Client] Add LocalPlayer::hasFinishedCharGen() method 7 years ago
David Cernat 97aabf4a7d [General] Sketch out sending of cell loading/unloading info in packets 7 years ago
David Cernat 35e453dec3 [General] Sketch out most of functionality for journal saving/loading 7 years ago
David Cernat e2c595fc5d Add preliminary structure for journal changes 7 years ago
David Cernat 83277a1512 Send spellbook in LocalPlayer CharGen & change UPDATE action name to SET 7 years ago
David Cernat 78c6ab2a99 Clean up client Networking by putting item & spell logic in LocalPlayer 7 years ago