summaryrefslogtreecommitdiff
path: root/src/game/tremulous.h
diff options
context:
space:
mode:
authorBen Millwood <thebenmachine@gmail.com>2009-10-03 12:29:34 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:59 +0000
commit1de6714f3fd27682ee48d26c7280ff4dd7c22081 (patch)
treea8ac717636cbcc4916ef6468f1b25e340d40be44 /src/game/tremulous.h
parent70348f182bf8f21b99ca66bf427468588cb41534 (diff)
Improvements, fixes, and cleanups to smooth regen
* Store player class regeneration rates as floats * Only calculate regen modifier once if replenishing multiple health points simultaneously
Diffstat (limited to 'src/game/tremulous.h')
-rw-r--r--src/game/tremulous.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 40887cf2..6d04d548 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -148,61 +148,61 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define ABUILDER_SPEED 0.7f
#define ABUILDER_VALUE AVM(200)
#define ABUILDER_HEALTH AHM(50)
-#define ABUILDER_REGEN 2
+#define ABUILDER_REGEN (0.04f * ABUILDER_HEALTH)
#define ABUILDER_COST 0
#define ABUILDER_UPG_SPEED 0.7f
#define ABUILDER_UPG_VALUE AVM(250)
#define ABUILDER_UPG_HEALTH AHM(75)
-#define ABUILDER_UPG_REGEN 3
+#define ABUILDER_UPG_REGEN (0.04f * ABUILDER_UPG_HEALTH)
#define ABUILDER_UPG_COST 0
#define LEVEL0_SPEED 1.4f
#define LEVEL0_VALUE AVM(150)
#define LEVEL0_HEALTH AHM(20)
-#define LEVEL0_REGEN 1
+#define LEVEL0_REGEN (0.05f * LEVEL0_HEALTH)
#define LEVEL0_COST 0
#define LEVEL1_SPEED 1.25f
#define LEVEL1_VALUE AVM(225)
#define LEVEL1_HEALTH AHM(60)
-#define LEVEL1_REGEN 2
+#define LEVEL1_REGEN (0.03f * LEVEL1_HEALTH)
#define LEVEL1_COST 1
#define LEVEL1_UPG_SPEED 1.25f
#define LEVEL1_UPG_VALUE AVM(275)
#define LEVEL1_UPG_HEALTH AHM(80)
-#define LEVEL1_UPG_REGEN 3
+#define LEVEL1_UPG_REGEN (0.03f * LEVEL1_UPG_HEALTH)
#define LEVEL1_UPG_COST 1
#define LEVEL2_SPEED 1.2f
#define LEVEL2_VALUE AVM(350)
#define LEVEL2_HEALTH AHM(150)
-#define LEVEL2_REGEN 4
+#define LEVEL2_REGEN (0.03f * LEVEL2_HEALTH)
#define LEVEL2_COST 1
#define LEVEL2_UPG_SPEED 1.2f
#define LEVEL2_UPG_VALUE AVM(450)
#define LEVEL2_UPG_HEALTH AHM(175)
-#define LEVEL2_UPG_REGEN 5
+#define LEVEL2_UPG_REGEN (0.03f * LEVEL2_UPG_HEALTH)
#define LEVEL2_UPG_COST 1
#define LEVEL3_SPEED 1.1f
#define LEVEL3_VALUE AVM(500)
#define LEVEL3_HEALTH AHM(200)
-#define LEVEL3_REGEN 6
+#define LEVEL3_REGEN (0.03f * LEVEL3_HEALTH)
#define LEVEL3_COST 1
#define LEVEL3_UPG_SPEED 1.1f
#define LEVEL3_UPG_VALUE AVM(600)
#define LEVEL3_UPG_HEALTH AHM(250)
-#define LEVEL3_UPG_REGEN 7
+#define LEVEL3_UPG_REGEN (0.03f * LEVEL3_UPG_HEALTH)
#define LEVEL3_UPG_COST 1
#define LEVEL4_SPEED 1.2f
#define LEVEL4_VALUE AVM(800)
#define LEVEL4_HEALTH AHM(350)
-#define LEVEL4_REGEN 9
+#define LEVEL4_REGEN (0.025f * LEVEL4_HEALTH)
#define LEVEL4_COST 2
/*
@@ -345,8 +345,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define ALIEN_SPAWN_REPEAT_TIME 10000
-#define ALIEN_REGEN_DAMAGE_TIME 1500 //msec since damage that regen starts again
-#define ALIEN_REGEN_NOCREEP_TIME 3000 //msec between regen off creep
+#define ALIEN_REGEN_DAMAGE_TIME 2000 //msec since damage that regen starts again
+#define ALIEN_REGEN_NOCREEP_MOD (1.0f/3.0f) //regen off creep
#define ALIEN_MAX_FRAGS 9
#define ALIEN_MAX_CREDITS (ALIEN_MAX_FRAGS*ALIEN_CREDITS_PER_FRAG)