1
This commit is contained in:
parent
72314bbad6
commit
fa73330d4d
@ -1900,6 +1900,15 @@ void Human::ProcSkillPhase(MetaData::SkillPhase* phase)
|
||||
}
|
||||
}
|
||||
};
|
||||
auto explosion_check_func =
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Obstacle* obstacle = (Obstacle*)param.sender.GetUserData();
|
||||
if (!obstacle->dead) {
|
||||
obstacle->dead = true;
|
||||
obstacle->Explosion();
|
||||
}
|
||||
};
|
||||
|
||||
switch (phase->func_id) {
|
||||
case Skill_Jump:
|
||||
@ -1957,14 +1966,7 @@ void Human::ProcSkillPhase(MetaData::SkillPhase* phase)
|
||||
room->xtimer.AddDeadLineTimerAndAttach(SERVER_FRAME_RATE * 5,
|
||||
a8::XParams()
|
||||
.SetSender(obstacle),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Obstacle* obstacle = (Obstacle*)param.sender.GetUserData();
|
||||
if (!obstacle->dead) {
|
||||
obstacle->dead = true;
|
||||
obstacle->Explosion();
|
||||
}
|
||||
},
|
||||
explosion_check_func,
|
||||
&obstacle->xtimer_attacher.timer_list_);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user