diff --git a/server/gameserver/creature.cc b/server/gameserver/creature.cc index d1a92ce..8a184eb 100644 --- a/server/gameserver/creature.cc +++ b/server/gameserver/creature.cc @@ -1752,6 +1752,9 @@ void Creature::AutoLoadingBullet(bool manual) } int duration_time = p_weapon->GetAttrValue(kHAT_ReloadTime) * (1 + GetAbility()->GetAttrRate(kHAT_WeaponReloadTime)); + #if 0 + duration_time = 1000 * 5; + #endif StartAction(AT_Reload, duration_time, p_weapon->weapon_id, @@ -2047,16 +2050,6 @@ void Creature::SetCurrWeapon(Weapon* weapon) } #endif if (curr_weapon_ != weapon) { - if (GetActionType() == AT_Reload) { - CancelAction(); - if (weapon->weapon_idx != 0 && - weapon->ammo <= 0) { - if (weapon->weapon_idx == GUN_SLOT1 || - weapon->weapon_idx == GUN_SLOT2) { - AutoLoadingBullet(); - } - } - } GetTrigger()->TakeonWeapon(curr_weapon_, weapon); } curr_weapon_ = weapon; diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index db6fbf1..d744f54 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -1260,6 +1260,7 @@ void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data) player_data->set_action_item_id(action_item_id); player_data->set_action_duration(duration); player_data->set_action_target_id(action_target_id); + player_data->set_action_frameno(action_frameno); } } #if 1 diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index cf5a591..05f57d7 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -536,6 +536,11 @@ message MFActivePlayerData optional int32 action_duration = 5; //持续时间毫秒 optional int32 action_item_id = 6; optional int32 action_target_id = 7; + /* + action触发的帧号,当服务器下发的action_type和客户端本地的action_type相同时 + action_frameno不同也要播放对应的动画,视为同一种action_type的不同触发 + */ + optional int32 action_frameno = 1; repeated MFPair items = 8; //存放玩家身上携带的装备信息(目前只存伪装) key:道具id value:数量