Kyle Cooley
ba4d2bd5fe
Merge remote-tracking branch 'origin/master' into LibIssues
2018-01-05 17:35:47 -05:00
David Cernat
b6a7377692
Merge pull request #366 from TES3MP/0.6.2 while resolving conflicts, 2nd try
...
Conflicts:
apps/openmw-mp/Networking.cpp
apps/openmw-mp/Script/Functions/Miscellaneous.cpp
apps/openmw-mp/Script/Functions/Miscellaneous.hpp
apps/openmw/mwmp/GUI/GUIChat.cpp
2018-01-05 21:24:14 +02:00
Kyle Cooley
e2103d0bea
Clean up find file for LuaJit, add one for Sol2
2018-01-04 21:40:17 -05:00
Koncord
35922e4898
[General] Change "enum ACTOR_ACTION" to "enum class Action"
2018-01-05 09:40:11 +08:00
David Cernat
1cf2f35a28
[Server] Add script functions to set & get plugin enforcement state
2018-01-02 16:33:18 +02:00
Koncord
c4949ac5d9
[General] Change regular enums to enum class
2018-01-02 12:44:53 +08:00
Koncord
8f5d31cb03
[Server] Iterate only through updated players on each frame
2018-01-02 11:57:32 +08:00
Koncord
4ab338bbb1
[Server] Register ON_PLAYER_QUICKKEYS event
2018-01-02 11:53:03 +08:00
Koncord
5777759aae
[General] Change enum QuickKey::QUICKKEY_TYPE to enum class
2018-01-02 11:52:38 +08:00
Koncord
2019128d92
[Server] Change signature of TimerController::kill, validate callback
2018-01-02 08:17:26 +08:00
David Cernat
09958681cd
Merge pull request #363 from TES3MP/0.6.2 while resolving conflicts, 2nd try
2018-01-01 12:04:25 +02:00
David Cernat
47a3dc9ff2
[Server] Add broadcast argument to functions for sending WorldPackets
2017-12-30 21:52:30 +02:00
David Cernat
1e2517698d
[Server] Send player speech and animation packets only to nearby players
2017-12-29 06:17:45 +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
993081ba1e
[General] Add enchantmentCharge to worldObjects and items
2017-12-23 13:16:38 +02:00
David Cernat
a84c4c7ecc
[Server] Print module order on startup
2017-12-10 15:57:19 +02:00
David Cernat
f2eca2566f
[Server] Add storedData table for Player to increase clarity
...
This way, customData is meant to hold module-specific and temporary data while storedData is meant to hold persistent core data.
2017-12-10 10:06:27 +02:00
Koncord
077a3d06b3
[General] Change type of BasePlayer::resurrectType to ResurrectType
2017-12-10 12:01:04 +08:00
Koncord
f9c4b847aa
[Server] Make argument const reference
2017-12-10 11:46:50 +08:00
Koncord
c5388e49f2
[Server] Remove Pawn switcher in cmake
2017-12-10 10:29:10 +08:00
Koncord
ba07d7820f
[Server] Remove Terra
2017-12-10 10:20:24 +08:00
Koncord
77d14211c9
[Server] Add Weather.cpp to build
2017-12-10 10:16:16 +08:00
Koncord
44dc153ebe
[Server] Add Weather API
2017-12-10 09:51:03 +08:00
Koncord
aff1859759
[Server] Add new line for help strings
2017-12-10 09:47:35 +08:00
Koncord
122a30c183
[General] Change type of refNumIndex & mpNum to unsigned
2017-12-10 09:20:13 +08:00
Koncord
bfdf348a6c
[Server] Fix Undefined behavior
2017-12-09 18:01:15 +08:00
Koncord
4d0072a74c
[Server] Use foreach loop
2017-12-09 15:04:09 +08:00
Koncord
cd620e17ec
[Server] Use std::move(tokens)
2017-12-09 15:03:44 +08:00
Koncord
dd352f0a91
[Server] Improve Player::sendToLoaded()
2017-12-09 15:03:06 +08:00
Koncord
f35d35741e
[General] Remove redundant code
...
Remove BaseEvent::worldObjectCount
Remove BaseActor::count
Use foreach loops in packets and processors
Remove redundant "&" in CellController::get().getCell() calls
2017-12-09 14:59:41 +08:00
Koncord
585c24cee8
[Server] Optimize CellController
2017-12-09 11:44:56 +08:00
Koncord
ff8b5061b4
[Server] Modernize CellController singleton
2017-12-09 11:08:53 +08:00
Koncord
e97dac7793
[Server] Mark derived processor classes as final
2017-12-09 10:20:55 +08:00
David Cernat
ad61d88cb1
[General] Fix typos and use consistent style for recent additions
2017-12-08 18:02:23 +02:00
Koncord
1c7330635b
[Server] Add & register ON_PLAYER_WEATHER event
2017-12-08 20:38:36 +08:00
Koncord
392e645fe5
[Server] Add isMarkedForDeleteion function
2017-12-08 20:37:22 +08:00
Koncord
91398c5dcc
[Server] Implicitly join to "Default" channel
2017-12-08 20:35:19 +08:00
Koncord
aa183e6844
[General] Introduce chat channels
2017-12-08 07:43:29 +08:00
Koncord
c55f0f73b8
[Server] Pass shared_ptr<Player> by reference
2017-12-08 07:32:49 +08:00
Koncord
94f3eaa980
[Server] Fix warning "implicit fallthrough"
2017-12-06 13:30:39 +08:00
David Cernat
e97c9f72a2
[General] Rework getting/clearing of skill modifiers as with attributes
2017-12-04 15:06:27 +02:00
David Cernat
456bcee68a
[Server] Use Utils function as workaround for "bad exception" on Windows
2017-12-04 14:32:23 +02:00
David Cernat
cfb5835e17
[Server] Clean up method and variable names
2017-12-04 10:39:20 +02:00
David Cernat
fc5e883160
[General] Rework PlayerStatsDynamic packets so they are of minimal size
2017-12-02 18:29:30 +02:00
David Cernat
993cc3dfd6
[Server] Rename server "plugins"/"mods" into "modules" for clarity
...
The terms "plugins" and "mods" were used interchangeably to refer to collections of server scripts, which was bound to cause confusion later on, especially with client data files frequently being referred to as "plugins" and "mods" as well.
Moreover, the server configuration file now starts its manual ordering with "Module1" for consistency with the pluginlist.json (soon to be dataFileList.json) of the CoreScripts.
2017-12-02 15:39:08 +02:00
David Cernat
2944be18ae
[Server] Actually, turn SetAttributeModifier into ClearAttributeModifier
...
There's no way SetAttributeModifier() was going to make sense if, say, a player had drunk 3 different potions fortifying the same attribute and was wearing equipment fortifying it as well. How would one change the sum modifier of those while accounting for each specific effect's duration and magnitude?
The only workable solution is to allow the server to clear the modifier.
2017-12-02 09:19:33 +02:00
David Cernat
e8d636ebc3
[Server] Rework Get/SetAttributeCurrent into Get/SetAttributeModifier
...
As seen here, attributes don't use the concept of current values, but rather of value modifiers and value damage:
https://github.com/OpenMW/openmw/blob/master/apps/openmw/mwmechanics/stat.cpp#L217
2017-11-30 22:37:06 +02:00
David Cernat
d1ad0c91f8
[General] Rework PlayerEquipment packets so they are of minimal size
...
Moreover, rename BaseNetCreature's equipedItems into equipmentItems.
2017-11-30 12:31:54 +02:00
David Cernat
c9c363ebef
[General] Allow GameSettings to set bed & wilderness resting separately
2017-11-30 12:18:15 +02:00
David Cernat
bd9e8bd10f
[General] Simplify storing of attribute and skill index changes
2017-11-29 16:55:51 +02:00
David Cernat
720ef5f6c5
[General] Use consistent code style
2017-11-29 13:00:22 +02:00
Koncord
e44fcdc0b3
[General] Cleanup Player packets
2017-11-28 21:38:45 +08:00
David Cernat
3508a16836
[General] Use GameSettings packet to set ability to rest and wait
2017-11-27 07:39:02 +02:00
David Cernat
901fe72471
[Server] Fix variable shadowing in Player
2017-11-26 13:14:53 +02:00
David Cernat
a796f81444
[General] Add and use utility function for int value checks in vectors
2017-11-26 13:03:54 +02:00
Koncord
4ebfcc4a21
[Server] Limit handshake attempts
2017-11-26 00:18:19 +08:00
Koncord
729f6e745e
[Server] Remove unused get() method from EventController
2017-11-26 00:00:31 +08:00
Koncord
e657934cef
[Server] Add custom window API
2017-11-25 23:47:02 +08:00
David Cernat
b0965f094a
[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.
2017-11-24 14:28:05 +02:00
David Cernat
ef79a98544
[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.
2017-11-24 12:38:42 +02:00
David Cernat
64b57983f0
[General] Add TRACE log messages in player processors
2017-11-24 09:43:45 +02:00
David Cernat
07d75abdf8
[Server] Use consistent order for includes
2017-11-23 08:11:37 +02:00
David Cernat
6668b9ab42
[General] Implement ConsoleCommand packet
2017-11-23 00:21:47 +02:00
David Cernat
d33254f287
[Server] Rename CharClass' isDefault() into isCustom()
...
It was already using the logic of isCustom() by mistake.
2017-11-19 12:35:11 +02:00
David Cernat
010a80ceca
[Server] Place getters and setters in consistent order
2017-11-19 11:34:03 +02:00
David Cernat
947b3f76be
[Server] Replace Player's isMale() and setIsMale() with gender property
...
For simplicity and clarity.
2017-11-19 11:06:35 +02:00
David Cernat
6f822f54aa
[Server] Make chat commands case insensitive
2017-11-19 10:12:35 +02:00
David Cernat
a3e2ab4d4e
[Server] Send correct packet for inventory changes
2017-11-19 04:24:54 +02:00
David Cernat
4cc0216e0a
[Server] Send cell changes before position changes, and prioritize both
...
Previously, a script changing a player's cell and position at the same time would end up sending a position packet first and then a cell change packet that overrode the former, with the player ending up at the center of the destination cell instead of at the correct position.
2017-11-19 00:59:32 +02:00
David Cernat
80be664139
[Server] Fix skill-related script functions
...
Add getSkillIncrease() and setSkillIncrease() script functions to get and set the attribute bonuses received at the next level up as a result of skill increases.
Previously, getSkill() and setSkill() attempted to return and set the attribute bonuses, respectively. However, they mistakenly used a skill ID as a parameter for the attribute bonuses, when in fact npcStats.mSkillIncrease is an integer array of size 8 where the key stands for an attribute's ID. As a result, setSkill() had the unexpected side effect of messing up a player's major and minor skills because of the invalid values it was setting for npcStats.mSkillIncreases.
2017-11-18 10:02:52 +02:00
David Cernat
57a0415ba3
[Server] Send level packets in Player's update() at the appropriate time
...
Previously, trying to send a level packet after base info and character class packets in a script actually led to the level packet being sent first and then being overridden by the others, with the player ending up at level 1 on their client.
2017-11-18 03:55:17 +02:00
David Cernat
494b10b97e
[Server] Send player packets in a more appropriate order
...
Previously, the fact that a character class packet got sent after a dynamic stats packet caused the dynamic stats to get overridden on the client by the class change.
2017-11-18 01:47:18 +02:00
David Cernat
ba161ddddd
[Server] Make a few function names more consistent and fix typos
2017-11-17 04:12:25 +02:00
David Cernat
1272b03f25
[Server] Fix typo in player script function
2017-11-13 07:43:20 +02:00
David Cernat
926106cf8c
[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.
2017-11-13 05:33:27 +02:00
David Cernat
a8261bb385
[General] Fix printing of packet identifiers after changes to logger
2017-11-12 02:36:18 +02:00
Koncord
64b531aa3c
[Server] Remove redundant argument
2017-11-07 06:37:09 +08:00
Koncord
d15c674584
[General] Move getFilenameTimestamp() to Utils
2017-11-07 05:33:10 +08:00
Koncord
0da44f69ad
[Server] Isolate getModFolder() & getDataFolder()
2017-11-03 06:36:35 +08:00
Koncord
062d6a1824
[Server] Add sandboxed import() function
2017-11-03 06:36:35 +08:00
David Cernat
29cb51cdce
[Server] Enable SOL_SAFE_USERTYPE for both Debug and RelWithDebInfo
2017-11-01 18:09:25 +02:00
Koncord
bd7082f57e
[Server] Use custom Lua error handler not only on Windows
...
For some reason sol's default error handler does not wroking properly
2017-11-01 21:48:42 +08:00
David Cernat
71c921faa7
[Server] Rename property cell into description, initialize Cells type
2017-11-01 13:22:41 +02:00
David Cernat
5653d07c7b
[Server] Fix build on Windows
2017-10-31 22:00:03 +02:00
Koncord
948090676a
[Server] Impove Lua Error handler for Windows
2017-11-01 01:17:11 +08:00
David Cernat
be25decee2
[General] Implement PlayerSpeech packet
2017-10-31 15:19:14 +02:00
David Cernat
b7e5e77166
[Server] Fix getCaseInsensitiveFilename, simplify Players.size()
2017-10-28 03:58:53 +03:00
David Cernat
378d30834b
[Server] Add special error handler for Sol back in, but only for Windows
2017-10-28 01:44:02 +03:00
Koncord
14d47213ef
[Server] Add Players.size() to Lua API
2017-10-28 02:34:45 +08:00
Koncord
e7a5919477
[Server] Fix path to native libs
2017-10-27 20:58:02 +08:00
David Cernat
413893aa51
[General] Implement PlayerAnimPlay packet
2017-10-27 09:10:29 +03:00
Koncord
1aa630e4a9
[Server] Add StackWalker for Windows
2017-10-27 05:27:07 +08:00
Koncord
14fdec2478
[Server] Add forgotten stacktrace.cpp
2017-10-26 23:24:35 +08:00
David Cernat
878294e4fe
Merge branch 'new-script-api' of https://github.com/TES3MP/openmw-tes3mp into new-script-api
2017-10-26 17:25:53 +03:00
Koncord
d44848ecbb
[Server] Fix build
2017-10-25 16:05:45 +08:00
Koncord
05abb8ace3
[Server] Add Log level constants to lua
2017-10-25 15:22:07 +08:00
Koncord
04a844a9c0
[Server] Use sol's default_handler
2017-10-25 15:21:11 +08:00
Koncord
dad0b38f25
[Server] Add custom terminate handler with stacktrace
2017-10-25 14:45:36 +08:00
Koncord
a3d5fbbdcd
[Server] Add stacktrace
2017-10-25 14:45:36 +08:00
Koncord
916ada108f
[General] Modernize Log utility
...
* Reverse Log levels
* Add LOG_TRACE
* Spawn instance of Log in Get() function
2017-10-25 14:45:36 +08:00
David Cernat
50d5fffb7f
[General] Add and implement PlayerQuickKeys packet
2017-10-25 07:21:00 +03:00
David Cernat
bece095579
[Server] Add getCaseInsensitiveFilename script function back in
2017-10-24 20:25:02 +03:00
David Cernat
76a4abd7c0
Merge pull request #325 from TES3MP/master while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp
2017-10-24 19:45:11 +03:00
David Cernat
a94d4ce6f5
Merge pull request #323 from TES3MP/0.6.1
...
Add hotfix commit for 0.6.1 from 23 Oct 2017
2017-10-24 19:34:34 +03:00
David Cernat
3aedc2e5bc
[Server] Don't automatically share PlayerTopic packets between players
2017-10-23 19:39:35 +03:00
David Cernat
fb67180809
[Server] Fix build in Visual Studio
2017-10-19 13:04:37 +03:00
Koncord
4530370e52
[Server] Use old style of Server Plugins location
2017-10-19 11:55:49 +08:00
Koncord
ce6a4e4032
[Server] Fix indents
2017-10-19 10:26:03 +08:00
Koncord
fc3f2483ee
[Server] Add manual Server Plugins sort
2017-10-19 10:24:17 +08:00
Koncord
dffd3bfa7d
[Server] Add customData to Player
...
example:
counter = 0
Event.register(Events.ON_PLAYER_CONNECT, function(player)
player.customData.counter = counter
counter = counter + 1
return true
end)
CommandController.registerCommand("test", function(player, args)
player:message(player.customData.counter, false)
return true
end, "")
2017-10-18 22:32:03 +08:00
Koncord
7a0b45d456
[Server] Load mods in dependencies order
2017-10-18 21:30:36 +08:00
David Cernat
bbac26294f
[Server] Fix typos and make all files end with newlines
2017-10-17 07:44:10 +03:00
Koncord
62588ce088
[Server] Minor fixes
2017-10-11 06:26:09 +08:00
David Cernat
fe9a3088bd
Merge pull request #312 from TES3MP/master
...
Add master commits up to 10 Oct 2017
2017-10-10 06:27:35 +03:00
David Cernat
ec2c964ae1
Merge pull request #311 from TES3MP/0.6.1
...
Add hotfix commit for 0.6.1 from 10 Oct 2017
2017-10-10 06:26:33 +03:00
David Cernat
f532ab241d
[Server] Avoid duplicates of the same player in a cell's loaders
2017-10-10 05:48:56 +03:00
David Cernat
4845599bda
Merge pull request #308 from TES3MP/master while resolving conflicts
...
# Conflicts:
# apps/openmw-mp/main.cpp
2017-10-08 06:50:15 +03:00
David Cernat
3d38da0e85
[Server] Put includes in a specific order
2017-10-08 05:17:14 +03:00
David Cernat
61b1a59814
[General] Move server's version printing method to Utils
2017-10-08 04:16:30 +03:00
Koncord
cbabc91b06
[Server] Stop MasterClient thread and inform server owner on ban
2017-10-03 03:17:25 +08:00
David Cernat
3284769fef
[Server] Add getModFolder() script function and Config environment
2017-09-23 13:52:51 +03:00
David Cernat
d591180e99
[Server] Clean up logAppend and add new message for server shutdown
2017-09-20 16:30:12 +03:00
David Cernat
9838cc680a
[Server] Enable Lua debugging for RelWithDebInfo builds
2017-09-15 08:19:15 +03:00
Koncord
6decd148e5
[Server] Fix build on Windows
2017-09-13 11:06:53 +08:00
Koncord
510e657c93
Merge branch 'master' into new-script-api
2017-09-02 19:48:44 +08:00
Koncord
060ebe3d4a
[Server] Init isWerewolf variable
...
Comment unused code
2017-09-02 19:45:19 +08:00
Koncord
74c9a26d16
[Server] Fix "wrong packet with id: 14"
2017-09-02 14:01:11 +08:00
David Cernat
ac3254d85f
[General] Don't send PlayerAttribute and PlayerSkill packets as werewolf
...
This will prevent the server from overwriting a player's human form stats with their werewolf form stats.
Additionally, share PlayerShapeshift packets last when exchanging data with another player.
2017-08-31 18:21:38 +03:00
Koncord
1c0adc47ee
[Server] Fix [get/set]MajorSkills and [get/set]MinorSkills
2017-08-31 20:51:05 +08:00
David Cernat
98a7769b91
Merge branch 'master' into 0.6.0
2017-08-31 15:44:27 +03:00
David Cernat
499c7db121
[Server] Initialize interiors correctly if exterior 0, 0 has been loaded
2017-08-31 14:48:23 +03:00
Koncord
66fdba957b
[Server] Add getDataFolder() to Script API
2017-08-31 16:25:43 +08:00
Koncord
1d16958910
[Server] Fix multiple calls of ON_POST_INIT
2017-08-31 16:20:50 +08:00
Koncord
b18c6dec9d
[Server] Fix sendList()
...
Remove return from requestContainers()
Rename "Cells" usertype to "Cell"
2017-08-30 22:50:47 +08:00
Koncord
60fc0bedb8
[Server] Use lower case for methods
2017-08-30 13:56:53 +08:00
Koncord
7717f9bece
[Server] Replace getKillRefId/getKillNumber with getKill
2017-08-30 13:56:22 +08:00
David Cernat
833d2a5dbe
Merge pull request #277 from TES3MP/0.6.0
...
Add hotfix commits for 0.6.0 up to 29 Aug 2017, part 1
2017-08-29 19:32:21 +03:00
David Cernat
92553b8e29
[Server] Log startup errors by not deleting logger too early
2017-08-29 19:30:37 +03:00
Koncord
fe2dd1bad4
[Server] Use correct cells in "send" functions
...
Remove unused return type from ON_PLAYER_SENDMESSAGE
2017-08-29 03:34:36 +08:00
Koncord
2d0840cb3a
[General] Modernize Script API
...
This commit changes the style of tes3mp serverside scripting mods. Short list of changes:
* Break compatibility with old server mods
* OOP style lua API
* Basic dependency checker, allowing the installation of multiple server mods without changing configs
* Remove support for C++ plugins
* Change outdated LuaBridge to [sol2](https://github.com/ThePhD/sol2 );
* Support GCC, Clang and MSVC compilers
* New environment variables: "TES3MP_SERVER_DIR" and "TES3MP_SERVER_USERDIR";
* New entity "Command controller" for registering new chat commands;
* New Event system
* Simplified Timer API
* All Lua mods now run in their own environments
* Add global namespace - Data that can be used for communicating between mods
* Player and Actor inherit base class NetActor
2017-08-28 00:15:56 +08:00
David Cernat
cffd985038
Merge pull request #266 from TES3MP/0.6.0
...
Add hotfix commits for 0.6.0 up to 18 Aug 2017
2017-08-18 07:45:36 +03:00
David Cernat
0820b7e92b
[Server] Add GetCaseInsensitiveFilename() script function
...
Additionally, make header order consistent in script function files.
2017-08-18 07:13:08 +03:00
David Cernat
0e2038f045
[General] Record and get player positions before their last cell change
2017-08-04 21:45:52 +03:00
Unknown
bfbfbeac43
Added networking and saving for custom spells
2017-07-31 03:45:47 +10:00
David Cernat
c9550fc560
[Server] Use case-insensitive filename comparison for plugins
...
Additionally, clarify the comments related to plugin comparison.
2017-07-28 06:57:15 +03:00
David Cernat
9d05063af4
[General] Add server script functions for banning & unbanning IPs
...
Additionally, use a more informative message for the client when trying to connecting to a server that it is banned from.
2017-07-27 19:29:17 +03:00
David Cernat
d543edbd9a
[Server] Make sure players are initialized as non-werewolves
2017-07-26 06:01:48 +03:00
David Cernat
cd8d064761
[Server] Add PlayerShapeshift to PlayerCellChange's information exchange
2017-07-25 18:44:06 +03:00
David Cernat
8b79cdd4f4
[Server] Document script functions, part 3
...
Also reorder functions in Cells and CharClass so they are consistent with the rest.
2017-07-25 18:07:09 +03:00
David Cernat
5e5440b697
[Server] Document script functions, part 2
2017-07-23 21:59:33 +03:00