View Issue Details

IDProjectCategoryView StatusLast Update
0005887Spring engineGeneralpublic2018-11-27 17:03
ReporterForboding Angel Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version104.0 
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.

https://youtu.be/a24mXFFqSuQ
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:
https://pastebin.com/QxNG2rFx
TagsNo tags attached.
Attached Files
Checked infolog.txt for Errors

Activities

Forboding Angel

2018-02-17 05:01

reporter   ~0018811

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
end

Forboding Angel

2018-02-17 05:01

reporter   ~0018812

More context:
https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Gamedata/alldefs_post.lua#L170

sprung

2018-02-17 05:57

reporter   ~0018813

Lasercannon is always spherical (regardless of cylinder targeting).

Forboding Angel

2018-02-17 12:19

reporter   ~0018814

lolwut? Why...

Forboding Angel

2018-02-17 12:32

reporter   ~0018816

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

sprung

2018-02-23 08:44

reporter   ~0018843

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

2018-02-25 04:58

reporter   ~0018852

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

2018-02-25 05:00

reporter   ~0018853

why range for lasercannon is always forced to be spherical*

sprung

2018-09-04 21:26

reporter   ~0019336

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

2018-09-04 22:10

reporter   ~0019337

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

2018-09-05 02:47

reporter   ~0019338

Has nothing to do with burnblow
https://youtu.be/t9Mat1MVDgA

The unit here does not have burnblow.

sprung

2018-09-09 01:32

reporter   ~0019342

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.
screen00028.png (Attachment missing)

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