|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0006417||Spring engine||Lua||public||2020-08-19 22:36||2020-08-20 18:15|
|Product Version||104.0 +git|
|Target Version||Fixed in Version|
|Summary||0006417: Spawned Projectiles with tracking don't track mobile units|
|Description||Using Spring.SpawnProjectile tracking parameter.|
Regular LRM weapon https://github.com/SpringMCLegacy/SpringMCLegacy/blob/f35ed95f22efbf0e5055e594d61b56b8945382b9/weapons/LRMs.lua#L1
is detected, destroyed, and replaced with a guided version with increased turnrate
The new projectile has the same target set and position, velocity etc from the original projectile
I've tried tracking = true (as in ZK zenith) and tracking = largenumber, as it is read as a number in LuaSyncedCtrl and I hoped this might be the turn rate used in tracking.
The regular version of the unit's missiles tracks better than the spawned replacements vs a moving target, though the spawned version are better vs a fixed target (the 'end' parameter passed to the new projectile - I have a workaround where I _continously_ destroy and respawn the projectiles with new end parameter).
|Steps To Reproduce||Apologies, this is pretty long:|
Load MCL f35ed95f22efbf0e5055e594d61b56b8945382b9 from git or the latest mcl:test via PR downloader.
/give fs_dervish<tab> this will be the missile firer.
Load into the mechbay, click the blue button on the mechbay to upgrade to 'Mech Mods & Omni'. Click the 'Ammo Mods' button, then select 'LRM Smart', the button should change to say 'Applied' and other LRM ammos should become disabled. Click the 'Get Out' button.
/give cc_raven<tab> some distance away. This will provide the TAG laser that activates the homing. Turn off all its weapons in the right-hand unit control card except the TAG Laser (bottom weapon button)
/give fs_locust<tab> 1 within TAG range of the Raven. This will be the target. 'TAG' should appear in red above its head, and the Dervish should pelt it with very accurate missiles. So far, so good.
Switch /team 1 and have the Locust run around. The missiles do not track.
/give fs_dervish<tab> to team 0, without upgrading it. Its missiles are not so accurate when the Locust is standing still, but track its motion much better.
|Additional Information||Essentially I want to make the upgraded version of the weapon track mobile units BETTER than the regular version. Currently they seem to track not-at-all.|
If you want to disable the rigmarole with the mechbay ammo upgrade, then comment out
and all LRM's will now exibit the TAG laser following behaviour.
|Tags||No tags attached.|
|Checked infolog.txt for Errors||Yes|
|Sorry forgot to state, this is tested with Spring 104.0.1-1544|
|I also tried not setting the 'end' parameter at all, but then the missiles fly off goodness-knows-where.|
If I modify this function
which checks that the TAG laser designator is still in effect, to set the target to the position of the target, then it will track. But setting it to the target unitID does not.
|I've now implemented my workaround in MCL for playtesting, so for testing this MCL test 2588 would be required, or the git commit above. Apologies for the note spam, I have no edit button on the issue itself or the notes.|
|2020-08-19 22:36||FLOZi||New Issue|
|2020-08-19 22:40||FLOZi||Note Added: 0020513|
|2020-08-19 22:50||FLOZi||Note Added: 0020514|
|2020-08-20 12:54||FLOZi||Note Added: 0020515|
|2020-08-20 18:15||FLOZi||Note Added: 0020516|