diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-08-26 00:01:29 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 16:05:21 +0200 |
commit | 0228543e6602177d933f6c88de56601201a8ab76 (patch) | |
tree | 6870420a84279ba867f3972409d9343c608193e3 /src/utils | |
parent | 04fb1b30a04b6d90abc1561c2d11c2371a29bc98 (diff) | |
download | manaserv-0228543e6602177d933f6c88de56601201a8ab76.tar.gz manaserv-0228543e6602177d933f6c88de56601201a8ab76.tar.xz manaserv-0228543e6602177d933f6c88de56601201a8ab76.zip |
Fixed the trigger area declared within map files.
The bug was pretty generic, as the contains() method
of the Rectangle class wasn't checking against left and top
sides according to the client view point.
I also documented the call site.
Resolves: Mana-Mantis #317.
Reviewed-by: o11c.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/point.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/point.h b/src/utils/point.h index 4402aa0..988b6c5 100644 --- a/src/utils/point.h +++ b/src/utils/point.h @@ -75,8 +75,8 @@ class Rectangle bool contains(const Point &p) const { - return (p.x - x) < w && - (p.y - y) < h; + return (p.x >= x && p.x < x + w && + p.y >= y && p.y < y + h); } bool intersects(const Rectangle &r) const |