修复宕机bug删除a8::TIMER_DELETE_EVENT
This commit is contained in:
parent
334dd641e0
commit
7aed70e9ce
@ -17,11 +17,6 @@ void AutoShotBuff::Activate()
|
|||||||
owner->AsHuman()->shot_hold = true;
|
owner->AsHuman()->shot_hold = true;
|
||||||
owner->AsHuman()->series_shot_frames = 0;
|
owner->AsHuman()->series_shot_frames = 0;
|
||||||
}
|
}
|
||||||
} else if (a8::TIMER_DELETE_EVENT == event) {
|
|
||||||
if (owner->IsHuman()) {
|
|
||||||
owner->AsHuman()->shot_hold = false;
|
|
||||||
owner->AsHuman()->series_shot_frames = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher);
|
&xtimer_attacher);
|
||||||
@ -29,5 +24,8 @@ void AutoShotBuff::Activate()
|
|||||||
|
|
||||||
void AutoShotBuff::Deactivate()
|
void AutoShotBuff::Deactivate()
|
||||||
{
|
{
|
||||||
|
if (owner->IsHuman()) {
|
||||||
|
owner->AsHuman()->shot_hold = false;
|
||||||
|
owner->AsHuman()->series_shot_frames = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1104,7 +1104,7 @@ void CallFuncBuff::SummonCarSpecPoint()
|
|||||||
[room = owner->room, car_id, x, y, z, special_operators]
|
[room = owner->room, car_id, x, y, z, special_operators]
|
||||||
(int event, const a8::Args* args) mutable
|
(int event, const a8::Args* args) mutable
|
||||||
{
|
{
|
||||||
if (a8::TIMER_DELETE_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
if (!room->IsGameOver()) {
|
if (!room->IsGameOver()) {
|
||||||
const mt::Equip* equip_meta = mt::Equip::GetById(car_id);
|
const mt::Equip* equip_meta = mt::Equip::GetById(car_id);
|
||||||
if (equip_meta && equip_meta->equip_type() == EQUIP_TYPE_CAR) {
|
if (equip_meta && equip_meta->equip_type() == EQUIP_TYPE_CAR) {
|
||||||
|
@ -437,7 +437,7 @@ void Bullet::ProcSmokeBomb()
|
|||||||
(SERVER_FRAME_RATE * mt::Param::GetIntParam("smoke_duration", 10),
|
(SERVER_FRAME_RATE * mt::Param::GetIntParam("smoke_duration", 10),
|
||||||
[task] (int event, const a8::Args* args)
|
[task] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_DELETE_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
task->Done();
|
task->Done();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -481,9 +481,6 @@ a8::XTimerWp Creature::TryDelayAddBuff(Creature* caster,
|
|||||||
handle->post_add_cb(this, buff_uniid);
|
handle->post_add_cb(this, buff_uniid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (a8::TIMER_DELETE_EVENT == event) {
|
|
||||||
if (handle) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher);
|
&xtimer_attacher);
|
||||||
@ -2867,7 +2864,6 @@ void Creature::LockAttackDir(int time)
|
|||||||
[this] (int event, const a8::Args* args)
|
[this] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
} else if (a8::TIMER_DELETE_EVENT == event){
|
|
||||||
DecDisableAttackDirTimes();
|
DecDisableAttackDirTimes();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3730,8 +3726,7 @@ void Creature::AddIgnoreTarget(int target_uniid, int time)
|
|||||||
(SERVER_FRAME_RATE * time,
|
(SERVER_FRAME_RATE * time,
|
||||||
[this, target_uniid] (int event, const a8::Args* args)
|
[this, target_uniid] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_EXEC_EVENT == event ||
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
a8::TIMER_DELETE_EVENT == event) {
|
|
||||||
ignore_target_hash_.erase(target_uniid);
|
ignore_target_hash_.erase(target_uniid);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -3743,6 +3738,7 @@ void Creature::DelIgnoreTarget(int target_uniid)
|
|||||||
auto itr = ignore_target_hash_.find(target_uniid);
|
auto itr = ignore_target_hash_.find(target_uniid);
|
||||||
if (itr != ignore_target_hash_.end()) {
|
if (itr != ignore_target_hash_.end()) {
|
||||||
room->xtimer.Delete(itr->second);
|
room->xtimer.Delete(itr->second);
|
||||||
|
ignore_target_hash_.erase(itr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1507,7 +1507,7 @@ void Human::ProcThrowDmg(int throw_uniid)
|
|||||||
(SERVER_FRAME_RATE * mt::Param::GetIntParam("smoke_duration", 10),
|
(SERVER_FRAME_RATE * mt::Param::GetIntParam("smoke_duration", 10),
|
||||||
[task] (int event, const a8::Args* args)
|
[task] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_DELETE_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
task->Done();
|
task->Done();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2945,7 +2945,7 @@ int Creature::Throw(const mt::Equip* src_equip_meta,
|
|||||||
SERVER_FRAME_RATE * 15,
|
SERVER_FRAME_RATE * 15,
|
||||||
[this, throw_uniid] (int event, const a8::Args* args)
|
[this, throw_uniid] (int event, const a8::Args* args)
|
||||||
{
|
{
|
||||||
if (a8::TIMER_DELETE_EVENT == event) {
|
if (a8::TIMER_EXEC_EVENT == event) {
|
||||||
if (IsPlayer()) {
|
if (IsPlayer()) {
|
||||||
AsPlayer()->ProcThrowDmg(throw_uniid);
|
AsPlayer()->ProcThrowDmg(throw_uniid);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ private:
|
|||||||
long long e_wptr_num = 0;
|
long long e_wptr_num = 0;
|
||||||
long long event_handler_num = 0;
|
long long event_handler_num = 0;
|
||||||
int traversing_cell_creature_count = 0;
|
int traversing_cell_creature_count = 0;
|
||||||
|
long long find_path_max_time = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Output();
|
void Output();
|
||||||
|
@ -2273,6 +2273,7 @@ void Room::RandRemoveAndroid()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (hum) {
|
if (hum) {
|
||||||
|
hum->CheckSpecObject(0);
|
||||||
if (hum->team_id != 0) {
|
if (hum->team_id != 0) {
|
||||||
Team* team = GetTeam(hum->team_id);
|
Team* team = GetTeam(hum->team_id);
|
||||||
if (team) {
|
if (team) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user