swords should kill mobs faster than spears

This commit is contained in:
darkrose 2015-04-14 01:00:06 +10:00
parent d15697038b
commit 0a29e89a24
2 changed files with 5 additions and 2 deletions

View File

@ -1414,9 +1414,12 @@ u16 MobSAO::punch(content_t punch_item, v3f dir, const std::string &playername)
u16 amount = 2;
if (f.type == TT_SWORD || f.type == TT_SPEAR) {
if (f.type == TT_SWORD) {
amount = 4*((f.hardness/100)+1);
wear = 65535/f.hardness;
}else if (f.type == TT_SPEAR) {
amount = 2*((f.hardness/100)+1);
wear = 65535/f.hardness;
}else if (f.type == TT_AXE || f.type == TT_PICK) {
amount = ((f.hardness/200)+1);
}

View File

@ -507,7 +507,7 @@ public:
}
}
bool loadSound(const std::string &name, const std::string &filepath, float gain=1.0)
bool loadSound(const std::string &name, const std::string &filepath, float gain)
{
std::string path = getPath("sound",filepath,true);
if (path == "")