openmw-tes3coop/apps/openmw-mp/Script/Functions
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
..
Actors.cpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
Actors.hpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
Books.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Books.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Cells.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Cells.hpp [General] Turn PlayerMap into WorldMap, now a Worldstate packet 2018-06-07 12:51:45 +03:00
CharClass.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
CharClass.hpp [Server] Document script functions, part 3 2017-07-25 18:07:09 +03:00
Chat.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Dialogue.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Dialogue.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Factions.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Factions.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
GUI.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
GUI.hpp [General] Add notes for InputDialogs in GUIBoxes packet 2018-05-25 05:28:22 +03:00
Items.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Items.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Mechanics.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Mechanics.hpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
Miscellaneous.cpp [Server] Add DoesFileExist() script function 2018-05-04 03:09:54 +03:00
Miscellaneous.hpp [Server] Add DoesFileExist() script function 2018-05-04 03:09:54 +03:00
Objects.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Objects.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Positions.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Positions.hpp [General] Implement PlayerMomentum packet & associated script functions 2018-04-29 23:47:17 +03:00
Quests.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Quests.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Settings.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Settings.hpp [General] Add SetResetStats server script function 2018-04-09 19:24:24 +03:00
Shapeshift.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Shapeshift.hpp [Server] Create ShapeshiftFunctions and move relevant functions there 2018-04-18 10:45:39 +03:00
Spells.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Spells.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Stats.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Stats.hpp [General] Replace deathReason in death packets with a killer variable 2018-07-05 22:24:51 +03:00
Timer.cpp [Server] Simplify native CallPublic & CreateTimerEx 2017-06-30 17:59:50 +08:00
Worldstate.cpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00
Worldstate.hpp [Server] Use consistent arguments for script functions that send packets 2018-07-07 18:29:31 +03:00