Skip to content

Commit

Permalink
Allow script_execute and script_execute_ext to call constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell committed Oct 14, 2024
1 parent 013717a commit b40ee88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/functions/Function_YoYo.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ function script_get(_ind)
function script_execute( _self, _other, _index )
{
func = undefined;
_self.__yyCreatedByNew = 1;
if (typeof _index === "function") {
var newArgs = Array.prototype.slice.call(arguments);
// move self and other up the arguments
Expand Down Expand Up @@ -1104,6 +1105,7 @@ function script_execute_ext( _self, _other, _index, _array, _offset, _length )


func = undefined;
_self.__yyCreatedByNew = 1;
if (typeof _index === "function") {
newArgs.splice( 0, 0, _self, _other );
// skip passed the index, but keep the self and other
Expand Down

0 comments on commit b40ee88

Please sign in to comment.