ok, just found out a kinda big bug in this...
It works alright in a new game, or one saved in another map, but... If I save on a map using the Mode7 and load the save...
Thought I had fixed it too, but saving and loading again got the same problem...
Apparently, when started the variable is an
but when loaded it is somehow just an
EDIT: I couldn't find how it happened, but I was able to create a workaround.
I put, right above the error, the following code:
This way, if it is note a Matrix4, it is turned back into one.
It works alright in a new game, or one saved in another map, but... If I save on a map using the Mode7 and load the save...
Thought I had fixed it too, but saving and loading again got the same problem...
Apparently, when started the variable is an
Code:
UltraMode7.Matrix4 {data: Array(16)}
Code:
{data: Array(16)}
EDIT: I couldn't find how it happened, but I was able to create a workaround.
I put, right above the error, the following code:
Code:
if (!($gameMap._ultraMode7ModelviewMatrix instanceof UltraMode7.Matrix4)) {
$gameMap._ultraMode7ModelviewMatrix = new UltraMode7.Matrix4($gameMap._ultraMode7ModelviewMatrix.data);
}
if (!($gameMap._ultraMode7ProjectionMatrix instanceof UltraMode7.Matrix4)) {
$gameMap._ultraMode7ProjectionMatrix = new UltraMode7.Matrix4($gameMap._ultraMode7ProjectionMatrix.data);
}