From dff621732099934ba5aba09c6b5c3df87b9858b5 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 20 Oct 2017 10:30:53 -0400 Subject: bow/arrow updates, food --- src/attack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/attack.cpp') diff --git a/src/attack.cpp b/src/attack.cpp index 16c7f8a..8c5d44a 100644 --- a/src/attack.cpp +++ b/src/attack.cpp @@ -96,7 +96,8 @@ void AttackSystem::update(entityx::EntityManager& en, entityx::EventManager& ev, //point.y -= size.y / 2; // center range height vec2 point = a.pos + a.attack.offset; - vec2 size; + vec2 size (0, a.attack.range.y); + point.y -= size.y / 2; a.attack.script("hit", {LuaVariable("xrange", size.x)}); en.each( -- cgit v1.2.3