From 434a672ac492f1798f8a53cd26c5013d156671d7 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 7 Nov 2020 17:12:54 -0800 Subject: [PATCH] Fix edentities not rendering at all in the editor What's the difference between a slash sign and a percent sign? Well, a percent sign is just a slash sign with two extra oranges in between, but those two oranges make a huuuuge difference... --- desktop_version/src/editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 11f91358..5f326202 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -2648,7 +2648,7 @@ void editorrender() SDL_Rect drawRect; //if() on screen - if(edentity[i].x % 40 == ed.levx && edentity[i].y % 30 == ed.levy) + if(edentity[i].x / 40 == ed.levx && edentity[i].y / 30 == ed.levy) { switch(edentity[i].t) { @@ -2925,7 +2925,7 @@ void editorrender() //Need to also check warp point destinations if(edentity[i].t==13 && ed.warpent!=i) { - if (edentity[i].p1 % 40 == ed.levx && edentity[i].p2 % 30 == ed.levy) + if (edentity[i].p1 / 40 == ed.levx && edentity[i].p2 / 30 == ed.levy) { graphics.drawsprite((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),18+(ed.entframe%2),64,64,64); fillboxabs((edentity[i].p1*8)- (ed.levx*40*8),(edentity[i].p2*8)- (ed.levy*30*8),16,16,graphics.getRGB(64,64,96));