1
This commit is contained in:
parent
9b77cb1b91
commit
d943bdf50e
@ -614,7 +614,19 @@ void Bullet::Check(float distance)
|
||||
sender.Get()->IncDisableAttackDirTimes();
|
||||
sender.Get()->room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
(0.2 + distance / gun_meta->i->bullet_speed() / 2) * SERVER_FRAME_RATE,
|
||||
(distance / gun_meta->i->bullet_speed() / 2) * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(sender.Get()),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
Creature* c = (Creature*)param.sender.GetUserData();
|
||||
c->RemoveBuffById(kKeepShotAnimiBuffId);
|
||||
},
|
||||
&sender.Get()->xtimer_attacher.timer_list_
|
||||
);
|
||||
sender.Get()->room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
(0.75 + distance / gun_meta->i->bullet_speed() / 2) * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(sender.Get()),
|
||||
[] (const a8::XParams& param)
|
||||
@ -622,7 +634,6 @@ void Bullet::Check(float distance)
|
||||
Creature* c = (Creature*)param.sender.GetUserData();
|
||||
c->DecDisableMoveTimes();
|
||||
c->DecDisableAttackDirTimes();
|
||||
c->RemoveBuffById(kKeepShotAnimiBuffId);
|
||||
},
|
||||
&sender.Get()->xtimer_attacher.timer_list_
|
||||
);
|
||||
@ -827,7 +838,7 @@ void Bullet::ProcFlyHook(Entity* target)
|
||||
sender.Get()->IncDisableMoveTimes();
|
||||
sender.Get()->room->xtimer.AddDeadLineTimerAndAttach
|
||||
(
|
||||
(distance / gun_meta->i->bullet_speed() / 2) * SERVER_FRAME_RATE,
|
||||
(distance / gun_meta->i->bullet_speed() / 2 + 0.75) * SERVER_FRAME_RATE,
|
||||
a8::XParams()
|
||||
.SetSender(sender.Get()),
|
||||
[] (const a8::XParams& param)
|
||||
|
Loading…
x
Reference in New Issue
Block a user