merge dev
This commit is contained in:
commit
9969d2c9fc
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 = ""]; //用户自定义数据
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user