aboutsummaryrefslogtreecommitdiffstats
path: root/src/attack.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2017-10-20 10:30:53 -0400
committerClyne Sullivan <tullivan99@gmail.com>2017-10-20 10:30:53 -0400
commitdff621732099934ba5aba09c6b5c3df87b9858b5 (patch)
treea4121d241a322c0a8c679ce6ba03f33bc9bb5622 /src/attack.cpp
parent1a4780bad1cc40b43ebe6d93baba0f89572194d4 (diff)
bow/arrow updates, food
Diffstat (limited to 'src/attack.cpp')
-rw-r--r--src/attack.cpp3
1 files changed, 2 insertions, 1 deletions
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<Position, Solid, Health>(