1
This commit is contained in:
parent
6a29a0f724
commit
19899d7fec
@ -55,9 +55,6 @@ void Bullet::Initialize()
|
||||
sender.Get()->room->xtimer.ModifyTime(buff->remover_timer, SERVER_FRAME_RATE * 10);
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("buff_uniid:%d\n", {buff_uniid});
|
||||
#endif
|
||||
if (sender.Get()) {
|
||||
sender.Get()->GetTrigger()->FlyHookCreate(this);
|
||||
}
|
||||
@ -890,7 +887,6 @@ void Bullet::ProcNormalBullet(BulletCheckResult& result)
|
||||
if (raycast_hited) {
|
||||
if (result.flyed_distance > 0.001f) {
|
||||
ClearBuffList();
|
||||
a8::XPrintf("ClearBuffList\n", {});
|
||||
auto sender_p = sender;
|
||||
sender.Get()->AutoNavigation
|
||||
(raycast_hit_point_, gun_meta->bullet_speed() * 2,
|
||||
@ -898,21 +894,6 @@ void Bullet::ProcNormalBullet(BulletCheckResult& result)
|
||||
{
|
||||
sender_p.Get()->GetTrigger()->FlyHookDestory();
|
||||
});
|
||||
#if 0
|
||||
sender.Get()->IncDisableMoveTimes();
|
||||
sender.Get()->room->xtimer.SetTimeoutEx
|
||||
(
|
||||
(raycast_len_ / gun_meta->bullet_speed() / 2 + 0.75) * SERVER_FRAME_RATE,
|
||||
[sender_p] (int event, const a8::Args* args) mutable
|
||||
{
|
||||
if (a8::TIMER_EXEC_EVENT == event) {
|
||||
sender_p.Get()->DecDisableMoveTimes();
|
||||
sender_p.Get()->GetTrigger()->FlyHookDestory();
|
||||
}
|
||||
},
|
||||
&sender.Get()->xtimer_attacher
|
||||
);
|
||||
#endif
|
||||
sender.Get()->RemoveBuffById(kKeepShotAnimiBuffId);
|
||||
sender.Get()->TryAddBuff(sender.Get(), gun_meta->_int_param2);
|
||||
}
|
||||
|
@ -2561,7 +2561,11 @@ void Creature::AutoNavigation(const glm::vec3& target_pos, float speed,
|
||||
GlmHelper::Normalize(context->dir);
|
||||
context->speed = speed;
|
||||
context->cb = cb;
|
||||
SetAttackDir(context->dir);
|
||||
SetMoveDir(context->dir);
|
||||
|
||||
IncDisableAttackDirTimes();
|
||||
IncDisableMoveDirTimes();
|
||||
IncDisableMoveTimes();
|
||||
room->xtimer.SetIntervalEx
|
||||
(1,
|
||||
@ -2609,6 +2613,8 @@ void Creature::AutoNavigation(const glm::vec3& target_pos, float speed,
|
||||
if (ok || c->dead) {
|
||||
context->cb(c);
|
||||
c->DecDisableMoveTimes();
|
||||
c->DecDisableMoveDirTimes();
|
||||
c->DecDisableAttackDirTimes();
|
||||
room->xtimer.DeleteCurrentTimer();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user