From f7cf35aaad2512e7f329954946aac5e2a24cdfb7 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 5 Jun 2006 15:05:49 +0000 Subject: - Corrected cloaking not ending on attack if you are near a wall. - Moved define cap_value to map.h as it's quite handy. - Updated pc_bonus to use cap_value on all status_data modifiers to prevent overflows/underflows. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6979 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/map/map.h') diff --git a/src/map/map.h b/src/map/map.h index 6663ae11a..8270256a9 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -162,6 +162,9 @@ enum { //Specifies maps that have special GvG/WoE restrictions #define map_flag_gvg(m) (map[m].flag.gvg || (agit_flag && map[m].flag.gvg_castle)) +//Caps values to min/max +#define cap_value(a, min, max) (a>max?max:a