From dfdad165f5d3a70bbb9471df17b4b84bba07a6ef Mon Sep 17 00:00:00 2001 From: Misa Date: Mon, 5 Oct 2020 23:04:58 -0700 Subject: [PATCH] Fix spawning from an exotic checkpoint setting invalid gravitycontrol An exotic checkpoint is a checkpoint with a sprite that is neither the flipped checkpoint nor unflipped checkpoint. More specifically, it's a checkpoint whose edentity p1 attribute is something other than 0 or 1. Normally, whenever you touch an exotic checkpoint in-game, your savepoint's y-position and gravitycontrol don't get touched. However, in the editor, spawning from an exotic checkpoint means that your gravitycontrol gets set to a value that is neither 0 nor 1. In this invalid gravitycontrol state, Viridian is treated like they're flipped, but they cannot unflip. This is an inconsistency between the editor and in-game, so I'm fixing it. Now, spawning from an exotic checkpoint in the editor will just set your gravitycontrol to 0, i.e. unflipped. --- desktop_version/src/editor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index f9232bcb..7b466241 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -4716,7 +4716,14 @@ void editorinput() game.edsavey = (edentity[testeditor].y%30)*8; game.edsaverx = 100+tx; game.edsavery = 100+ty; - game.edsavegc = 1-edentity[testeditor].p1; + if (edentity[testeditor].p1 == 0) // NOT a bool check! + { + game.edsavegc = 1; + } + else + { + game.edsavegc = 0; + } game.edsavey--; game.edsavedir = 0; }