1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 00:45:31 +00:00
openmw-tes3mp/apps/openmw-mp/Script
David Cernat 6a3fbf4e98 [Server] Use consistent arguments for script functions that send packets
Previously, there was a confusing separation between script functions that had a "broadcast" argument and script functions that had a "toOthers" argument.

Those with broadcast sent the packet to all players on the server when broadcast was true. Those with toOthers sent the packet to all players other than the packet's attached player.

The former was based on the pattern of the original SendMessage() script function. The latter more closely resembled RakNet's own broadcast argument as seen here:

https://github.com/TES3MP/CrabNet/blob/master/include/raknet/RakPeer.h#L219

This commit makes it so all sending functions have a sendToOtherPlayers argument that is false by default and a sendToAttachedPlayer that is true by default. This should simultaneously allow sending to be more intuitive, while not breaking previous existing scripts to a significant degree.

Additionally, this commit also reduces some code repetition for all instances of packet-fetching in script functions.
2018-07-07 18:29:31 +03:00
..
API Remove Pawn support 2018-07-02 23:00:35 +08:00
Functions [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
LangLua [General] Remove Terra support 2018-07-02 23:07:09 +08:00
LangNative [General] Leave one blank line at the end of every tes3mp code file 2017-01-26 06:17:29 +02:00
Language.hpp Fixed types in all GetInterface functions 2016-08-02 18:10:06 +08:00
Platform.hpp Fix include guard 2016-11-17 13:22:34 +08:00
Script.cpp [General] Remove Terra support 2018-07-02 23:07:09 +08:00
Script.hpp Remove Pawn support 2018-07-02 23:00:35 +08:00
ScriptFunction.cpp Remove Pawn support 2018-07-02 23:00:35 +08:00
ScriptFunction.hpp Remove Pawn support 2018-07-02 23:00:35 +08:00
ScriptFunctions.cpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
ScriptFunctions.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
SystemInterface.hpp Fixed types in all GetInterface functions 2016-08-02 18:10:06 +08:00
Types.hpp [General] Move Utils from server to components 2017-03-04 13:08:22 +08:00