Commit Graph

21593 Commits (7a646494ee737495b706a83b69b6fded430cbc49)
 

Author SHA1 Message Date
David Cernat 7a646494ee [General] Point to serverCore.lua instead of server.lua in server config 7 years ago
David Cernat bff6e9e235 [General] Implement ActorAI packet, part 5
Allow repetition for AiWander package to be turned on and off.
7 years ago
David Cernat 2e31c212c0 [Client] Make any ActorAI packet override an actor's desire to fight 7 years ago
David Cernat 79ee976c95 [Client] Implement ACTIVATE action in DedicatedActor::setAI()
Additionally, clean up usage of CreatureStats in DedicatedActor.
7 years ago
David Cernat 0f30e21312 [Client] Add searchPtrViaRefIndex method to World to easily find objects 7 years ago
David Cernat c984fc0881 [Client] Allow AiActivate to be used with specific Ptrs, not just refIds 7 years ago
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.
7 years ago
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.
7 years ago
David Cernat 5baef09f79 [General] Implement ActorAI packet, part 2
The server can now make actors start combat with players or other actors.
7 years ago
David Cernat 5628f3b977 [Client] Fix debug for DedicatedActor::setAI() 7 years ago
David Cernat b86155dc11 [Client] Allow AiFollow package to have infinite distance when desired 7 years ago
David Cernat 864c66d1d4 [Client] Make sure hasAiTarget is set correctly for DedicatedActors 7 years ago
David Cernat 26ac29e8b1 [Client] Add disclaimer to save dialog about singleplayer-only saves 7 years ago
David Cernat 4d4bced929 [Client] Allow singleplayer-only saves in main menu during multiplayer 7 years ago
David Cernat 6ff7fa525e [Client] Disable autosaving when waiting 7 years ago
David Cernat 04ba324290 [Client] Disable clientside disabling and enabling of objects 7 years ago
David Cernat 5043fb4246 [Client] Disable clientside disarming of traps 7 years ago
David Cernat cbb9817913 [Server] Add missing descriptions for PlayAnimation() and PlaySpeech() 7 years ago
David Cernat 6ba9b1742b [Server] Remove unused default parameters for script functions 7 years ago
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.
7 years ago
David Cernat 8d9fde810e [Client] Disable clientside scaling of objects 7 years ago
David Cernat f3892d697b [Client] Disable clientside locking and unlocking of objects 7 years ago
David Cernat 563269d359 [Server] Bring comments up-to-date for packet-sending script functions 7 years ago
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.
7 years ago
David Cernat 141e404ed9 [Server] Move server administration functions to ServerFunctions class 7 years ago
David Cernat c0fde5ae97 [General] Add explanation about 0.0.0.0 to server config file 7 years ago
David Cernat 6041425122 [Server] Move Chat functions to new ChatFunctions class 7 years ago
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.
7 years ago
David Cernat 14e4f64296 [Server] Add GetVideoFilename() and SendVideoPlay() script functions 7 years ago
David Cernat 3ed9d89280 [General] Use separate variables for video & music filenames in packets 7 years ago
David Cernat 509882b5f6 [Client] Rework MechanicsHelper::getTarget() to avoid crashes 7 years ago
David Cernat 7f0549fc4f [Server] Remove hardcoded sync for VideoPlay and add OnVideoPlay event 7 years ago
David Cernat ae8b5a0709 [Server] Remove hardcoded sync for Place, Spawn & other Object packets 7 years ago
David Cernat e3e1cfc549 [Client] Add forgotten comparison in crimeTime and deathTime check 7 years ago
David Cernat 4eb72eecb1 [Client] Fix crash for invalid CellRefs in MechanicsHelper::getTarget() 7 years ago
David Cernat 4b30a44816 [Client] Compare crimeTime and deathTime when NPCs forgive player crimes
Previously, all crime witnesses stopped being hostile to a respawning player for as long as the player's diedSinceArrestAttempt was true. That meant that, in an area with no guards to arrest the player, crime witnesses did not enage in combat with the player at all ever again until diedSinceArrestAttempt became false.

This commit makes it so the time of the last crime is recorded for each witness, and that is then compared with the time of the LocalPlayer's last death for a one-time crime forgiveness during that player's current life.

This is essentially a gameplay adjustment for "singleplayer with respawns," and will have to be reworked to make sense for every player in multiplayer, though that requires reworking the crime system as a whole and is thus on hold.
7 years ago
David Cernat c23fc3446f [Client] Avoid sending map tiles for Wilderness cells 7 years ago
David Cernat 17c234d9ca [Client] Use initial values for LocalPlayer and LocalActor killers 7 years ago
David Cernat 3e52857e2b [General] Fix build for client and construction set 7 years ago
David Cernat 97cd3effa7 [Client] Make actor debug consistent with object debug 7 years ago
David Cernat b0bd12f9dd Merge branch '0.6.3' of https://github.com/TES3MP/openmw-tes3mp into 0.6.3 7 years ago
David Cernat c075496748 [General] Replace deathReason in death packets with a killer variable
Add serverside script functions for determining the killers of both players and actors.

Use unsigned ints for script functions returning an object or actor's refNumIndex or mpNum.

Remove updateDeadState() from LocalPlayer and make its code part of updateStatsDynamic() for simplicity.
7 years ago
David Cernat 934e592bdb [Server] Make spacing in CharClass consistent with other categories 7 years ago
David Cernat e8ce009521 [Server] Use regular int as return value for GetObjectSummonerPid()
Additionally, clarify descriptions of script functions for getting information about summoners.
7 years ago
David Cernat f02492a593 [General] Temporarily include target names in mwmp::Target
These will be removed once the server can get the names matching refIds by reading content files.
7 years ago
David Cernat 691b332d03 [Client] Use MechanicsHelper::getTarget() for summoners in ObjectList 7 years ago
David Cernat 130a32ebb0 [Client] Add new methods for handling mwmp::Target in MechanicsHelper 7 years ago
Koncord 7a032baaa3 [General] Move OSG hack to ELSE branch 7 years ago
Koncord 533cd9cdec [General] Fix FindRakNet 7 years ago
Koncord 470ea50b54 [General] Use LuaJit instead default Lua 7 years ago