1
This commit is contained in:
parent
b0d3bd8feb
commit
07ee948c2a
@ -1752,6 +1752,9 @@ void Creature::AutoLoadingBullet(bool manual)
|
|||||||
}
|
}
|
||||||
int duration_time = p_weapon->GetAttrValue(kHAT_ReloadTime) *
|
int duration_time = p_weapon->GetAttrValue(kHAT_ReloadTime) *
|
||||||
(1 + GetAbility()->GetAttrRate(kHAT_WeaponReloadTime));
|
(1 + GetAbility()->GetAttrRate(kHAT_WeaponReloadTime));
|
||||||
|
#if 0
|
||||||
|
duration_time = 1000 * 5;
|
||||||
|
#endif
|
||||||
StartAction(AT_Reload,
|
StartAction(AT_Reload,
|
||||||
duration_time,
|
duration_time,
|
||||||
p_weapon->weapon_id,
|
p_weapon->weapon_id,
|
||||||
@ -2047,16 +2050,6 @@ void Creature::SetCurrWeapon(Weapon* weapon)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (curr_weapon_ != weapon) {
|
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);
|
GetTrigger()->TakeonWeapon(curr_weapon_, weapon);
|
||||||
}
|
}
|
||||||
curr_weapon_ = weapon;
|
curr_weapon_ = weapon;
|
||||||
|
@ -1260,6 +1260,7 @@ void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
|||||||
player_data->set_action_item_id(action_item_id);
|
player_data->set_action_item_id(action_item_id);
|
||||||
player_data->set_action_duration(duration);
|
player_data->set_action_duration(duration);
|
||||||
player_data->set_action_target_id(action_target_id);
|
player_data->set_action_target_id(action_target_id);
|
||||||
|
player_data->set_action_frameno(action_frameno);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 1
|
#if 1
|
||||||
|
@ -536,6 +536,11 @@ message MFActivePlayerData
|
|||||||
optional int32 action_duration = 5; //持续时间毫秒
|
optional int32 action_duration = 5; //持续时间毫秒
|
||||||
optional int32 action_item_id = 6;
|
optional int32 action_item_id = 6;
|
||||||
optional int32 action_target_id = 7;
|
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:数量
|
repeated MFPair items = 8; //存放玩家身上携带的装备信息(目前只存伪装) key:道具id value:数量
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user