2019-08-24 12:00 CEST

View Issue Details Jump to Notes ] Related Changesets ]
IDProjectCategoryView StatusLast Update
0004483Spring engineLuapublic2016-08-26 19:48
ReporterFLOZi 
Assigned Tohokomoko 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version97.0.1+git 
Target VersionFixed in Version 
Summary0004483: Spring.SetProjectileAlwaysVisible doesn't always make a projectile always visible
DescriptionGrab MCL r1111 from SVN ( https://sourceforge.net/p/mwspring/code/1111/ ) or from rapid (mcl:test).

Nuclear meltdown projectile is set to alwaysvisible when spawned but disappears when you lose LOS on the area.
Steps To ReproduceAny mech when destroyed with excess heat will spawn a nuclear meltdown CEG.

I would recommend;

1. /give is_catapult_ctplt1 and have it attack ground outside of LRM minimum range
2. /give is_flea_fle17 1 next to the catapult and watch it flamer
3. catapult dies and screams "Nuuuuuuuuuke", spawns nuke
4. Nuke disappears along with catapult LOS
5. You can /spectator to see the full CEG
Additional InformationCode used:

local x,y,z = Spring.GetUnitPosition(unitID)
local nukeID = Spring.SpawnProjectile(WeaponDefNames["meltdown"].id, {pos = {x,y,z}, owner = unitID, ttl = 5})
Spring.SetProjectileAlwaysVisible(nukeID, true)

I also tried catching it with Script.SetWatchWeapon and ProjectileCreated, there was no difference in behaviour.
TagsNo tags attached.
Checked infolog.txt for lua Errors
Attached Files

-Relationships
+Relationships

-Notes

~0013473

FLOZi (reporter)

Last edited: 2014-08-06 03:15

View 6 revisions

Ok, when i use the same CEG as the explosion generator for a weapon, it displays correctly outside of LOS, so I guess instead it is a flaw with / with how i'm using Spring.SpawnProjectile.

If I'm being really dumb, please point out my error

edit: Using it directly as a death explosion doesn't work either, so there must be some key difference between the way a death explosion works and a projectile explosion?

Perhaps here: https://github.com/spring/spring/blob/develop/rts/Rendering/ProjectileDrawer.cpp#L439

I am already setting owner in params though without success - I guess the problem is because the owner dies when used as a death explosion or by the way I'm calling it, so that it does not become visible. Should L439 just check for alwaysVisible at that point??

edit2: confirmed that is the problem, have a lua workaround for MCL by setting an indestructible beacon as the owner. Tried adding pro->alwaysVisible check to L439 and that didn't work.

~0013482

FLOZi (reporter)

Having futzed about a bit with the code, it does seem that projectile alwaysVisible isn't being set correctly, I can only get the CEG to render when it has a living ownerID

~0013510

FLOZi (reporter)

Can be closed due to https://github.com/spring/spring/commit/1689bcb7c0a736d82e6d78e30d0bfa64add0a9d1

~0016607

FLOZi (reporter)

Last edited: 2016-08-11 01:00

View 2 revisions

Sigh, in fact, this is not fully resolved. Only groundflash really works properly, probably due to https://github.com/spring/spring/blob/develop/rts/Rendering/Env/Particles/ProjectileDrawer.cpp#L739

I'm still having to use my hack and that doesn't work unless you put a whacking big Sleep in, something to do with LOS coverage.

~0016608

FLOZi (reporter)

Easier steps for reproducing:

Using latest mcl:test

1. /cheat /give 9 garrison_fs 1, on your starting beacon
2. Order a mech (queue up, hit submit)
3. Watch the turrets kill the dropship
4. Dropship hits ground and goes boom.
5. Nuke cloud dissapears with unit, only groundflash remains visible

~0016628

hokomoko (developer)

seems that LoS wasn't the prohibiting factor this time but the number of particles.
+Notes

+Related Changesets

-Issue History
Date Modified Username Field Change
2014-08-03 14:28 FLOZi New Issue
2014-08-06 00:53 FLOZi Note Added: 0013473
2014-08-06 01:10 FLOZi Note Edited: 0013473 View Revisions
2014-08-06 02:25 FLOZi Note Edited: 0013473 View Revisions
2014-08-06 03:03 FLOZi Note Edited: 0013473 View Revisions
2014-08-06 03:04 FLOZi Note Edited: 0013473 View Revisions
2014-08-06 03:15 FLOZi Note Edited: 0013473 View Revisions
2014-08-06 19:43 FLOZi Note Added: 0013482
2014-08-14 19:17 FLOZi Note Added: 0013510
2014-08-14 19:21 jK Status new => resolved
2014-08-14 19:21 jK Resolution open => fixed
2014-08-14 19:21 jK Assigned To => jK
2016-08-11 00:59 FLOZi Note Added: 0016607
2016-08-11 00:59 FLOZi Status resolved => feedback
2016-08-11 00:59 FLOZi Resolution fixed => reopened
2016-08-11 01:00 FLOZi Note Edited: 0016607 View Revisions
2016-08-11 13:06 FLOZi Note Added: 0016608
2016-08-11 13:06 FLOZi Status feedback => assigned
2016-08-11 13:07 hokomoko Assigned To jK => hokomoko
2016-08-26 19:19 hokomoko Changeset attached => spring develop ab2157c3
2016-08-26 19:19 hokomoko Note Added: 0016628
2016-08-26 19:19 hokomoko Status assigned => feedback
2016-08-26 19:48 hokomoko Status feedback => resolved
2016-08-26 19:48 hokomoko Resolution reopened => fixed
+Issue History