添加reload速度
This commit is contained in:
parent
188aa06e5f
commit
b779b32f20
@ -93,6 +93,8 @@ float Human::GetSpeed()
|
||||
}
|
||||
} else if (aiming) {
|
||||
return std::max(1, meta->i->aiming_speed());
|
||||
} else if (action_type != AT_None) {
|
||||
return std::max(1, meta->i->reload_speed());
|
||||
}
|
||||
float speed = meta->i->move_speed();
|
||||
speed = (speed + buff_attr_abs_[kHAT_Speed]) * (1 + buff_attr_rate_[kHAT_Speed]);
|
||||
@ -2119,6 +2121,24 @@ void Human::DeadDrop()
|
||||
room->DropItem(drop_pos, weapon.weapon_id, 1, weapon.weapon_lv);
|
||||
}
|
||||
}
|
||||
{
|
||||
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
|
||||
if (old_skin && old_skin->skin_id != 0) {
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
|
||||
*old_skin = Skin();
|
||||
}
|
||||
}
|
||||
{
|
||||
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
|
||||
if (old_skin && old_skin->skin_id != 0) {
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
|
||||
*old_skin = Skin();
|
||||
}
|
||||
}
|
||||
for (size_t slot = 0; slot < inventory_.size(); ++slot) {
|
||||
if (inventory_[slot] > 0) {
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquipBySlotId(slot);
|
||||
@ -2132,22 +2152,6 @@ void Human::DeadDrop()
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
Skin* old_skin = GetSkinByIdx(kSkinSlot_HAT);
|
||||
if (old_skin && old_skin->skin_id != 0) {
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
|
||||
}
|
||||
}
|
||||
{
|
||||
Skin* old_skin = GetSkinByIdx(kSkinSlot_CLOTH);
|
||||
if (old_skin && old_skin->skin_id != 0) {
|
||||
a8::Vec2 dir = a8::Vec2::UP;
|
||||
dir.Rotate(a8::RandAngle());
|
||||
room->CreateLoot(old_skin->skin_id, GetPos() + dir * (40 + rand() % 50), 1, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SendBattleReport()
|
||||
@ -2480,13 +2484,13 @@ void Human::RandSkin()
|
||||
for (int i = 0; i < kSkinNum; ++i) {
|
||||
int rand_idx = rand() % ids.size();
|
||||
int skin_id = ids[rand_idx];
|
||||
if (skin_id == 2) {
|
||||
if (i == 1) {
|
||||
skin_id = 13001 + (rand() % 6);
|
||||
} else if (skin_id == 3) {
|
||||
} else if (i == 2) {
|
||||
skin_id = 15001 + (rand() % 6);
|
||||
}
|
||||
Skin& skin = skins[i];
|
||||
skin.skin_id = ids[rand_idx];
|
||||
skin.skin_id = skin_id;
|
||||
skin.skin_lv = 1;
|
||||
ids.erase(ids.begin() + rand_idx);
|
||||
}
|
||||
|
@ -112,6 +112,7 @@ message Player
|
||||
optional int32 shot_speed = 7;
|
||||
optional int32 aiming_speed = 8;
|
||||
optional int32 move_speed4 = 10; //移动速度4
|
||||
optional int32 reload_speed = 9;
|
||||
optional float def = 11; //防御
|
||||
optional string volume = 12; //初始库存
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user