1
This commit is contained in:
parent
eeb0f59e74
commit
e7c141ae3e
@ -75,6 +75,7 @@ namespace mtb
|
||||
int auto_trace() const { return auto_trace_; };
|
||||
int trace_range() const { return trace_range_; };
|
||||
int double_gun() const { return double_gun_; };
|
||||
int hand() const { return hand_; };
|
||||
|
||||
bool has_id() const { return __flags__.test(0);};
|
||||
bool has_equip_type() const { return __flags__.test(1);};
|
||||
@ -141,6 +142,7 @@ namespace mtb
|
||||
bool has_auto_trace() const { return __flags__.test(62);};
|
||||
bool has_trace_range() const { return __flags__.test(63);};
|
||||
bool has_double_gun() const { return __flags__.test(64);};
|
||||
bool has_hand() const { return __flags__.test(65);};
|
||||
|
||||
protected:
|
||||
|
||||
@ -209,9 +211,10 @@ namespace mtb
|
||||
int auto_trace_ = 0;
|
||||
int trace_range_ = 0;
|
||||
int double_gun_ = 0;
|
||||
int hand_ = 0;
|
||||
|
||||
public:
|
||||
std::bitset<65> __flags__;
|
||||
std::bitset<66> __flags__;
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -258,7 +258,7 @@ namespace mtb
|
||||
{
|
||||
std::shared_ptr<a8::reflect::Class> meta_class = nullptr;
|
||||
if (!meta_class) {
|
||||
meta_class = std::make_shared<a8::reflect::Class>("Equip", 65, 0);
|
||||
meta_class = std::make_shared<a8::reflect::Class>("Equip", 66, 0);
|
||||
meta_class->SetSimpleField(0, "id", a8::reflect::ET_INT32, my_offsetof2(Equip, id_));
|
||||
meta_class->SetSimpleField(1, "equip_type", a8::reflect::ET_INT32, my_offsetof2(Equip, equip_type_));
|
||||
meta_class->SetSimpleField(2, "equip_subtype", a8::reflect::ET_INT32, my_offsetof2(Equip, equip_subtype_));
|
||||
@ -324,6 +324,7 @@ namespace mtb
|
||||
meta_class->SetSimpleField(62, "auto_trace", a8::reflect::ET_INT32, my_offsetof2(Equip, auto_trace_));
|
||||
meta_class->SetSimpleField(63, "trace_range", a8::reflect::ET_INT32, my_offsetof2(Equip, trace_range_));
|
||||
meta_class->SetSimpleField(64, "double_gun", a8::reflect::ET_INT32, my_offsetof2(Equip, double_gun_));
|
||||
meta_class->SetSimpleField(65, "hand", a8::reflect::ET_INT32, my_offsetof2(Equip, hand_));
|
||||
}
|
||||
return meta_class;
|
||||
}
|
||||
|
@ -133,13 +133,23 @@ static void CalcGunMuzzlePosition(Creature* c,
|
||||
0
|
||||
);
|
||||
} else {
|
||||
gun_muzzle_position +=
|
||||
glm::vec4(
|
||||
shot_animi->r_x,
|
||||
shot_animi->r_y,
|
||||
shot_animi->r_z,
|
||||
0
|
||||
);
|
||||
if (weapon_meta->hand() == 1) {
|
||||
gun_muzzle_position +=
|
||||
glm::vec4(
|
||||
shot_animi->l_x,
|
||||
shot_animi->l_y,
|
||||
shot_animi->l_z,
|
||||
0
|
||||
);
|
||||
} else {
|
||||
gun_muzzle_position +=
|
||||
glm::vec4(
|
||||
shot_animi->r_x,
|
||||
shot_animi->r_y,
|
||||
shot_animi->r_z,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -232,6 +232,8 @@ message Equip
|
||||
optional int32 trace_range = 77;
|
||||
|
||||
optional int32 double_gun = 78;
|
||||
|
||||
optional int32 hand = 79;
|
||||
}
|
||||
|
||||
message Hero
|
||||
|
Loading…
x
Reference in New Issue
Block a user