修复宕机问题

This commit is contained in:
aozhiwei 2021-09-22 08:13:53 +00:00
parent 7fb56979a8
commit e0784dad49
2 changed files with 11 additions and 1 deletions

View File

@ -17,6 +17,7 @@ const int kPoisioningBuffId = 7016;
const int kRescueBuffId = 7017;
const int kVertigoBuffId = 7018;
const int kPeaceModeBuffId = 7019;
const int kPullToWalkableBuffId = 8003;
enum BuffEffectType_e
{

View File

@ -649,7 +649,16 @@ void RoomObstacle::PushCollisionObjects()
[this] (Creature* c, bool& stop)
{
if (TestCollision(room, c)) {
c->MustBeAddBuff(c, 8003);
c->room->xtimer.AddDeadLineTimerAndAttach
(1,
a8::XParams()
.SetSender(c),
[] (const a8::XParams& param)
{
Creature* c = (Creature*)param.sender.GetUserData();
c->MustBeAddBuff(c, kPullToWalkableBuffId);
},
&c->xtimer_attacher.timer_list_);
}
});
}