1
This commit is contained in:
parent
b65c03e715
commit
47e52d9eae
@ -2105,7 +2105,7 @@ void Creature::SummonHero(Buff* buff,
|
|||||||
hero = InternalSummonHero(hero_meta,
|
hero = InternalSummonHero(hero_meta,
|
||||||
GetAttackDir(),
|
GetAttackDir(),
|
||||||
GetPos(),
|
GetPos(),
|
||||||
through_wall);
|
through_wall);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
SendDebugMsg(a8::Format("second summon hero id:%d pos:%f,%f rad:%d ok:%d",
|
SendDebugMsg(a8::Format("second summon hero id:%d pos:%f,%f rad:%d ok:%d",
|
||||||
{
|
{
|
||||||
@ -2760,5 +2760,14 @@ Weapon* Creature::ChooseNextSpecWeapon(int curr_weapon_slot_id)
|
|||||||
|
|
||||||
void Creature::OnBattleStart(Room* room)
|
void Creature::OnBattleStart(Room* room)
|
||||||
{
|
{
|
||||||
|
std::vector<int> del_buffs;
|
||||||
|
del_buffs.reserve(buff_list_.size());
|
||||||
|
for (auto& buff : buff_list_) {
|
||||||
|
if (!buff.meta->i->post_battle_valid()) {
|
||||||
|
del_buffs.push_back(buff.buff_uniid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (auto itr = del_buffs.rbegin(); itr != del_buffs.rend(); ++itr) {
|
||||||
|
RemoveBuffByUniId(*itr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -340,3 +340,10 @@ void Hero::InitAI()
|
|||||||
((HeroAI*)ai)->ForceRandomWalk(time, idle_time);
|
((HeroAI*)ai)->ForceRandomWalk(time, idle_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Hero::OnBattleStart(Room* room)
|
||||||
|
{
|
||||||
|
if (master.Get()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -38,6 +38,7 @@ public:
|
|||||||
virtual void GetHitAabbBox(AabbCollider& aabb_box) override;
|
virtual void GetHitAabbBox(AabbCollider& aabb_box) override;
|
||||||
virtual void OnAddToTargetPartObject(Entity* target) override;
|
virtual void OnAddToTargetPartObject(Entity* target) override;
|
||||||
virtual void OnRemoveFromTargetPartObject(Entity* target) override;
|
virtual void OnRemoveFromTargetPartObject(Entity* target) override;
|
||||||
|
virtual void OnBattleStart(Room* room) override;
|
||||||
void DetachFromMaster();
|
void DetachFromMaster();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1252,7 +1252,10 @@ void Room::UpdateGasInactive()
|
|||||||
CreateAndroid(GetRoomMaxPlayerNum() - human_hash_.size());
|
CreateAndroid(GetRoomMaxPlayerNum() - human_hash_.size());
|
||||||
NotifyUiUpdate();
|
NotifyUiUpdate();
|
||||||
}
|
}
|
||||||
|
battle_start_frameno_ = GetFrameNo();
|
||||||
CombineTeam();
|
CombineTeam();
|
||||||
|
ClearPostBattleAutoFreeList();
|
||||||
|
OnBattleStart();
|
||||||
ShuaPlane();
|
ShuaPlane();
|
||||||
NotifyWxVoip();
|
NotifyWxVoip();
|
||||||
InitAndroidAI();
|
InitAndroidAI();
|
||||||
@ -1287,7 +1290,12 @@ void Room::UpdateGasInactive()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher_.timer_list_);
|
&xtimer_attacher_.timer_list_,
|
||||||
|
[] (const a8::XParams& param)
|
||||||
|
{
|
||||||
|
Room* room = (Room*)param.sender.GetUserData();
|
||||||
|
room->auto_jump_timer_ = nullptr;
|
||||||
|
});
|
||||||
#if 1
|
#if 1
|
||||||
a8::XPrintf("max_run_delay:%d %d\n", {PerfMonitor::Instance()->max_run_delay_time,
|
a8::XPrintf("max_run_delay:%d %d\n", {PerfMonitor::Instance()->max_run_delay_time,
|
||||||
a8::XGetTickCount() - begin_tick});
|
a8::XGetTickCount() - begin_tick});
|
||||||
@ -1389,9 +1397,7 @@ void Room::UpdateGasJump()
|
|||||||
if (map_meta_->i->init_gas_ring() > 0) {
|
if (map_meta_->i->init_gas_ring() > 0) {
|
||||||
ForwardGasRing(map_meta_->i->init_gas_ring());
|
ForwardGasRing(map_meta_->i->init_gas_ring());
|
||||||
}
|
}
|
||||||
battle_start_frameno_ = GetFrameNo();
|
|
||||||
xtimer.DeleteTimer(auto_jump_timer_);
|
xtimer.DeleteTimer(auto_jump_timer_);
|
||||||
auto_jump_timer_ = nullptr;
|
|
||||||
NotifyGameStart();
|
NotifyGameStart();
|
||||||
NotifyUiUpdate();
|
NotifyUiUpdate();
|
||||||
NotifyWxVoip();
|
NotifyWxVoip();
|
||||||
@ -1399,8 +1405,6 @@ void Room::UpdateGasJump()
|
|||||||
InitAirDrop();
|
InitAirDrop();
|
||||||
InitAirRaid();
|
InitAirRaid();
|
||||||
}
|
}
|
||||||
ClearPostBattleAutoFreeList();
|
|
||||||
OnBattleStart();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2418,7 +2422,7 @@ ObstacleData* Room::GetPermanentObstacleData(int obstacle_uniid)
|
|||||||
long long Room::GetGasInactiveTime()
|
long long Room::GetGasInactiveTime()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
return f8::IsOnlineEnv() ? 10 : 50;
|
return f8::IsOnlineEnv() ? 10 : 10;
|
||||||
#endif
|
#endif
|
||||||
if (room_mode_ == kZombieMode) {
|
if (room_mode_ == kZombieMode) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -574,3 +574,10 @@ RoomObstacleWeakPtr& RoomObstacle::GetWeakPtrRef()
|
|||||||
}
|
}
|
||||||
return weak_ptr_;
|
return weak_ptr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RoomObstacle::OnBattleStart(Room* room)
|
||||||
|
{
|
||||||
|
if (master.Get()) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -23,6 +23,7 @@ class RoomObstacle : public Obstacle
|
|||||||
virtual void RecalcSelfCollider() override;
|
virtual void RecalcSelfCollider() override;
|
||||||
virtual bool IsTerminatorAirDropBox(Room* room) override { return is_terminator_airdrop_box; }
|
virtual bool IsTerminatorAirDropBox(Room* room) override { return is_terminator_airdrop_box; }
|
||||||
virtual bool DoInteraction(Human* sender) override;
|
virtual bool DoInteraction(Human* sender) override;
|
||||||
|
virtual void OnBattleStart(Room* room) override;
|
||||||
void ActiveTimerFunc();
|
void ActiveTimerFunc();
|
||||||
void UpdateTimerFunc();
|
void UpdateTimerFunc();
|
||||||
void Active();
|
void Active();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user