View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004969 | Spring engine | General | public | 2015-09-24 19:44 | 2016-02-05 01:19 |
| Reporter | Code_Man | Assigned To | Kloot | ||
| Priority | low | Severity | trivial | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Product Version | 100.0 | ||||
| Summary | 0004969: flightTime for guided missile is not infinite by default | ||||
| Description | Missiles with flightTime not specified drop after about 2000 elmos. Infinite flight time seems a reasonable default, in contrast to some abstract number. Even the ones with tracks and friends set do drop. So i suspect this rather an engine bug than a wiki error. | ||||
| Tags | No tags attached. | ||||
| Checked infolog.txt for Errors | |||||
|
|
> "Infinite flight time seems a reasonable default" but then you might get: -projectiles flying around forever in circles. -projectiles with groundBounce=true sitting on ground forever The wiki usually does not look further than WeaponDef.cpp where the weaponDefs are loaded. There it says flightTime defaults to 0.0 Without testing anything, https://github.com/spring/spring/blob/develop/rts/Sim/Weapons/MissileLauncher.cpp#L59 suggests that the actual time-to-live of missiles without specified flightTime is this: params.ttl = weaponDef->flighttime == 0? std::ceil(std::max(dist, range) / projectileSpeed + 25 * weaponDef->selfExplode): weaponDef->flighttime; Imo it makes sense that the engine tries to fill missing tags with with sensible values, it is more helpful to modders than "infinite" or "blow up at launch." |
|
|
infinite projectile defaults are a recipe for problems |