-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(extra-natives/five): CPortalTracker ScRT
CPortalTracker probeLength adjustments via custom ScRT Native Co-authored-by: nikez <[email protected]> Co-authored-by: okqut <[email protected]>
- Loading branch information
1 parent
79839e4
commit aab84c4
Showing
3 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## SET_EMITTER_PROBE_LENGTH | ||
|
||
```c | ||
void SET_EMITTER_PROBE_LENGTH(float probeLength); | ||
``` | ||
Allows StaticEmitter's without a linked entity to make use of environment features like occlusion and reverb even if they are located higher than 20.0 units above any static collision inside interiors. | ||
This native allows you to extend the probe range up to 150.0 units. | ||
## Examples | ||
```lua | ||
RegisterCommand("setEmitterProbeLength", function(src, args, raw) | ||
local probeLength = (tonumber(args[1]) + 0.0) | ||
print("Extending emitter probes to: ", probeLength) | ||
SetEmitterProbeLength(probeLength) | ||
end) | ||
RegisterCommand("resetEmitterProbeLength", function() | ||
print("Resetting emitter probes to default settings") | ||
SetEmitterProbeLength(20.0) | ||
end) | ||
``` | ||
|
||
|
||
## Parameters | ||
* **probeLength**: The desired probe length (20.0 - 150.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## SET_INTERIOR_PROBE_LENGTH | ||
|
||
```c | ||
void SET_INTERIOR_PROBE_LENGTH(float probeLength); | ||
``` | ||
Overwrite the games default CPortalTracker interior detection range. | ||
This fixes potentially unwanted behaviour in the base game and allows you to build custom interiors with larger ceiling heights without running into graphical glitches. | ||
By default CPortalTracker will probe 4 units downward trying to reach collisions that are part of the interior the entity is in. | ||
If no collision can be found 16 units are used in some circumstances. | ||
There are 30+ hard coded special cases, only some of them exposed via script (for example `ENABLE_STADIUM_PROBES_THIS_FRAME`). | ||
This native allows you to extend the probe range up to 150 units which is the same value the game uses for the `xs_arena_interior` | ||
## Examples | ||
```lua | ||
RegisterCommand("setInteriorProbeLength", function(src, args, raw) | ||
local probeLength = (tonumber(args[1]) + 0.0) | ||
print("Extending interior detection probes to: ", probeLength) | ||
SetInteriorProbeLength(probeLength) | ||
end) | ||
RegisterCommand("resetInteriorProbeLength", function() | ||
print("Resetting interior detection probes to default settings") | ||
SetInteriorProbeLength(0.0) | ||
end) | ||
``` | ||
|
||
|
||
## Parameters | ||
* **probeLength**: The desired probe length (0.0 - 150.0) |