1
This commit is contained in:
parent
4c713803eb
commit
40ad332a7e
@ -107,6 +107,9 @@ static bool LoadOtherHeroAnimi(const std::string key,
|
||||
float x = act_xobj->At("x")->AsXValue().GetDouble();
|
||||
float y = act_xobj->At("y")->AsXValue().GetDouble();
|
||||
float z = act_xobj->At("z")->AsXValue().GetDouble();
|
||||
if (!(h == mt::SHOT_HAND_RIGHT || h == mt::SHOT_HAND_LEFT)) {
|
||||
A8_ABORT();
|
||||
}
|
||||
mt::HeroShotAnimationOther o;
|
||||
o.hand = h;
|
||||
o.t = t;
|
||||
@ -429,4 +432,27 @@ namespace mt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int HeroShotAnimation::GetShotAnimTime(int bullet_idx) const
|
||||
{
|
||||
if (!is_other) {
|
||||
return t;
|
||||
}
|
||||
if (bullet_idx >= 0 && bullet_idx < other_list.size()) {
|
||||
return other_list.at(bullet_idx).t;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HeroShotAnimation::GetShotHand(int bullet_idx) const
|
||||
{
|
||||
if (!is_other) {
|
||||
return SHOT_HAND_RIGHT;
|
||||
}
|
||||
if (bullet_idx >= 0 && bullet_idx < other_list.size()) {
|
||||
return other_list.at(bullet_idx).hand;
|
||||
}
|
||||
return SHOT_HAND_RIGHT;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -47,6 +47,8 @@ namespace mt
|
||||
float p5_z = 0;
|
||||
|
||||
std::vector<HeroShotAnimationOther> other_list;
|
||||
int GetShotAnimTime(int bullet_idx) const;
|
||||
int GetShotHand(int bullet_idx) const;
|
||||
};
|
||||
|
||||
DECLARE_ID_TABLE(Hero, mtb::Hero,
|
||||
|
@ -2200,7 +2200,10 @@ void Human::PushJoinRoomMsg()
|
||||
notifymsg.set_error_code(0);
|
||||
notifymsg.set_server_info(JsonDataMgr::Instance()->server_info);
|
||||
room->FillSMJoinedNotify(this, notifymsg);
|
||||
#ifdef MYDEBUG
|
||||
#else
|
||||
notifymsg.set_pre_client_shot(mt::Param::s().pre_client_shot);
|
||||
#endif
|
||||
GGListener::Instance()->SendToClient(socket_handle, 0, notifymsg);
|
||||
}
|
||||
{
|
||||
|
@ -73,6 +73,8 @@ static void CalcGunMuzzlePosition(Creature* c,
|
||||
int i = 0;
|
||||
}
|
||||
if (shot_animi) {
|
||||
if (shot_animi->is_other) {
|
||||
} else {
|
||||
if (weapon_meta->double_gun()&&
|
||||
bulletIdx > (int)(bulletNum / 2)) {
|
||||
gun_muzzle_position +=
|
||||
@ -153,6 +155,7 @@ static void CalcGunMuzzlePosition(Creature* c,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}//end if
|
||||
if (weapon_lv > 0 && weapon_lv < weapon_meta->_gun_muzzle_positions.size() + 1) {
|
||||
auto pos = weapon_meta->_gun_muzzle_positions.at(weapon_lv - 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user