From 1a3577e196ed05116e816f80dd53402b23f08b2e Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 25 Sep 2020 10:13:00 -0700 Subject: [PATCH] Add kludge to fix rendering of gravity lines in a gotoroom Due to #464, standing inside a gravity line during a gotoroom that occurs every frame will end up with the gravity line being gray instead of being white. To temporarily fix this (until #464 is properly fixed), I decided to add some kludge that colors it white if its onentity is 1. I tested this patch with gravity lines in both constant-gotoroom and normal environments, and it seems to be fine for both. --- desktop_version/src/Graphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 74e52c21..1ed5ebe1 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1430,7 +1430,7 @@ bool Graphics::Hitest(SDL_Surface* surface1, point p1, SDL_Surface* surface2, po void Graphics::drawgravityline( int t ) { - if (obj.entities[t].life == 0) + if (obj.entities[t].life == 0 || obj.entities[t].onentity == 1) // FIXME: Remove 'onentity == 1' when game loop order is fixed! { switch(linestate) {