remove newbie room
This commit is contained in:
parent
299414d478
commit
a21febfc5a
@ -698,9 +698,6 @@ bool Bullet::IsPreBattleBullet()
|
||||
if (room->IsPveRoom()) {
|
||||
return false;
|
||||
}
|
||||
if (room->IsNewBieRoom()) {
|
||||
return false;
|
||||
}
|
||||
return create_frameno_ <= room->GetBattleStartFrameNo() || room->GetBattleStartFrameNo() == 0;
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,6 @@ bool Collision::CheckBullet(IBullet* bullet, Creature* c)
|
||||
bullet_real_pos = bullet->GetPos().ToGlmVec3();
|
||||
}
|
||||
float bullet_hit_radius = bullet->GetHitRadius();
|
||||
if (c->room->IsNewBieRoom()) {
|
||||
bullet_hit_radius += 3;
|
||||
}
|
||||
bool ret = a8::IntersectCylinderCylinder
|
||||
(
|
||||
bullet_real_pos, bullet_hit_radius * 1.0, GUN_HEIGHT,
|
||||
|
@ -1355,10 +1355,6 @@ void Creature::UpdatePoisoning()
|
||||
poisoning_time = 0;
|
||||
return;
|
||||
}
|
||||
if (room->IsNewBieRoom()) {
|
||||
poisoning_time = 0;
|
||||
return;
|
||||
}
|
||||
#ifdef MYDEBUG
|
||||
if (room->debug_params.find(120) != room->debug_params.end()) {
|
||||
poisoning_time = 0;
|
||||
@ -2581,9 +2577,6 @@ void Creature::UpdateMove()
|
||||
GlmHelper::Normalize(dir);
|
||||
SetMoveDir(dir);
|
||||
}
|
||||
} else if (room->IsNewBieRoom() && IsNearGas(20)) {
|
||||
GetMutablePos() = old_pos;
|
||||
GetMovement()->ClearPath();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -133,11 +133,7 @@ void Hero::Update(int delta_time)
|
||||
}
|
||||
shot_hold = false;
|
||||
CheckShotHold();
|
||||
if (room->IsNewBieRoom()) {
|
||||
|
||||
} else {
|
||||
agent_->Exec();
|
||||
}
|
||||
agent_->Exec();
|
||||
}
|
||||
|
||||
void Hero::OnExplosionHit(Explosion* e)
|
||||
@ -339,7 +335,7 @@ void Hero::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
if (meta->HasDrop() && !room->IsPveRoom()) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), meta->RandDrop());
|
||||
}
|
||||
if (!room->IsPveRoom() && !room->IsNewBieRoom()) {
|
||||
if (!room->IsPveRoom()) {
|
||||
for (int id : meta->_drop_list) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), id);
|
||||
}
|
||||
@ -399,12 +395,9 @@ void Hero::OnRemoveFromTargetPartObject(Entity* target)
|
||||
|
||||
void Hero::InitAI()
|
||||
{
|
||||
if (room->IsNewBieRoom()) {
|
||||
} else {
|
||||
agent_->SetOwner(this);
|
||||
f8::BtMgr::Instance()->BtLoad(agent_, meta->new_bt().c_str());
|
||||
f8::BtMgr::Instance()->BtSetCurrent(agent_, meta->new_bt().c_str());
|
||||
}
|
||||
agent_->SetOwner(this);
|
||||
f8::BtMgr::Instance()->BtLoad(agent_, meta->new_bt().c_str());
|
||||
f8::BtMgr::Instance()->BtSetCurrent(agent_, meta->new_bt().c_str());
|
||||
}
|
||||
|
||||
void Hero::OnBattleStart(Room* room)
|
||||
|
@ -1346,7 +1346,7 @@ void Human::DeadDrop()
|
||||
}
|
||||
{
|
||||
if (!room->IsGameOver() && IsAndroid()) {
|
||||
if (!room->IsPveRoom() && !room->IsNewBieRoom()) {
|
||||
if (!room->IsPveRoom()) {
|
||||
for (int id : meta->_drop_list) {
|
||||
room->ScatterDrop(GetPos().ToGlmVec3(), id);
|
||||
}
|
||||
|
@ -279,7 +279,6 @@ class Human : public Creature
|
||||
void ProcThrowDmg(int throw_uniid);
|
||||
void CalcStats();
|
||||
void ShiledBreak();
|
||||
void SendNewBieEnd();
|
||||
void LootInteraction(Loot* entity);
|
||||
void ObstacleInteraction(Obstacle* entity);
|
||||
void SendMobaTeamNotify();
|
||||
|
@ -43,7 +43,6 @@ namespace mt
|
||||
s_.pickup_weapon_replace_type = GetIntParam("pickup_weapon_replace_type", 0);
|
||||
s_.sand_table_move_speed = GetIntParam("sand_table_move_speed", 500);
|
||||
s_.wait_cloud_time = GetIntParam("wait_cloud_time", 10);
|
||||
s_.newbie_room_battle_times = GetIntParam("newbie_room_battle_times", 0);
|
||||
s_.mid_room_max_rank = GetIntParam("mid_room_max_rank", 0);
|
||||
s_.new_room_max_level = GetIntParam("new_room_max_level", 5);
|
||||
s_.mid_room_max_level = GetIntParam("mid_room_max_level", 10);
|
||||
@ -72,20 +71,6 @@ namespace mt
|
||||
s_.moba_kill_times = GetIntParam("moba_kill_times", 1);
|
||||
#endif
|
||||
#if 1
|
||||
{
|
||||
std::string point = GetStringParam("newbie_room_born_point", "3471.3662:6.8399:5268.6240");
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(point, strings, ':');
|
||||
if (strings.size() != 3) {
|
||||
abort();
|
||||
}
|
||||
s_.newbie_room_born_point = glm::vec3
|
||||
(
|
||||
(float)a8::XValue(strings[0]).GetDouble(),
|
||||
(float)a8::XValue(strings[1]).GetDouble(),
|
||||
(float)a8::XValue(strings[2]).GetDouble()
|
||||
);
|
||||
}
|
||||
{
|
||||
std::string tmp_str = GetStringParam("crit_effect_range", "");
|
||||
std::vector<std::string> strings;
|
||||
@ -102,21 +87,6 @@ namespace mt
|
||||
s_.block_effect_range.push_back(a8::XValue(str).GetDouble());
|
||||
}
|
||||
}
|
||||
s_.newbie_room_hp_rate = a8::XValue(GetStringParam("newbie_room_hp_rate", "0.8")).GetDouble();
|
||||
s_.newbie_room_hero_id = a8::XValue(GetStringParam("newbie_room_hero_id", ""));
|
||||
s_.newbie_room_weapon_id = a8::XValue(GetStringParam("newbie_room_weapon_id", ""));
|
||||
{
|
||||
std::string point = GetStringParam("newbie_room_skills", "");
|
||||
std::vector<std::string> strings;
|
||||
a8::Split(point, strings, '|');
|
||||
for (auto& str : strings) {
|
||||
s_.newbie_room_skills.push_back(a8::XValue(str));
|
||||
}
|
||||
}
|
||||
{
|
||||
const mt::SafeArea* p = mt::SafeArea::GetById(GetIntParam("newbie_room_area"));
|
||||
s_.newbie_room_area.push_back(p);
|
||||
}
|
||||
s_.nature_recover_hp_idletime = a8::XValue(GetStringParam("nature_recover_hp_idletime", "3"));
|
||||
s_.nature_recover_hp_interval = a8::XValue(GetStringParam("nature_recover_hp_interval1", "1"));
|
||||
s_.nature_recover_hp_rate = a8::XValue(GetStringParam("nature_recover_hp_rate", "0.1")).GetDouble();
|
||||
|
@ -31,12 +31,6 @@ namespace mt
|
||||
float max_oil = 0.0f;
|
||||
float max_mount_horse_distance = 100.0f;
|
||||
int early_parachute_jump = 0;
|
||||
glm::vec3 newbie_room_born_point = glm::vec3(0.0f, 0.0f, 0.0f);
|
||||
float newbie_room_hp_rate = 0.0f;
|
||||
int newbie_room_hero_id = 0;
|
||||
int newbie_room_weapon_id = 0;
|
||||
std::vector<int> newbie_room_skills;
|
||||
std::vector<const mt::SafeArea*> newbie_room_area;
|
||||
int pickup_weapon_replace_type = 0;
|
||||
|
||||
int downed_relive_recover_hp = 0;
|
||||
@ -124,7 +118,6 @@ namespace mt
|
||||
|
||||
int pre_client_shot = 0;
|
||||
|
||||
int newbie_room_battle_times = 0;
|
||||
int mid_room_max_rank = 0;
|
||||
int new_room_max_level = 5;
|
||||
int mid_room_max_level = 10;
|
||||
@ -137,10 +130,6 @@ namespace mt
|
||||
int revive_count = 1;
|
||||
int pvp_revive_time = 10;
|
||||
|
||||
float newbie_andrid_hp_rate = 1;
|
||||
float newbie_andrid_atk_rate = 1;
|
||||
float newbie_andrid_def_rate = 1;
|
||||
|
||||
int moba_kill_times = 12;
|
||||
int moba_revive_time = 2;
|
||||
int moba_room_time = 60 * 3;
|
||||
|
@ -1245,24 +1245,6 @@ void Human::FillSMGameOver(cs::SMGameOver& msg)
|
||||
}
|
||||
}
|
||||
|
||||
void Human::SendNewBieEnd()
|
||||
{
|
||||
if (room->IsNewBieRoom()) {
|
||||
cs::SMNewBieEnd msg;
|
||||
GetTeam()->TraverseMembers
|
||||
(
|
||||
[this, &msg] (Human* hum)
|
||||
{
|
||||
auto p = msg.add_victory_team();
|
||||
cs::MFObjectFull full_msg;
|
||||
hum->FillMFObjectFull(this->room, this, &full_msg);
|
||||
*p = full_msg.union_obj_1();
|
||||
return true;
|
||||
});
|
||||
SendNotifyMsg(msg);
|
||||
}
|
||||
}
|
||||
|
||||
void Human::FillMFActivePlayerData(cs::MFActivePlayerData* player_data)
|
||||
{
|
||||
#ifdef MYDEBUG1
|
||||
@ -1663,9 +1645,6 @@ void Human::SendUpdateMsg()
|
||||
|
||||
void Human::SendGameOver()
|
||||
{
|
||||
if (room->IsNewBieRoom()) {
|
||||
return;
|
||||
}
|
||||
if (stats->abandon_battle == 1 || (GetTeam()->HasPlayer()) || GetTeam()->MemberHasOb()) {
|
||||
if (GetTeam()->already_report_battle) {
|
||||
cs::SMGameOver msg;
|
||||
|
@ -877,11 +877,7 @@ void Player::HumanInteraction(Human* hum)
|
||||
void Player::ProcSkillList()
|
||||
{
|
||||
std::vector<int> skill_list;
|
||||
if (room->IsNewBieRoom()) {
|
||||
skill_list = mt::Param::s().newbie_room_skills;
|
||||
} else {
|
||||
GetNetData()->GetSkillList(skill_list);
|
||||
}
|
||||
GetNetData()->GetSkillList(skill_list);
|
||||
for (auto& skill_id : skill_list) {
|
||||
AddSkill(skill_id);
|
||||
}
|
||||
|
@ -93,9 +93,7 @@ void Room::InitData(RoomInitInfo& init_info)
|
||||
creator_register_time_ = init_info.creator_register_time;
|
||||
creator_proto_version_ = init_info.creator_proto_version;
|
||||
creator_channel_ = init_info.creator_channel;
|
||||
force_entry_newbie_room_ = init_info.force_entry_newbie_room;
|
||||
pve_human_num = init_info.pve_human_num;
|
||||
is_newbie_room_ = init_info.is_newbie_room;
|
||||
|
||||
map_tpl_name_ = init_info.map_tpl_name;
|
||||
grid_service = init_info.grid_service;
|
||||
@ -447,9 +445,6 @@ int Room::AllocUniid()
|
||||
|
||||
void Room::ShuaAndroid()
|
||||
{
|
||||
if (IsNewBieRoom()) {
|
||||
return;
|
||||
}
|
||||
if (IsCustomBattle()) {
|
||||
return;
|
||||
}
|
||||
@ -542,7 +537,7 @@ void Room::FillSMJoinedNotify(Human* self_hum, cs::SMJoinedNotify& msg)
|
||||
{
|
||||
msg.set_team_mode(msg.team_mode());
|
||||
msg.set_adjust_bullet(1);
|
||||
msg.set_is_newbie_room(IsNewBieRoom() ? 1 : 0);
|
||||
msg.set_is_newbie_room(0);
|
||||
}
|
||||
|
||||
void Room::ScatterDrop(const glm::vec3& center, int drop_id, bool no_adjust)
|
||||
@ -1021,7 +1016,7 @@ Human* Room::GetWatchWarTarget(Human* hum)
|
||||
|
||||
bool Room::BattleStarted()
|
||||
{
|
||||
return battle_start_frameno_ != 0 || IsPveRoom() || IsNewBieRoom();
|
||||
return battle_start_frameno_ != 0 || IsPveRoom();
|
||||
}
|
||||
|
||||
int Room::GetAliveTeamNum()
|
||||
@ -1087,18 +1082,12 @@ bool Room::CanJoin(const std::string& accountid,
|
||||
if (lock_room_) {
|
||||
return false;
|
||||
}
|
||||
if (IsNewBieRoom()) {
|
||||
return false;
|
||||
}
|
||||
if (IsCustomBattle()) {
|
||||
return false;
|
||||
}
|
||||
if (IsMobaModeRoom()) {
|
||||
return false;
|
||||
}
|
||||
if (msg.force_enter_newbie_room()) {
|
||||
return false;
|
||||
}
|
||||
if (room_mode_ != self_room_mode) {
|
||||
return false;
|
||||
}
|
||||
@ -1339,7 +1328,7 @@ void Room::UpdateGas()
|
||||
}
|
||||
if (GetGasData().GetGasMode() != GasInactive && GetGasData().GetGasMode() != GasJump) {
|
||||
if (GetGasData().GetGasMode() != GasInactive) {
|
||||
if (IsNewBieRoom()) {
|
||||
if (false) {
|
||||
} else if (IsPveRoom()) {
|
||||
if (!IsGameOver() &&
|
||||
(
|
||||
@ -1403,9 +1392,7 @@ void Room::UpdateGas()
|
||||
|
||||
void Room::UpdateGasInactive()
|
||||
{
|
||||
if (IsNewBieRoom()) {
|
||||
UpdateGasInactiveNewBie();
|
||||
} else if (IsPveRoom()) {
|
||||
if (IsPveRoom()) {
|
||||
UpdateGasInactivePve();
|
||||
} else if (IsMobaModeRoom()) {
|
||||
UpdateGasInactiveMoba();
|
||||
@ -1559,31 +1546,6 @@ void Room::UpdateGasInactivePve()
|
||||
}
|
||||
}
|
||||
|
||||
void Room::UpdateGasInactiveNewBie()
|
||||
{
|
||||
{
|
||||
auto first_safearea = mt::Param::s().newbie_room_area.at(0);
|
||||
gas_data_.SetGasMode(GasWaiting);
|
||||
gas_data_.gas_start_frameno = GetFrameNo();
|
||||
battle_start_frameno_ = GetFrameNo();
|
||||
gas_data_.old_area_meta = first_safearea;
|
||||
gas_data_.new_area_meta = mt::Param::s().newbie_room_area.at(0);
|
||||
gas_data_.gas_start_frameno = GetFrameNo();
|
||||
gas_data_.pos_new = glm::vec2(gas_data_.new_area_meta->x1(),
|
||||
gas_data_.new_area_meta->y1());
|
||||
gas_data_.pos_old = gas_data_.pos_new;
|
||||
gas_data_.pos_old_bk = gas_data_.pos_old;
|
||||
gas_data_.rad_old = gas_data_.old_area_meta->rad();
|
||||
gas_data_.rad_new = gas_data_.new_area_meta->rad();
|
||||
gas_data_.gas_progress = 0;
|
||||
}
|
||||
NotifyUiUpdate();
|
||||
ClearPostBattleAutoFreeList();
|
||||
OnBattleStart();
|
||||
NotifyGameStart();
|
||||
InitAndroidAI();
|
||||
}
|
||||
|
||||
void Room::UpdateGasInactiveMoba()
|
||||
{
|
||||
if (GetFrameNo() - gas_data_.gas_start_frameno >=
|
||||
@ -1668,7 +1630,7 @@ void Room::UpdateGasInactiveMoba()
|
||||
|
||||
void Room::UpdateGasWaiting()
|
||||
{
|
||||
if (IsPveRoom() || IsNewBieRoom() || IsMobaModeRoom()) {
|
||||
if (IsPveRoom() || IsMobaModeRoom()) {
|
||||
|
||||
} else {
|
||||
if (GetFrameNo() - gas_data_.gas_start_frameno >=
|
||||
@ -2732,10 +2694,6 @@ std::shared_ptr<BornPoint> Room::ForceTakeBornPoint(Human* hum, std::shared_ptr<
|
||||
return reserve_born_point;
|
||||
}
|
||||
|
||||
void Room::NewBieRoomStart()
|
||||
{
|
||||
}
|
||||
|
||||
Human* Room::GetOneCanEnableAndroid()
|
||||
{
|
||||
std::vector<Human*> humans;
|
||||
@ -2872,9 +2830,6 @@ size_t Room::GetRoomMaxPlayerNum()
|
||||
if (pve_instance) {
|
||||
return pve_human_num;
|
||||
}
|
||||
if (IsNewBieRoom()) {
|
||||
return 1;
|
||||
}
|
||||
if (custom_battle_) {
|
||||
return custom_battle_->GetMemberNum();
|
||||
}
|
||||
@ -3149,15 +3104,6 @@ int Room::GetPolyExtFlag(int poly_idx)
|
||||
|
||||
void Room::CreateWorldObjects()
|
||||
{
|
||||
if (IsNewBieRoom()) {
|
||||
int uniid = AllocUniid();
|
||||
std::shared_ptr<BornPoint> born_point = std::make_shared<BornPoint>();
|
||||
std::shared_ptr<mt::WorldObject> wo_meta = std::make_shared<mt::WorldObject>();
|
||||
wo_meta->pos = mt::Param::s().newbie_room_born_point;
|
||||
born_point->wo_meta = wo_meta;
|
||||
born_point_hash_[uniid] = born_point;
|
||||
return;
|
||||
}
|
||||
if (IsPveRoom()) {
|
||||
int uniid = AllocUniid();
|
||||
std::shared_ptr<BornPoint> born_point = std::make_shared<BornPoint>();
|
||||
@ -3479,11 +3425,6 @@ void Room::ForceOver()
|
||||
&xtimer_attacher_);
|
||||
}
|
||||
|
||||
bool Room::IsNewBieRoom()
|
||||
{
|
||||
return is_newbie_room_;
|
||||
}
|
||||
|
||||
bool Room::SupportSandTable()
|
||||
{
|
||||
return PBUtils::SupportSandTable(creator_proto_version_);
|
||||
@ -3499,7 +3440,6 @@ void Room::OnAddHuman(Human* hum)
|
||||
bool Room::IsSandTableRoom()
|
||||
{
|
||||
return !IsPveRoom() &&
|
||||
!IsNewBieRoom() &&
|
||||
SupportSandTable();
|
||||
}
|
||||
|
||||
|
@ -121,7 +121,6 @@ public:
|
||||
bool IsPveRoom();
|
||||
bool IsDestoryRoom();
|
||||
bool IsSurvivalRoom();
|
||||
bool IsNewBieRoom();
|
||||
bool IsPvpRankModeRoom() { return GetRoomMode() == kPvpRankMode; }
|
||||
bool IsPvpMasterRankModeRoom();
|
||||
bool IsMobaModeRoom() { return GetRoomMode() == kMobaMode; }
|
||||
@ -293,7 +292,6 @@ private:
|
||||
void UpdateGasInactive();
|
||||
void UpdateGasInactivePvp();
|
||||
void UpdateGasInactivePve();
|
||||
void UpdateGasInactiveNewBie();
|
||||
void UpdateGasInactiveMoba();
|
||||
void UpdateGasWaiting();
|
||||
void UpdateGasMoving();
|
||||
@ -335,7 +333,6 @@ private:
|
||||
void AddPlayerPostProc(Player* hum);
|
||||
void ForceSetBornPoint(Human* hum, std::shared_ptr<BornPoint> born_point);
|
||||
std::shared_ptr<BornPoint> ForceTakeBornPoint(Human* hum, std::shared_ptr<BornPoint> reserve_born_point);
|
||||
void NewBieRoomStart();
|
||||
bool CanAddToScene(Human* hum);
|
||||
void SyncFrameData();
|
||||
void InitAndroidAI();
|
||||
@ -383,8 +380,6 @@ private:
|
||||
int creator_register_time_ = 0;
|
||||
int creator_proto_version_ = 0;
|
||||
int creator_channel_ = 0;
|
||||
bool force_entry_newbie_room_ = false;
|
||||
bool is_newbie_room_ = false;
|
||||
a8::XTimerWp battle_report_timer_;
|
||||
|
||||
int current_teamid_ = 0;
|
||||
|
@ -125,10 +125,6 @@ void RoomMgr::_CMJoin(f8::MsgHdr* hdr, const cs::CMJoin& msg)
|
||||
});
|
||||
#endif
|
||||
}
|
||||
if (msg.force_enter_newbie_room()) {
|
||||
//EnterNewBie(hdr, msg);
|
||||
return;
|
||||
}
|
||||
const mt::Map* map_meta = mt::Map::GetById(msg.mapid());
|
||||
if (!map_meta || !map_meta->IsOpen()) {
|
||||
JoinErrorHandle(msg, 3, hdr->socket_handle);
|
||||
@ -530,7 +526,6 @@ std::shared_ptr<Room> RoomMgr::CreateRoom(const cs::CMJoin& msg,
|
||||
init_info.creator_channel = creator_channel;
|
||||
init_info.pve_instance_id = msg.pve_instance_id();
|
||||
init_info.pve_human_num = std::max(1, msg.team_members_size());
|
||||
init_info.is_newbie_room = msg.force_enter_newbie_room() ? true : false;
|
||||
init_info.custom_battle = custom_battle;
|
||||
if (GetRoomByUuid(init_info.room_uuid)) {
|
||||
A8_ABORT();
|
||||
@ -792,7 +787,6 @@ void RoomMgr::SetMatchMode(int mode)
|
||||
|
||||
void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
|
||||
{
|
||||
msg->set_force_enter_newbie_room(false);
|
||||
msg->set_pve_instance_id(0);
|
||||
#if 1
|
||||
const mt::Map* map_meta = mt::Map::GetById(msg->mapid());
|
||||
|
@ -35,11 +35,9 @@ struct RoomInitInfo
|
||||
int creator_register_time = 0;
|
||||
int creator_proto_version = 0;
|
||||
int creator_channel = 0;
|
||||
bool force_entry_newbie_room = false;
|
||||
int init_map_id = 0;
|
||||
int pve_instance_id = 0;
|
||||
int pve_human_num = 0;
|
||||
bool is_newbie_room = false;
|
||||
|
||||
const mt::Map* map_meta = nullptr;
|
||||
std::string map_tpl_name;
|
||||
|
@ -7,9 +7,6 @@
|
||||
|
||||
SandTable::SandTable(Room* room): room_(room)
|
||||
{
|
||||
if (room_->IsNewBieRoom()) {
|
||||
return;
|
||||
}
|
||||
room->OpenRoomSwitch(kRoomSwitchDisableUseSkill);
|
||||
room->OpenRoomSwitch(kRoomSwitchDisableUseItem);
|
||||
room->OpenRoomSwitch(kRoomSwitchDisableShot);
|
||||
@ -35,9 +32,6 @@ SandTable::SandTable(Room* room): room_(room)
|
||||
|
||||
void SandTable::OnGameStart()
|
||||
{
|
||||
if (room_->IsNewBieRoom()) {
|
||||
return;
|
||||
}
|
||||
room_->OpenRoomSwitch(kRoomSwitchDisableMove);
|
||||
room_->OpenRoomSwitch(kRoomSwitchDisableUseSkill);
|
||||
room_->OpenRoomSwitch(kRoomSwitchDisableUseItem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user