about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-11 13:54:42 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-11 13:54:42 +0000
commitc2c90982fd2c9b1d0f804872da3496d1c76d9c5e (patch)
tree256e074ce510092c7ab772e7db2fd8ee873ee380
parentb70eb4263f1ec36d73d193028cbb472b7c78e6c5 (diff)
downloadzcatch-c2c90982fd2c9b1d0f804872da3496d1c76d9c5e.tar.gz
zcatch-c2c90982fd2c9b1d0f804872da3496d1c76d9c5e.zip
increased the firedelay on the gun and hammer to 125ms. this is how fast a humanly doable. prevents usage of mouse wheel to get insane firing speeds
-rw-r--r--datasrc/content.py4
-rw-r--r--src/game/server/entities/character.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/datasrc/content.py b/datasrc/content.py
index 10828cf7..f3daa710 100644
--- a/datasrc/content.py
+++ b/datasrc/content.py
@@ -420,7 +420,7 @@ anim.attach.frames.Add(AnimKeyframe(1.00, 0, 0, -0.25))
 container.animations.Add(anim)
 
 weapon = WeaponSpec(container, "hammer")
-weapon.firedelay.Set(100)
+weapon.firedelay.Set(125)
 weapon.damage.Set(3)
 weapon.visual_size.Set(96)
 weapon.offsetx.Set(4)
@@ -429,7 +429,7 @@ container.weapons.hammer.base.Set(weapon)
 container.weapons.id.Add(weapon)
 
 weapon = WeaponSpec(container, "gun")
-weapon.firedelay.Set(100)
+weapon.firedelay.Set(125)
 weapon.ammoregentime.Set(500)
 weapon.visual_size.Set(64)
 weapon.offsetx.Set(32)
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp
index dba07ee7..3714bf08 100644
--- a/src/game/server/entities/character.cpp
+++ b/src/game/server/entities/character.cpp
@@ -275,6 +275,8 @@ void CHARACTER::fire_weapon()
 	// check for ammo
 	if(!weapons[active_weapon].ammo)
 	{
+		// 125ms is a magical limit of how fast a human can click
+		reload_timer = 125 * server_tickspeed() / 1000;;
 		game.create_sound(pos, SOUND_WEAPON_NOAMMO);
 		return;
 	}