This commit is contained in:
aozhiwei 2023-04-20 11:59:49 +08:00
parent f54b69354d
commit 1034e78b25
4 changed files with 36 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#include "precompile.h"
#include "mt/Param.h"
#include "mt/SafeArea.h"
IMPL_TABLE(mt::Param)
mt::Param::S mt::Param::s_;
@ -64,6 +65,10 @@ namespace mt
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);
}
#endif
#ifdef DEBUG
s_.match_team_time = 6;

View File

@ -24,6 +24,7 @@ namespace mt
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 downed_relive_recover_hp = 0;

View File

@ -1214,7 +1214,9 @@ void Room::UpdateGas()
void Room::UpdateGasInactive()
{
if (IsPveRoom()) {
if (IsNewBieRoom()) {
UpdateGasInactiveNewBie();
} else if (IsPveRoom()) {
UpdateGasInactivePve();
} else {
UpdateGasInactivePvp();
@ -1307,9 +1309,34 @@ 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::UpdateGasWaiting()
{
if (IsPveRoom()) {
if (IsPveRoom() || IsNewBieRoom()) {
} else {
if (GetFrameNo() - gas_data_.gas_start_frameno >=

View File

@ -246,6 +246,7 @@ private:
void UpdateGasInactive();
void UpdateGasInactivePvp();
void UpdateGasInactivePve();
void UpdateGasInactiveNewBie();
void UpdateGasWaiting();
void UpdateGasMoving();
void UpdateGasJump();