merge dev

This commit is contained in:
aozhiwei 2021-04-27 11:27:56 +08:00
commit 9969d2c9fc
5 changed files with 7 additions and 2 deletions

View File

@ -1449,7 +1449,7 @@ Weapon* Creature::ChooseNextWeapon(int curr_weapon_slot_id, int begin_slot_id, i
abort();
}
Weapon* next_weapon = nullptr;
for (int i = 1; i <= (end_slot_id - begin_slot_id); ++i) {
for (int i = 1; i <= (end_slot_id - begin_slot_id + 1); ++i) {
int slot_id = begin_slot_id +
(i + curr_weapon_slot_id - begin_slot_id) % (end_slot_id - begin_slot_id + 1);
int idx = -1;

View File

@ -39,7 +39,7 @@ bool IsValidSlotId(int slot_id)
bool IsValidBuffEffect(int buff_effect)
{
return buff_effect > kBET_Begin && buff_effect < kBET_End;
return buff_effect > kBET_Begin && buff_effect < (kBET_End + 10);
}
bool IsValidHumanAttr(int attr_type)

View File

@ -119,6 +119,7 @@ void Human::FillMFObjectPart(Room* room, Human* hum, cs::MFObjectPart* part_data
part_data->set_object_type(ET_Player);
cs::MFPlayerPart* p = part_data->mutable_union_obj_1();
p->set_obj_uniid(GetEntityUniId());
p->set_speed(GetSpeed() * SERVER_FRAME_RATE);
TypeConvert::ToPb(GetPos(), p->mutable_pos());
TypeConvert::ToPb(attack_dir, p->mutable_dir());
}
@ -162,6 +163,7 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data
p->set_disconnected(disconnected);
p->set_anim_type(anim_type);
p->set_anim_seq(anim_seq);
p->set_speed(GetSpeed() * SERVER_FRAME_RATE);
for (auto itr : skins) {
auto skin = p->add_skin();
itr.ToPB(skin);

View File

@ -354,6 +354,7 @@ private:
Entity* last_collision_door_ = nullptr;
long long jump_frameno_ = 0;
float old_sync_speed = 0;
friend class FrameMaker;
friend class FrameEvent;

View File

@ -191,6 +191,7 @@ message MFPlayerPart
optional int32 obj_uniid = 1; //id
optional MFVec2 pos = 2; //
optional MFVec2 dir = 3; //
optional float speed = 4; //
}
//-
@ -241,6 +242,7 @@ message MFPlayerFull
//
optional int32 charid = 44; //id
optional float speed = 45; //
optional string user_data = 60 [default = ""]; //
}