View Single Post
  #1  
Old 12-03-2012, 03:16 AM
jsr
Hill Giant
 
Join Date: Aug 2008
Location: melbourne
Posts: 187
Default Fix: Low level damage cap

Server rules for lower level melee damage caps aren't working as intended.

In attack.cpp.client::attack;

I think this:
Code:
		if(GetLevel() < 10 && max_hit > 20)
			max_hit = (RuleI(Combat, HitCapPre10));
		else if(GetLevel() < 20 && max_hit > 40)
			max_hit = (RuleI(Combat, HitCapPre20));
Should be more like this:

Code:
		if(GetLevel() < 10 && max_hit > RuleI(Combat, HitCapPre10))
			max_hit = (RuleI(Combat, HitCapPre10));
		else if(GetLevel() < 20 && max_hit > RuleI(Combat, HitCapPre20))
			max_hit = (RuleI(Combat, HitCapPre20));
Not sure if it's efficient to use a variable instead for the rule value.
Reply With Quote