- Joined
- May 9, 2014
- Messages
- 1,824
@Cokemonkey11 Any input on this?
(1 ratings)
What is `Missile` really for? Should it be in the standard library? Is it a dependency with its own git uri?
for comparing distance between points, prefer distanceToSq when appropriate
`KNOCKBACK_ANGLE_AIR` what are the units?
This is minor, but you do not need @configurable before every line, especially since there are no exceptions.
It would be less bloat to juse
@configurable
// vars here
@endconfigurable
private static let clock = CreateTimer()
You could just use the TimedLoopModuleprivate unit u
must be initialized "= null" otherwise recycled objects could have residual referencesstatic function create
when you can just use constructors. They exist for a reason.distanceTo
when you could use distanceToSq
from what I seelet
and var
Added units for KNOCKBACK_ANGLE_AIR (degrees)
Then just change the annotation to "config" or something I suppose
Unless I am completely wrong and annotations
Want to take over, @Sir Moriarty?
let missile = new Missile(FX_MISSILE, caster.getPos3Fly(), target)
missile
..setSpeed(MISSILE_SPEED)
..setHeight(MISSILE_HEIGHT)
..setScale(FX_MISSILE_SCALE_BASE + FX_MISSILE_SCALE_LVL * caster.getAbilityLevel(abilId))
..setTrail(FX_TRAIL)
..setTrailAttach(FX_TRAIL_ATTACH)
..onHit(-> explode(caster, target))
new Missile(FX_MISSILE, caster.getPos3Fly(), target)
..setSpeed(MISSILE_SPEED)
..setHeight(MISSILE_HEIGHT)
..setScale(FX_MISSILE_SCALE_BASE + FX_MISSILE_SCALE_LVL * caster.getAbilityLevel(abilId))
..setTrail(FX_TRAIL)
..setTrailAttach(FX_TRAIL_ATTACH)
..onHit() ->
explode(caster, target)
static let abilId = compiletime(ABIL_ID_GEN.next())
static constant ABIL_ID = compiletime(ABIL_ID_GEN.next())
ondestroy
art.destr()
cb.callback()
destroy cb
In `BaneOfEvil_config.wurst`, change `let` bindings to `constant` bindings.
One small nitpick: the missile has a maximum range, but it only travels up to the cast point. I think it'd make more sense if it travelled its entire maximum length regardless of the cast point.