From f06ca9172a2ff8b29709fb75e347d95fffc0232c Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 28 Apr 2020 16:37:55 -0700 Subject: [PATCH] Set drawframe to tile when creating an entity This fixes entities being drawframe 0 for 1 frame when being first created. Incidentally, this also fixes entities created during completestop being the player sprite, too, which is something not many people notice. --- desktop_version/src/Entity.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index 21dfb953..3c6e3d34 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -2006,6 +2006,8 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo break; } + entity.drawframe = entity.tile; + entities.push_back(entity); }