From 69ca2bafcd617ac8af1b8f715f0c802205a60ab1 Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Fri, 20 Dec 2024 09:49:40 +0100 Subject: fixes --- src/crepe/facade/SDLContext.cpp | 2 +- src/crepe/system/CollisionSystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe') diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 164d35e..2dae1e7 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -141,7 +141,7 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const { = (ctx.sprite.aspect_ratio == 0) ? ctx.texture.get_ratio() : ctx.sprite.aspect_ratio; vec2 size = data.size; - vec2 screen_pos = ctx.pos + data.position_offset; + vec2 screen_pos = ctx.pos; if (data.size.x == 0 && data.size.y != 0) { size.x = data.size.y * aspect_ratio; diff --git a/src/crepe/system/CollisionSystem.cpp b/src/crepe/system/CollisionSystem.cpp index e4396b9..3653d10 100644 --- a/src/crepe/system/CollisionSystem.cpp +++ b/src/crepe/system/CollisionSystem.cpp @@ -589,5 +589,5 @@ void CollisionSystem::call_collision_events(const CollisionInfo & info) { CollisionEvent data_inverted(-info); EventManager & emgr = this->mediator.event_manager; emgr.trigger_event(data, info.self.transform.game_object_id); - emgr.trigger_event(data_inverted, -info.self.transform.game_object_id); + emgr.trigger_event(data_inverted, info.other.transform.game_object_id); } -- cgit v1.2.3