add move_asymptotic_halflife
This commit is contained in:
parent
90b8fa0ef0
commit
203c3c657d
2 changed files with 5 additions and 2 deletions
|
@ -34,10 +34,13 @@ INLINE MoveParams move_accelerated(cmplx vel, cmplx accel) {
|
|||
}
|
||||
|
||||
INLINE MoveParams move_asymptotic(cmplx vel0, cmplx vel1, cmplx retention) {
|
||||
// NOTE: retention could be derived by something like: exp(-1 / halflife)
|
||||
return (MoveParams) { vel0, vel1 * (1 - retention), retention };
|
||||
}
|
||||
|
||||
INLINE MoveParams move_asymptotic_halflife(cmplx vel0, cmplx vel1, double halflife) {
|
||||
return move_asymptotic(vel0, vel1, exp2(-1.0 / halflife));
|
||||
}
|
||||
|
||||
INLINE MoveParams move_asymptotic_simple(cmplx vel, double boost_factor) {
|
||||
// NOTE: this matches the old asymptotic rule semantics exactly
|
||||
double retention = 0.8;
|
||||
|
|
|
@ -100,7 +100,7 @@ TASK_WITH_INTERFACE(boss_nonspell_1, BossAttack) {
|
|||
.proto = pp_crystal,
|
||||
.pos = shot_org,
|
||||
.color = RGB(0.3, 0.3, 0.8),
|
||||
.move = move_asymptotic(speed0 * -I * cdir(angle), speed1 * I, exp2(-1 / 30.0)),
|
||||
.move = move_asymptotic_halflife(speed0 * -I * cdir(angle), speed1 * I, 30.0),
|
||||
.max_viewport_dist = 256,
|
||||
);
|
||||
t += WAIT(difficulty_value(3, 3, 1, 1));
|
||||
|
|
Loading…
Reference in a new issue