mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-26 04:48:17 +01:00
- [VFX trail] Fix crash when reading negative path position.
This commit is contained in:
parent
1690ecc2d4
commit
47df33f928
1 changed files with 3 additions and 2 deletions
|
@ -47,8 +47,9 @@ function Node_VFX_Trail(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
var line = lines[_ind];
|
var line = lines[_ind];
|
||||||
var _st = _rat * (lineLength[_ind] - 1);
|
var _st = _rat * (lineLength[_ind] - 1);
|
||||||
_p0 = line[floor(_st) + 0];
|
|
||||||
_p1 = line[floor(_st) + 1];
|
_p0 = line[clamp(floor(_st) + 0, 0, array_length(line) - 1)];
|
||||||
|
_p1 = line[clamp(floor(_st) + 1, 0, array_length(line) - 1)];
|
||||||
|
|
||||||
if(!is_array(_p0)) return out;
|
if(!is_array(_p0)) return out;
|
||||||
if(!is_array(_p1)) return out;
|
if(!is_array(_p1)) return out;
|
||||||
|
|
Loading…
Reference in a new issue