openmw-tes3coop/apps/openmw-mp
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
..
processors [Server] Remove hardcoded sync for VideoPlay and add OnVideoPlay event 2018-07-06 23:37:57 +03:00
Script [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Cell.cpp [General] Rename Event into ObjectList & WorldObject into BaseObject 2018-05-13 00:42:24 +03:00
Cell.hpp [General] Rename Event into ObjectList & WorldObject into BaseObject 2018-05-13 00:42:24 +03:00
CellController.cpp [Server] Initialize interiors correctly if exterior 0, 0 has been loaded 2017-08-31 14:48:23 +03:00
CellController.hpp [General] Rename Event into ObjectList & WorldObject into BaseObject 2018-05-13 00:42:24 +03:00
CMakeLists.txt [General] Use LuaJit instead default Lua 2018-07-05 19:21:53 +08:00
main.cpp Remove Pawn support 2018-07-02 23:00:35 +08:00
MasterClient.cpp [General] Explicitly use limitations of the master server 2018-07-02 23:29:07 +08:00
MasterClient.hpp [Server] Add and implement PushPlugin method to MasterClient 2017-05-07 02:51:57 +08:00
Networking.cpp [General] Add integrity checks to Handshake packet 2018-07-03 18:41:03 +08:00
Networking.hpp [General] Add and implement new Worldstate packet type 2018-05-18 06:40:28 +03:00
Player.cpp [Server] Split up handshake handling into multiple functions for debug 2018-04-09 15:25:50 +03:00
Player.hpp [Server] Split up handshake handling into multiple functions for debug 2018-04-09 15:25:50 +03:00
Utils.cpp [Server] Add and use Utils::getCellFromDescription() 2017-04-28 16:33:58 +03:00
Utils.hpp [Server] Add and use Utils::getCellFromDescription() 2017-04-28 16:33:58 +03:00