Koncord
58a6a8c3bc
[Client] Update LocalPlayer to C++11
2017-06-27 20:43:39 +08:00
Koncord
6222c20e82
[Client] Convert MechanicsHelper to namespace
2017-06-27 16:43:53 +08:00
David Cernat
813a3c89c4
[General] Implement PlayerBook packet to track skill books read
2017-06-27 08:27:14 +03:00
David Cernat
78f29302ef
[General] Fix PlayerJournal logic by sending only refIds for its actors
...
Additionally, make the refIds for actors usable in script functions.
2017-06-23 08:12:32 +03:00
David Cernat
ebf7740969
[General] Repurpose GameConsole packet as GameSettings & add difficulty to it
2017-06-20 05:28:45 +03:00
David Cernat
70d9374a6a
[General] Implement PlayerKillCount packets
2017-06-10 14:04:19 +03:00
David Cernat
ee5c9b65c5
[General] When changing region, send new region name in PlayerCellChange
2017-06-10 11:43:40 +03:00
Koncord
ad873e16b8
[Client] Limiting updates to ~64 per second
2017-06-02 21:20:35 +08:00
Koncord
9742b0a801
[Client] Reset statTimer every timeout
2017-06-02 20:45:44 +08:00
Koncord
80631ae8bd
[Client] Reset positionTimer on time expired
2017-06-02 20:45:19 +08:00
Koncord
a847d46984
[Client] Get rid Z axis in direction.pos
2017-06-02 18:33:51 +08:00
Koncord
2ef1e26233
[Client] Fix ID_PLAYER_POSITION spam
2017-06-02 17:19:36 +08:00
Koncord
5f30dfd5db
[Client] Get rid direction.rot
2017-06-02 15:44:39 +08:00
David Cernat
0bed33e39e
[Client] Reset player fatigue when being resurrected
...
This way, players killed by strong hand-to-hand attacks will no longer be forced to lie on the ground when resurrected.
2017-06-02 06:58:33 +03:00
David Cernat
d8cd57a8be
[Client] Make topic sync work with localized versions of the game
2017-05-31 14:11:16 +03:00
David Cernat
906b263a2d
[Client] Update topics in current dialogue screen when receiving PlayerTopic packets
2017-05-31 06:51:50 +03:00
David Cernat
068a45be87
[General] Synchronize player & NPC rotation animations
2017-05-30 12:08:58 +03:00
David Cernat
7177d56cfb
[Client] Only require refNumIndex & mpNum for CellStore::searchExact()
2017-05-27 16:59:23 +03:00
David Cernat
4f273932af
[General] Implement sending and reading of ActorEquipment packets
2017-05-26 04:37:49 +03:00
David Cernat
11369f6513
[General] Implement sending and reading of PlayerTopic packets
2017-05-24 21:43:34 +03:00
David Cernat
e6983993c2
[General] Implement sending and reading of PlayerFaction packets
2017-05-18 19:27:20 +03:00
David Cernat
0189dbf916
[General] Make JournalItem consistent with other packet structs
2017-05-18 10:32:23 +03:00
David Cernat
d7d4dec200
[Client] Don't spam AnimFlags packets when a Player or Actor is flying
2017-05-09 12:27:59 +03:00
David Cernat
62aa6ed7ea
[Client] Send PlayerPosition packets based on a timeout
2017-05-06 00:59:54 +03:00
David Cernat
4d81455020
[General] Rework and simplify death reasons so they work with NPCs
2017-05-05 22:16:31 +03:00
David Cernat
6a21ec1fdc
[General] Rename PlayerPos into PlayerPosition
2017-04-25 22:11:33 +03:00
David Cernat
7b07d6651f
[General] Add and use PlayerBounty packet and matching script functions
2017-04-25 21:24:39 +03:00
David Cernat
e4a261ea2e
[Client] Remove unused include and variables, fixing warnings
2017-04-24 17:53:50 +03:00
David Cernat
1f6ba9d9ee
[Client] Remove jump check from LocalActor that is irrelevant for NPCs
2017-04-24 10:58:39 +03:00
David Cernat
87ada3e763
[Client] Add CellController::isSameCell() and use it in LocalPlayer
2017-04-23 14:01:13 +03:00
David Cernat
2e8714afaa
[Client] Rethink and restructure tes3mp combat code so it works for NPCs
2017-04-19 22:06:04 +03:00
David Cernat
c05c456b11
[Client] Clean up parts of LocalPlayer and DedicatedPlayer
2017-04-17 18:50:20 +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
David Cernat
678edffb5a
[Client] Rename updateDynamicStats() into updateStatsDynamic()
2017-04-16 14:11:55 +03:00
David Cernat
870886192b
[General] Rename DYNAMICSTATS into STATS_DYNAMIC
2017-04-16 09:00:18 +03:00
David Cernat
e7960eee76
[General] Rename DrawState packets into AnimFlags ones for clarity
2017-04-14 16:00:34 +03:00
David Cernat
9c731990a9
[Client] Use clearer var names in LocalPlayer::updateDrawStateAndFlags()
2017-04-13 14:10:42 +03:00
David Cernat
69f820f3a0
[Client] Rename CellController's getCell() into getCellStore()
2017-04-10 17:30:57 +03:00
David Cernat
2709de83fb
[Client] Use clearer variable names in LocalPlayer::UpdatePosition()
2017-04-10 14:53:59 +03:00
David Cernat
b883b4c7ce
[Client] Reorder includes
2017-04-08 12:54:38 +03:00
David Cernat
679e790d8d
[Client] Rename WorldController into CellController to avoid confusion with Networking's WorldPacketController
2017-04-05 12:00:21 +03:00
David Cernat
2bd81c3de0
[Client] Use mpNum for every WorldObject
2017-04-04 11:07:16 +03:00
David Cernat
4644235cf6
[Client] Use mpNum in exact searches for objects
2017-04-04 10:07:15 +03:00
David Cernat
31cd836558
[General] Small tweaks to debug info
2017-04-04 08:24:11 +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
Koncord
cea1425db1
[Client] Remove redundant newlines & keep ~120 columns
2017-03-04 14:55:35 +08:00
David Cernat
c4b11a1251
[Client] Remove now unused sendData() and BitStream declarations
2017-03-04 00:17:16 +02:00
David Cernat
cf6de6c474
[Client] Update old packet-sending code in LocalPlayer and GUIChat
2017-03-03 23:36:29 +02:00
David Cernat
03984685e5
[Client] Remove unnecessary type specifiers
2017-02-28 12:35:51 +02:00
David Cernat
5c269a5f8d
[General] Rename ID_GAME_DIE and ID_GAME_RESURRECT
2017-02-28 01:38:25 +02:00
David Cernat
e6bc7ad463
[General] Make all flying players fly correctly, including TCL users
2017-02-27 23:01:33 +02:00
Koncord
cbace41e14
[Client] Fix crash on LInux
2017-02-23 17:40:22 +08:00
David Cernat
1b59ce8c8f
[Client] Send ID_PLAYER_DRAWSTATE when teleported by server
2017-02-23 06:26:42 +02:00
David Cernat
e4ae8c5f9f
[Client] Cancel drag for teleported players, fix ID_OBJECT_SCALE debug
2017-02-22 02:44:00 +02:00
David Cernat
37e7d2c15b
[Client] Don't get invalid cells in LocalPlayer::sendJournalEntry()
2017-02-21 02:09:39 +02:00
David Cernat
bf2f932e18
[Client] If in a container, don't crash when teleported to another cell
2017-02-21 01:01:30 +02:00
David Cernat
75392297b5
[General] Use vector::at in most places
2017-02-05 19:01:06 +02:00
David Cernat
60d6a6d463
[Client] See when other players remove items from containers
2017-02-05 18:45:23 +02:00
David Cernat
f314b13edf
[General] Rename item health into charge, for consistency with OpenMW
2017-02-05 14:56:27 +02:00
David Cernat
04d45b9dbb
[General] Rename packets to show they are for players only, not NPCs
2017-02-05 09:01:33 +02:00
David Cernat
6328ffb9aa
[General] In ID_GAME_ATTRIBUTE & ID_GAME_SKILL, rename GAME into PLAYER
2017-02-04 14:25:43 +02:00
David Cernat
57f54aa370
[Client] Don't store multiple cellStates for the same cell
2017-02-04 09:46:27 +02:00
David Cernat
a2e3fe18fe
[Client] Send ID_PLAYER_CELL_STATE to server at end of CharGen
...
Also, allow requests for ID_PLAYER_CELL_STATE from the server.
2017-02-04 09:13:15 +02:00
David Cernat
c1427b2558
[General] Simultaneously send loads & unloads in ID_PLAYER_CELL_STATE
2017-02-03 20:27:40 +02:00
Koncord
42b6a456f0
[Client] Fix code style
2017-01-30 22:53:22 +08:00
Koncord
c5035cd174
[Client] Fix crash and memory leak when erasing spellbook
2017-01-30 22:37:09 +08:00
David Cernat
dddc253d70
[Client] Fix console message for LocalPlayer's cell change
2017-01-28 16:39:03 +02:00
Koncord
ab3c2544b5
[Client] Use constant instead magic value
2017-01-26 21:47:28 +08:00
Koncord
34a46e6811
[Client] Simplify hasFinishedCharGen method
2017-01-26 21:42:12 +08:00
David Cernat
244da19a51
[General] Turn ID_PLAYER_CELL_LOAD into ID_PLAYER_CELL_STATE for clarity
2017-01-26 13:49:20 +02:00
David Cernat
b5b5551fcd
[Client] Add LocalPlayer::hasFinishedCharGen() method
2017-01-26 13:13:43 +02:00
David Cernat
97aabf4a7d
[General] Sketch out sending of cell loading/unloading info in packets
2017-01-26 09:02:01 +02:00
David Cernat
63c8a98083
[General] Stop using virtual functions in BasePlayer
2017-01-25 17:06:15 +02:00
David Cernat
35e453dec3
[General] Sketch out most of functionality for journal saving/loading
2017-01-24 19:32:25 +02:00
David Cernat
d308897f95
Rename PacketItems, PacketSpells into InventoryChanges, SpellbookChanges
2017-01-20 12:43:05 +02:00
David Cernat
e2c595fc5d
Add preliminary structure for journal changes
2017-01-20 12:05:45 +02:00
David Cernat
a69f294ef0
Rename ID_GAME_CELL into ID_PLAYER_CELL_CHANGE
2017-01-20 10:30:50 +02:00
David Cernat
83277a1512
Send spellbook in LocalPlayer CharGen & change UPDATE action name to SET
2017-01-20 09:07:07 +02:00
David Cernat
0f7748d9d2
When clearing LocalPlayer's spells, keep race and birthsign abilities
2017-01-20 08:06:48 +02:00
David Cernat
33e85c54de
Rename BasePlayer Inventory & Spellbook into PacketItems & PacketSpells
...
This avoids confusion when either of those is used to store and send a single item, and no longer requires coming up with confusing variable names like realSpellbook or realInventory for actual full spellbooks and inventories.
2017-01-19 18:06:59 +02:00
David Cernat
78c6ab2a99
Clean up client Networking by putting item & spell logic in LocalPlayer
2017-01-19 15:18:37 +02:00
Koncord
7595b33461
Implement spellbook
2016-12-29 21:19:57 +08:00
Koncord
536715cf46
Cleanup tes3mp headers
2016-12-16 16:59:15 +08:00
David Cernat
9e290ad799
Fix spacing irregularities
2016-11-21 23:40:50 +02:00
David Cernat
95efb77e53
Implement sending of ID_GAME_SPELLBOOK from client
2016-11-21 06:07:29 +02:00
David Cernat
7f25abb9c8
Implement UnequipItem() script function
2016-11-18 01:50:55 +02:00
David Cernat
c1bd4f1ce3
Use correct item count in LocalPlayer::setEquipment() for new items
2016-11-18 01:33:46 +02:00
David Cernat
fcd24ebb7e
Rename methods to show they deal with Equipment instead of Inventory
2016-11-17 22:33:30 +02:00
David Cernat
3a733eb122
Make tes3mp includes consistent
2016-11-17 17:16:25 +02:00
David Cernat
faea5221d3
Use LocalPlayer's updateInventory() every cell change, not every frame
2016-11-17 15:32:04 +02:00
Koncord
e2522fa366
Simplify LOG macros
2016-11-17 12:39:35 +08:00
David Cernat
eedd40328a
Add and use SendInventory() method in LocalPlayer, and clarify some code
2016-11-16 21:34:46 +02:00
David Cernat
c5c72a3b17
Use consistent names for booleans in LocalPlayer
2016-11-16 20:01:47 +02:00
David Cernat
6cd959fac8
Rename BasePlayer's GetCell() into getCell()
2016-11-16 17:43:58 +02:00
David Cernat
fa9d6e810e
Use lowerCamelCase in tes3mp client function names like OpenMW does
2016-11-15 21:54:06 +02:00
David Cernat
f7b5e5e638
Ignore packets from server that try to move LocalPlayer to invalid cells
2016-11-12 22:21:02 +02:00
Koncord
c85e6a5f91
Fix sucess chance
2016-11-12 20:43:18 +08:00
Koncord
56959ebfda
Implement magic
2016-11-12 19:39:16 +08:00
David Cernat
729da2c0ba
Improve logic and clarity of LocalPlayer's charGenThread()
...
Until now, the fact that charGenThread() returned false whenever the player had a menu open was preventing Main::UpdateWorld() from running at all with a menu open.
The result was that no player packets from LocalPlayer::Update() were being sent by a player in a menu.
2016-11-11 23:46:17 +02:00
Koncord
37e9cafbf7
Add new API function: SetConsoleAllow
...
example:
tes3mp.SetConsoleAllow(pid, 0) -- disallow console to the player
The console is allowed by default
2016-11-04 03:01:26 +08:00
David Cernat
107dacac6d
Add OnPlayerChangeInventory server script callback
2016-11-03 16:39:31 +02:00
David Cernat
9c12aa2141
Fix formatting
2016-10-30 12:58:58 +02:00
David Cernat
d85a1ee1a9
Fix errors remaining from merge with tes3mp-packetexpansion
2016-10-23 18:32:03 +03:00
David Cernat
c639337842
Merge with tes3mp-packetexpansion by fixing conflicts
...
# Conflicts:
# apps/openmw-mp/Networking.cpp
# apps/openmw/mwmp/Networking.cpp
# components/CMakeLists.txt
# components/openmw-mp/NetworkMessages.hpp
# components/openmw-mp/PacketsController.cpp
2016-10-23 17:57:38 +03:00
David Cernat
0a44bea91d
Send cell coordinates in tes3mp using mData instead of mCellId.mIndex
2016-10-23 16:55:30 +03:00
Koncord
c27351c19e
Implement inventory functions
...
AddItem, RemoveItem, GetItemName, GetItemCount, GetItemHealth, GetInventorySize SendInventory
Example:
```lua
tes3mp.AddItem(pid, "glass dagger", 1, 50)
tes3mp.AddItem(pid, "glass dagger", 1, -1)
tes3mp.SendInventory(pid)
tes3mp.RemoveItem(pid, "glass dagger", 1)
tes3mp.SendInventory(pid)
local invSize = tes3mp.GetInventorySize(pid) - 1
for i = 0, invSize do
print(("%s %d %d"):format(tes3mp.GetItemName(pid, i), tes3mp.GetItemCount(pid, i), tes3mp.GetItemHealth(pid, i)))
end
```
2016-10-23 02:57:49 +08:00
David Cernat
f218613231
Rename client Networking's GetPacket method into GetPlayerPacket
2016-10-19 22:49:35 +03:00
David Cernat
e0361835b0
Allow script-induced setting of equipment
2016-09-30 12:36:20 +03:00
David Cernat
728a09e423
Reorder functions in LocalPlayer and make their names more consistent
2016-09-30 08:59:58 +03:00
David Cernat
6650b74498
Add handling of skill increases
2016-09-30 07:15:59 +03:00
David Cernat
f4621d8529
Use setLevelProgress when setting LocalPlayer's skills
2016-09-30 06:27:26 +03:00
David Cernat
a0e9a672a5
Split updateClassStats in 3 and add handling of level progress
2016-09-30 04:52:21 +03:00
David Cernat
2ab619b0e3
Constantly update skill progress from LocalPlayer
2016-09-30 03:43:49 +03:00
David Cernat
afbd3274cc
Clean up handling of stat packets on client
2016-09-29 13:10:32 +03:00
David Cernat
bc0aa86bcf
Make variable names more consistent and easier to understand
2016-09-29 12:05:44 +03:00
David Cernat
694ce537b6
Allow script-induced dynamic stat changes, part 2
2016-09-29 11:02:57 +03:00
David Cernat
18cd964d21
Allow script-induced dynamic stat changes
2016-09-29 10:19:39 +03:00
David Cernat
16216b30f7
Fix formatting
2016-09-28 14:27:35 +03:00
David Cernat
b6086ab015
Rename ID_GAME_DYNAMICSTATS_CURRENT into ID_GAME_DYNAMICSTATS
2016-09-28 14:13:24 +03:00
David Cernat
57f07813b0
Rename ID_GAME_UPDATE_POS into ID_GAME_POS
2016-09-28 11:45:14 +03:00
David Cernat
26487598a6
Rename ID_GAME_UPDATE_EQUIPED into ID_GAME_EQUIPMENT
2016-09-28 11:36:29 +03:00
David Cernat
ce4b326b02
Rename ID_GAME_UPDATE_BASESTATS into ID_GAME_DYNAMICSTATS_CURRENT
2016-09-28 07:50:16 +03:00
David Cernat
4d7130b12f
Improve logic for script-induced cell changes
2016-09-27 11:28:44 +03:00
David Cernat
01af4f3bbc
Update position before sending cell packet
2016-09-26 17:00:09 +03:00
David Cernat
1ee2458f6e
Add packet for player levels, part 2
2016-09-26 13:19:01 +03:00
David Cernat
046a1ea899
Add packet for player levels
2016-09-25 14:28:25 +03:00
David Cernat
8abef0bebe
Remove outdated ID_GAME_UPDATE_SKILLS packet
2016-09-02 07:36:39 +03:00
David Cernat
dafc6c0843
Save and load birthsigns
2016-09-02 06:57:13 +03:00
David Cernat
941d76fce0
Fix setting of default classes and initialize classes safely on server
2016-09-02 04:31:35 +03:00
Koncord
534ef527b9
Fix my stupid epic fail
2016-09-02 07:35:53 +08:00
David Cernat
a20e7890a2
Fix formatting
2016-08-30 10:52:30 +03:00
Koncord
11eae277a9
Characters Class API
...
Added some new functions
2016-08-30 11:18:19 +08:00
David Cernat
00e7810428
Add script functions for saving and loading non-custom player classes
2016-08-27 00:14:50 +03:00
David Cernat
5385563972
Let players inform others about Lua script-induced cell & pos changes
2016-08-24 02:53:39 +03:00
David Cernat
7b187d0295
Fix visual glitch when jumping without adjusting camera afterwards
2016-08-23 22:27:12 +03:00
David Cernat
03d6e0cb62
Send attributes and skills to server whenever they change
2016-08-23 02:24:10 +03:00
David Cernat
c4f49e05e3
Remove manual newlines for logger
2016-08-19 07:54:10 +03:00
Koncord
90215f4e7c
Fix log messages for GCC compatibility
2016-08-19 09:37:24 +08:00
David Cernat
2337a0becb
Add LOG_APPEND method for writing to log without timestamp and level
2016-08-18 23:17:46 +03:00
David Cernat
97f944dde7
Use logger for most console messages
2016-08-18 20:20:17 +03:00
David Cernat
e5cb58e7c4
Add debug info about ID_GAME_BASE_INFO packets
2016-08-17 21:18:04 +03:00
David Cernat
8eda381016
Make formatting consistent, part 2
2016-08-17 18:20:36 +03:00
David Cernat
1363c4c5b6
Make formatting consistent
2016-08-17 18:04:35 +03:00
David Cernat
8dd8e22a0b
Replace tabs with spaces in LocalPlayer changes
2016-08-04 00:55:28 +03:00
David Cernat
3362902396
Update position after changing cell (for real)
2016-08-04 00:03:05 +03:00
David Cernat
b0bd10f219
Allow script-based teleportation from interior to exterior cell 0,0
2016-08-03 22:07:49 +03:00
Koncord
31e2ab54d6
Revert "Update position after changing cell"
...
This reverts commit 5e072b9d3c
.
2016-07-30 04:57:43 +08:00
Koncord
5e072b9d3c
Update position after changing cell
2016-07-30 04:12:47 +08:00
Koncord
7107136808
New API
...
SetExterior(pid, x, y)
GetExteriorX(pid)
GetExteriorY(pid)
also "SetCell" will now move to the named external cells (e.g. SetCell(pid, "Balmora"))
2016-07-30 01:33:28 +08:00
davidcernat
ab309180c2
Add useful debug info for cell changes
2016-07-21 23:07:37 +03:00
davidcernat
7bf08e5e5a
Fix transition between exterior cells for non-local players
...
Make the local player send a packet whenever moving from one exterior cell to another, don't require objects to have RefNums to be moved correctly between exterior cells, and increase the packet priority for cell changes.
2016-07-17 22:03:20 +03:00
Koncord
6f07d590d4
Fix SetPos and SetAngle functions
...
Fix types for SetPos and SetAngle
2016-07-17 17:59:46 +08:00
Koncord
1b259e2d33
Syncing inventory, animations, position, 8 key attributes
...
Created Package system
2016-07-07 23:50:48 +08:00