1
This commit is contained in:
parent
2433141484
commit
9eaf1c84b0
@ -56,7 +56,23 @@ void SprintBuff::Activate()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Player* hum = (Player*)caster_.Get();
|
CollisionCheck();
|
||||||
|
}
|
||||||
|
ProcSkill();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SprintBuff::Deactivate()
|
||||||
|
{
|
||||||
|
if (meta->_int_param5) {
|
||||||
|
owner->DecDisableMoveDirTimes();
|
||||||
|
}
|
||||||
|
if (owner->AsHuman()) {
|
||||||
|
owner->AsHuman()->last_shot_frameno_ = owner->room->GetFrameNo() + SERVER_FRAME_RATE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SprintBuff::CollisionCheck()
|
||||||
|
{
|
||||||
std::map<int, long long> hited_objects = std::map<int, long long>();
|
std::map<int, long long> hited_objects = std::map<int, long long>();
|
||||||
Position pre_pos;
|
Position pre_pos;
|
||||||
pre_pos = owner->GetPos();
|
pre_pos = owner->GetPos();
|
||||||
@ -77,10 +93,10 @@ void SprintBuff::Activate()
|
|||||||
float distance = buff->owner->GetPos().Distance2D2(pre_pos);
|
float distance = buff->owner->GetPos().Distance2D2(pre_pos);
|
||||||
for (int i = 0; i < (distance + 6); i += 5) {
|
for (int i = 0; i < (distance + 6); i += 5) {
|
||||||
// 999
|
// 999
|
||||||
#if 1
|
#if 1
|
||||||
#else
|
#else
|
||||||
buff->owner->MutablePos.FromVec2((pre_pos) + (dir * i));
|
buff->owner->MutablePos.FromVec2((pre_pos) + (dir * i));
|
||||||
#endif
|
#endif
|
||||||
buff->owner->GetHitEnemys(enemys, buff->meta->_param4);
|
buff->owner->GetHitEnemys(enemys, buff->meta->_param4);
|
||||||
for (auto& enemy : enemys) {
|
for (auto& enemy : enemys) {
|
||||||
if (enemy->IsEntityType(ET_Car)) {
|
if (enemy->IsEntityType(ET_Car)) {
|
||||||
@ -131,18 +147,6 @@ void SprintBuff::Activate()
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
&xtimer_attacher);
|
&xtimer_attacher);
|
||||||
}
|
|
||||||
ProcSkill();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SprintBuff::Deactivate()
|
|
||||||
{
|
|
||||||
if (meta->_int_param5) {
|
|
||||||
owner->DecDisableMoveDirTimes();
|
|
||||||
}
|
|
||||||
if (owner->AsHuman()) {
|
|
||||||
owner->AsHuman()->last_shot_frameno_ = owner->room->GetFrameNo() + SERVER_FRAME_RATE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SprintBuff::ProcSkill()
|
void SprintBuff::ProcSkill()
|
||||||
|
@ -10,6 +10,7 @@ class SprintBuff : public Buff
|
|||||||
virtual void Deactivate() override;
|
virtual void Deactivate() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void CollisionCheck();
|
||||||
void ProcSkill();
|
void ProcSkill();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user