2019-05-23 05:46 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005887Spring engineGeneralpublic2018-11-27 17:03
ReporterForboding Angel 
Assigned To 
StatusclosedResolutionno change required 
Product Version104.0 
Target VersionFixed in Version 
Summary0005887: Air units with laser cannons frequently fail to impact the target/ground
DescriptionIn the video I am showing that I am attempting to max all out even remotely related tags. In this case, intensity (even though it's only visual), minintensity (even though this only effects damage), and falloffrate (last ditch effort in trying to make it at least impact the ground.

At the end of the vid you are treated with the sight that evo players have seen all too often, and that is an aircraft firing lasercannon projectiles that fail to hit either the target or the ground. Because of this reason, I have had to convert all evo air weapons to missiles or cannons.

Steps To ReproducePut a lasercannon on an air unit
Additional InformationHas been an issue since definitely 103.0, but iirc it was also an issue in 96.

Unit Basedef:
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files




Forboding Angel (reporter)

Forgot to mention, cylinderTargeting is 128 for all weapons in the game via post.

function WeaponDef_Post(name, wDef)
    -- Cylinder Targeting for everything
    wDef.cylindertargeting = 128


Forboding Angel (reporter)

More context:


sprung (reporter)

Lasercannon is always spherical (regardless of cylinder targeting).


Forboding Angel (reporter)

lolwut? Why...


Forboding Angel (reporter)

Additionally, with falloffrate 0, why isn't it impacting anything?


sprung (reporter)

Falloffrate does not affect collisions. It only starts to kick in after the projectile is in the expiration stage of TTL < 0 (see https://github.com/spring/spring/blob/542b4d9b5ea2fbe2094795ba319eda08572ad972/rts/Sim/Projectiles/WeaponProjectiles/LaserProjectile.cpp#L88 ) and at this point collisions are disabled (see https://github.com/spring/spring/blob/542b4d9b5ea2fbe2094795ba319eda08572ad972/rts/Sim/Projectiles/WeaponProjectiles/LaserProjectile.cpp#L83 ).

Also, its value cannot actually be 0, it has a lower cap of 0.2 (see https://github.com/spring/spring/blob/542b4d9b5ea2fbe2094795ba319eda08572ad972/rts/Sim/Projectiles/WeaponProjectiles/LaserProjectile.cpp#L103 ).


Forboding Angel (reporter)

Shouldn't falloffrate collisions be a toggle? Falloffrate 0.1 used to result in lasers that could go far past their range but would impact and do damage.

But I still don't understand why range for lasercannon is spherical but beamlaser is not.


Forboding Angel (reporter)

why range for lasercannon is always forced to be spherical*


sprung (reporter)

I seem to have been wrong wrong and LaserCannon does not actually force spherical range. In the def you've pasted it seems like the culprit is burnblow since it limits range to nominal (before vertical stretch): https://github.com/spring/spring/blob/30862626214bd263b1c4489bb197ef1c3dbc0738/rts/Sim/Weapons/LaserCannon.cpp#L59


Forboding Angel (reporter)

Hmm, nice call, I'll give it a shot. The addition of burnblow was initially in an attempt to force the shot to explode, thereby using aoe to deal the damage, even if the actual projectile phased through the target. Which, fyi fwiw, burnblow on lasers doesn't work.

Unfortunately, defs are subject to a bit of bitrot and burnblow was left (likely in hopes that 103/104 would fix burnblow on lasers not working).

I'll try it out, thanks!


Forboding Angel (reporter)

Has nothing to do with burnblow

The unit here does not have burnblow.


sprung (reporter)

ZK has no such problems (see below) so I believe it's still something wrong in your weapon defs, not the engine.

I took vanilla ZK `shieldraid` and changed its weapon's heightMod from 1 to 0 to make it an infinite vertical cylinder: https://github.com/ZeroK-RTS/Zero-K/blob/master/units/shieldraid.lua#L89

Then took `gunshipheavyskirm` and changed its cruiseAlt to 2000 (note that shieldraid's weapon has just 245 nominal horizontal range): https://github.com/ZeroK-RTS/Zero-K/blob/master/units/gunshipheavyskirm.lua#L21

The weapon can hit perfectly fine (see attached screenie). My suggestion is to take that weapondef (remember the heightMod) and work back from there.

-Issue History
Date Modified Username Field Change
2018-02-16 09:20 Forboding Angel New Issue
2018-02-17 05:01 Forboding Angel Note Added: 0018811
2018-02-17 05:01 Forboding Angel Note Added: 0018812
2018-02-17 05:57 sprung Note Added: 0018813
2018-02-17 12:19 Forboding Angel Note Added: 0018814
2018-02-17 12:32 Forboding Angel Note Added: 0018816
2018-02-23 08:44 sprung Note Added: 0018843
2018-02-25 04:58 Forboding Angel Note Added: 0018852
2018-02-25 05:00 Forboding Angel Note Added: 0018853
2018-09-04 21:26 sprung Note Added: 0019336
2018-09-04 22:10 Forboding Angel Note Added: 0019337
2018-09-05 02:47 Forboding Angel Note Added: 0019338
2018-09-09 01:32 sprung File Added: screen00028.png
2018-09-09 01:32 sprung Note Added: 0019342
2018-11-27 17:03 Kloot Status new => closed
2018-11-27 17:03 Kloot Resolution open => no change required
+Issue History