diff --git a/server/gameserver/framemaker.cc b/server/gameserver/framemaker.cc index 3d4962e..d1ab9c7 100644 --- a/server/gameserver/framemaker.cc +++ b/server/gameserver/framemaker.cc @@ -231,7 +231,7 @@ cs::SMUpdate* FrameMaker::MakeUpdateMsg(const Human* hum) auto p = msg->add_chged_property_list(); p->set_obj_id(hum->GetEntityUniId()); p->set_property_type(kPropZombieId); - p->set_value(hum->zombieid_); + p->set_value(hum->charid_); } } } diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index 118141d..5127262 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -196,10 +196,12 @@ void Human::FillMFObjectFull(Room* room, Human* hum, cs::MFObjectFull* full_data } } if (room->GetRoomMode() == kZombieMode) { + #if 0 p->set_level(level_); p->set_exp(exp_); p->set_race(race_); - p->set_zombieid(zombieid_); + #endif + p->set_charid(charid_); } } diff --git a/server/gameserver/human.h b/server/gameserver/human.h index 121bd61..b4f7a8f 100644 --- a/server/gameserver/human.h +++ b/server/gameserver/human.h @@ -320,7 +320,7 @@ private: protected: int level_ = 0; int exp_ = 0; - int zombieid_ = 0; + int charid_ = 0; long long last_shot_frameno_ = 0; long long last_use_skill_frameno_ = 0; long long hide_frameno_ = 0; diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 424ee04..bbe23e3 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -1565,6 +1565,9 @@ void Room::NotifyWxVoip() void Room::BattleReport() { + for (auto& pair : accountid_hash_) { + pair.second->SendGameOver(); + } game_over_ = true; game_over_frameno_ = frameno_; RoomMgr::Instance()->AddOverRoom(room_uuid_); @@ -1783,6 +1786,22 @@ void Room::SecondRandPoint() a8::SetBitFlag(tmp_humans[i]->status, HS_LastAndroid); } } +#ifdef DEBUG + if (GetRoomMode() == kZombieMode) { + BornPoint* born_point = nullptr; + for (auto& pair : human_hash_) { + if (!born_point) { + born_point = pair.second->born_point; + } else { + pair.second->born_point = born_point; + pair.second->SetPos(pair.second->born_point->RandPoint()); + pair.second->FindLocation(); + pair.second->RefreshView(); + grid_service->MoveHuman(pair.second); + } + } + } +#endif } void Room::NotifyGameStart() diff --git a/server/tools/protobuild/cs_proto.proto b/server/tools/protobuild/cs_proto.proto index b405d03..6383802 100755 --- a/server/tools/protobuild/cs_proto.proto +++ b/server/tools/protobuild/cs_proto.proto @@ -124,8 +124,8 @@ message MFVec2 valule: 当前经验 property_type: 22 阵营 valule: 当前阵营 - property_type: 23 zombieid - valule: zombieid + property_type: 23 charid + valule: charid */ message MFPropertyChg { @@ -225,10 +225,7 @@ message MFPlayerFull optional int32 killer_id = 33; //杀手id(自杀时为自己) 特殊id: -1:倒在安全区 //一下字段只有僵尸模式才有效 - optional int32 level = 41; //等级 - optional int32 exp = 42; //经验 - optional int32 race = 43; //1:人 2:僵尸 - optional int32 zombieid = 44; //僵尸id + optional int32 charid = 44; //人物id } //阻挡物-部分