You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//TODO this method is complicated and manually parsing lua like this sucks. It should be replaceable with a simple check if the function exists in Lua, but it wasn't working when I tried so I just copied this from SceneIsCompatible.
// Protected member variable and method declarations
@@ -283,6 +287,8 @@ ClassInfoGetters;
283
287
// The list of global scripts allowed to run during this activity
284
288
std::vector<GlobalScript *> m_GlobalScriptsList;
285
289
290
+
std::unordered_map<std::string, std::unique_ptr<LuabindObjectWrapper>> m_ScriptFunctions; //!< A map of LuabindObjectWrappers that hold Lua functions. Used to maintain script execution order and avoid extraneous Lua calls.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
14
14
15
15
- New `Settings.ini` property `EnableMultithreadedLua`, which can be used to enable multithreaded Lua scripts and AI, for any lua script with the `--[[MULTITHREAD]]--` tag. Defaults to true.
16
16
17
+
- New generic Lua messaging system, to allow scripts on objects to communicate with other objects or scripts.
18
+
Scripts on `MovableObject` now have new callback functions `OnMessage(self, message, context)` and `OnGlobalMessage(self, message, context)`.
19
+
Script on `Activity` also have similar functions: `ActivityName:OnMessage(message, context)` and `ActivityName:OnGlobalMessage(message, context)`.
20
+
The `OnMessage` callback will be triggered whenever the `SendMessage(message, context)` is called on an object, i.e `Object:SendMessage("Hello World")`.
21
+
This `context` argument can be anything, like a table, string or number. It will be nil if left out of the SendMessage function call.
22
+
The `OnGlobalMessage` callback works the exact same way, however global messages are sent to every object within the game, instead of a specific object.
23
+
To send a global message, use `MovableMan:SendGlobalMessage(message, context)`.
24
+
17
25
- New Lua event function `SyncedUpdate()`, which will be called in a thread-safe synchronized manner and allows multithreaded scripts to modify game state in a safe and consistent way.
18
26
19
27
- Multithreaded asynchronous pathfinding, which dramatically improves performance on large maps and improves AI responsiveness.
@@ -38,10 +46,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
38
46
39
47
- New `AEJetpack` type, which replaces the old technique of `ACrab`/`AHuman` using an `AEmitter` as a jetpack. This type inherits from `AEmitter`.
40
48
New INI and Lua (R/W) property `JetpackType`, which can be either `AEJetpack.Standard` or `AEJetpack.JumpPack`. Standard acts the same as the typical jetpack, whereas JumpPacks can only be activated when fully recharged, and fires all of it's fuel in one burst. Defaults to Standard.
49
+
New INI and Lua (R/W) property `MinimumFuelRatio`, which defines the ratio of current fuel to max fuel that has to be met to fire the jetpack. Defaults to 0 for Standard and 0.25 for JumpPacks.
41
50
New INI and Lua (R/W) property `CanAdjustAngleWhileFiring`, which defines whether the jet angle can change while the jetpack is active. Defaults to true.
42
51
New INI and Lua (R/W) property `AdjustsThrottleForWeight`, which defines whether the jetpack will adjust it's throttle (between `NegativeThrottleMultiplier` and `PositiveThrottleMultiplier`) to account for any extra inventory mass. Increased throttle will decrease jet time accordingly. Defaults to true.
43
52
44
-
45
53
- New `HeldDevice` Lua (R) function `IsBeingHeld`, which returns whether or not the `HeldDevice` is currently being held.
46
54
47
55
- New `HeldDevice` INI and Lua (R/W) property `GetsHitByMOsWhenHeld`, which defines whether this `HeldDevice` can be hit by MOs while equipped and held by an actor. Defaults to true.
@@ -70,6 +78,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
70
78
71
79
- New `SLTerrain` INI property `OrbitDirection`, which defines which direction is considered to be orbit, for the sake of brain-path-to-orbit, dropship spawn/return location, etc. Can be any of `Up`, `Down`, `Left` or `Right`. Defaults to `Up`.
72
80
81
+
- New FMOD and SoundContainer features:
82
+
The game is now divided into SFX, UI, and Music busses which all route into the Master bus.
83
+
The SFX bus has compression added for a better listening experience, and a safety volume limiter has been added to the Master bus.
84
+
Aside from volume being attenuated, sounds will now also be lowpass filtered as distance increases.
85
+
New `SoundContainer` INI and Lua (R/W) property `BusRouting`, which denotes which bus the SoundContainer routes to. Available busses: `SFX, UI, Music`. Defaults to `SFX`.
86
+
`Enum` binding for `SoundContainer.BusRouting`: `SFX = 0, UI = 1, MUSIC = 2`.
87
+
New `SoundContainer` INI and Lua (R/W) property `PanningStrengthMultiplier`, which will multiply the strength of 3D panning. This can be used to achieve for example a psuedo-Immobile effect where attenuation effects are still applied but the sound does not move from the center. Recommended to keep between 0.0 and 1.0.
0 commit comments