View Issue Details

IDProjectCategoryView StatusLast Update
0004969Spring engineGeneralpublic2016-02-05 01:19
ReporterCode_Man Assigned ToKloot  
PrioritylowSeveritytrivialReproducibilityalways
Status closedResolutionwon't fix 
Product Version100.0 
Summary0004969: flightTime for guided missile is not infinite by default
DescriptionMissiles 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.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

user744

2015-09-25 12:58

  ~0015244

> "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."

Kloot

2016-02-05 01:19

developer   ~0015625

infinite projectile defaults are a recipe for problems

Issue History

Date Modified Username Field Change
2015-09-24 19:44 Code_Man New Issue
2015-09-25 12:58 user744 Note Added: 0015244
2016-02-05 01:19 Kloot Note Added: 0015625
2016-02-05 01:19 Kloot Status new => closed
2016-02-05 01:19 Kloot Assigned To => Kloot
2016-02-05 01:19 Kloot Resolution open => won't fix