Skip to content

Commit

Permalink
Merge pull request #302 from Mc-muffin/patch-2
Browse files Browse the repository at this point in the history
Fix Bytecode 15 code editing
  • Loading branch information
colinator27 authored Jul 26, 2020
2 parents 3847126 + 3508b9d commit 24a1bd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions UndertaleModLib/UndertaleData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,15 @@ public static UndertaleVariable EnsureDefined(this IList<UndertaleVariable> list
if (!bytecode14)
{
if (data.InstanceVarCount == data.InstanceVarCountAgain)
{ // Example games that use this mode: Undertale v1.08, Undertale v1.11.
{ // Bytecode 16+.
data.InstanceVarCount++;
data.InstanceVarCountAgain++;
}
else
{ // Example Games which use this mode: Undertale v1.001.
if (inst == UndertaleInstruction.InstanceType.Self)
{ // Bytecode 15.
if (inst == UndertaleInstruction.InstanceType.Self && !isBuiltin)
{
oldId = data.InstanceVarCountAgain;
data.InstanceVarCountAgain++;
}
else if (inst == UndertaleInstruction.InstanceType.Global)
Expand Down

0 comments on commit 24a1bd3

Please sign in to comment.