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

185 commits

Author SHA1 Message Date
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