can't dig with clothes

This commit is contained in:
darkrose 2014-11-15 19:17:54 +10:00
parent db26d3f61a
commit b2d2868214
1 changed files with 2 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#include "content_toolitem.h" #include "content_toolitem.h"
#include "content_craftitem.h" #include "content_craftitem.h"
#include "content_clothesitem.h"
#include "content_craft.h" #include "content_craft.h"
#include "content_list.h" #include "content_list.h"
#include "content_mapnode.h" #include "content_mapnode.h"
@ -56,7 +57,7 @@ DiggingProperties getDiggingProperties(content_t content, content_t tool)
if (t_features.hardness && c_features.hardness) if (t_features.hardness && c_features.hardness)
wear = 65535/t_features.hardness*c_features.hardness; wear = 65535/t_features.hardness*c_features.hardness;
f32 diggable = true; f32 diggable = true;
if (c_features.type == CMT_STONE && t_features.type != TT_PICK) { if ((tool&CONTENT_CLOTHESITEM_MASK) == CONTENT_CLOTHESITEM_MASK || (c_features.type == CMT_STONE && t_features.type != TT_PICK)) {
diggable = false; diggable = false;
}else{ }else{
switch (t_features.type) { switch (t_features.type) {