David Cernat
6c1173d598
[Client] Rename searchPtrViaRefIndex into searchPtrViaUniqueIndex
2018-07-13 04:33:54 +03:00
David Cernat
09da24f1ea
[General] Rename all instances of refNumIndex into refNum
...
This creates symmetry with mpNum and should cause less confusion in the future.
2018-07-13 04:12:03 +03:00
David Cernat
20296859ee
[Server] Clarify functions used for getting data in Networking
2018-07-13 02:40:24 +03:00
David Cernat
04dd59e638
[Server] Use clearer names for functions used to get last received data
...
Additionally, rename GetObjectChangesSize() into the less confusing GetObjectListSize()
2018-07-13 02:33:50 +03:00
David Cernat
aeb2e57444
[Server] Bring Actor functions in line with Object functions, part 2
...
The ActorPacket-sending functions now have sendToOtherVisitors and skipAttachedPlayer arguments, except for the ones for ActorList and ActorAuthority (because such arguments don't make sense for those).
2018-07-13 01:25:43 +03:00
David Cernat
837c5369c0
[Server] Add OnActorAI event and remove autosync for ActorAI packets
2018-07-13 01:05:27 +03:00
David Cernat
8f745df055
[Server] Bring Actor functions in line with Object functions, part 1
...
The last received ActorList can now be copied into the write-only ActorList that can be sent in packets. Changing the pid of the write-only ActorList can now be done separately from clearing its contents.
2018-07-13 01:04:41 +03:00
David Cernat
f0d4f1bbe5
[Client] Send ActorAI packets when followed by an NPC
...
The packet is sent regardless of whether we are the cell authority or not, so the server can decide what it wants to do with it.
2018-07-12 23:08:17 +03:00
David Cernat
6316f1e590
[Client] Add ActorList methods for sending ActorAI packets
...
Additionally, use consistent capitalization for AI-related methods.
2018-07-12 20:48:47 +03:00
David Cernat
0fd8f7660b
[Client] Replace LocalActor arg with BaseActor in ActorList functions
2018-07-12 20:15:04 +03:00
David Cernat
bdf2f03c4f
[General] Remove unnecessary MapChanges struct from BaseWorldstate
2018-07-12 05:06:31 +03:00
David Cernat
59a56ca35e
[Client] Disallow clients from scaling their associated players
...
Additionally, display messages when trying to scale players.
2018-07-12 03:29:38 +03:00
David Cernat
8ca29dbaac
[Client] Fix remaining mistakes in debug for received ActorAI packets
2018-07-11 23:11:37 +03:00
David Cernat
5bb442bbd3
[Server] Add sendToOtherVisitors boolean to SendActorAI()
...
Additionally, avoid repetition in functions that send Actor packets.
2018-07-11 22:17:00 +03:00
David Cernat
25f7a55495
[Client] Improve debug for received ActorAI packets
2018-07-11 19:54:56 +03:00
David Cernat
ceea65f666
[General] Change pre-rewrite's version to 0.7.0-alpha
2018-07-11 19:35:28 +03:00
David Cernat
7a646494ee
[General] Point to serverCore.lua instead of server.lua in server config
2018-07-11 02:53:40 +03:00
David Cernat
bff6e9e235
[General] Implement ActorAI packet, part 5
...
Allow repetition for AiWander package to be turned on and off.
2018-07-10 23:18:32 +03:00
David Cernat
2e31c212c0
[Client] Make any ActorAI packet override an actor's desire to fight
2018-07-10 11:33:07 +03:00
David Cernat
79ee976c95
[Client] Implement ACTIVATE action in DedicatedActor::setAI()
...
Additionally, clean up usage of CreatureStats in DedicatedActor.
2018-07-10 11:31:51 +03:00
David Cernat
0f30e21312
[Client] Add searchPtrViaRefIndex method to World to easily find objects
2018-07-10 11:30:32 +03:00
David Cernat
c984fc0881
[Client] Allow AiActivate to be used with specific Ptrs, not just refIds
2018-07-10 08:21:24 +03:00
David Cernat
00c13ae96c
[General] Implement ActorAI packet, part 4
...
The server can now make actors activate players and objects, at least in theory. In practice, OpenMW''s AiActivate package needs to be worked so it allows specific objects as targets instead of just refIds.
2018-07-10 07:07:37 +03:00
David Cernat
0e13207afe
[General] Implement ActorAI packet, part 3
...
The server can now cancel actor AI, make actors travel to a location, make actors wander, and make actors get escorted by a player or another actor.
2018-07-10 05:07:58 +03:00
David Cernat
5baef09f79
[General] Implement ActorAI packet, part 2
...
The server can now make actors start combat with players or other actors.
2018-07-10 02:47:52 +03:00
David Cernat
5628f3b977
[Client] Fix debug for DedicatedActor::setAI()
2018-07-10 02:05:10 +03:00
David Cernat
b86155dc11
[Client] Allow AiFollow package to have infinite distance when desired
2018-07-10 01:40:57 +03:00
David Cernat
864c66d1d4
[Client] Make sure hasAiTarget is set correctly for DedicatedActors
2018-07-10 01:35:38 +03:00
David Cernat
26ac29e8b1
[Client] Add disclaimer to save dialog about singleplayer-only saves
2018-07-09 22:55:11 +03:00
David Cernat
4d4bced929
[Client] Allow singleplayer-only saves in main menu during multiplayer
2018-07-09 22:53:18 +03:00
David Cernat
6ff7fa525e
[Client] Disable autosaving when waiting
2018-07-08 23:04:30 +03:00
David Cernat
04ba324290
[Client] Disable clientside disabling and enabling of objects
2018-07-08 03:31:48 +03:00
David Cernat
5043fb4246
[Client] Disable clientside disarming of traps
2018-07-08 02:38:10 +03:00
David Cernat
cbb9817913
[Server] Add missing descriptions for PlayAnimation() and PlaySpeech()
2018-07-08 02:03:33 +03:00
David Cernat
6ba9b1742b
[Server] Remove unused default parameters for script functions
2018-07-08 01:05:54 +03:00
David Cernat
acdaf1a282
[Client] Disable clientside deletion of objects through console/scripts
...
Unfortunately, disabling clientside deletion of summons and items that can be picked up requires extra work on actors and inventories respectively, to avoid buggy situations.
2018-07-08 00:39:07 +03:00
David Cernat
8d9fde810e
[Client] Disable clientside scaling of objects
2018-07-08 00:28:31 +03:00
David Cernat
f3892d697b
[Client] Disable clientside locking and unlocking of objects
2018-07-08 00:06:01 +03:00
David Cernat
563269d359
[Server] Bring comments up-to-date for packet-sending script functions
2018-07-07 20:16:36 +03:00
David Cernat
2f1ef049d2
[Server] Turn sendToAttachedPlayer into skipAttachedPlayer
...
Unfortunately, default values set in the C++ code for our script function parameters don't actually seem to work, and they always default to false because they receive a nil value from Lua. As a result, to not break compatibility with previous scripts, I've decided to use a skipAttachedPlayer argument instead so it can default to false while still providing the same benefits that sendToAttachedPlayer provided.
2018-07-07 20:08:59 +03:00
David Cernat
141e404ed9
[Server] Move server administration functions to ServerFunctions class
2018-07-07 19:40:22 +03:00
David Cernat
c0fde5ae97
[General] Add explanation about 0.0.0.0 to server config file
2018-07-07 19:33:54 +03:00
David Cernat
6041425122
[Server] Move Chat functions to new ChatFunctions class
2018-07-07 19:20:25 +03:00
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
David Cernat
14e4f64296
[Server] Add GetVideoFilename() and SendVideoPlay() script functions
2018-07-07 17:09:57 +03:00
David Cernat
3ed9d89280
[General] Use separate variables for video & music filenames in packets
2018-07-07 14:40:35 +03:00
David Cernat
509882b5f6
[Client] Rework MechanicsHelper::getTarget() to avoid crashes
2018-07-07 11:43:57 +03:00
David Cernat
7f0549fc4f
[Server] Remove hardcoded sync for VideoPlay and add OnVideoPlay event
2018-07-06 23:37:57 +03:00
David Cernat
ae8b5a0709
[Server] Remove hardcoded sync for Place, Spawn & other Object packets
2018-07-06 23:36:28 +03:00
David Cernat
e3e1cfc549
[Client] Add forgotten comparison in crimeTime and deathTime check
2018-07-06 20:49:08 +03:00