Why does the lightning from lightning weapons now instantly disappear?

Why does the lightning from lightning weapons now instantly disappear?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Why does the lightning from lightning weapons now instantly disappear?

Post by Forboding Angel »

It used to hang around for a moment before disappearing. Now it disappears almost instantly.

I've tried duration and on the offchance beamtime. Neither do anything. Is there any way to control this?
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Why does the lightning from lightning weapons now instantly disappear?

Post by Google_Frog »

I recall this issue from a while ago, I patched it quickly. From my weapondefs_posts.lua

Code: Select all

-- https://github.com/spring/spring/commit/dd7d1f79c3a9b579f874c210eb4c2a8ae7b72a16
for _, weaponDef in pairs(WeaponDefs) do
	if ((weaponDef.weapontype == "LightningCannon") and (not weaponDef.beamttl)) then
		weaponDef.beamttl = 10
	end
end
You were looking for a visual, since it has no effect on sim: https://springrts.com/wiki/Gamedev:Weap ... er_Visuals
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Why does the lightning from lightning weapons now instantly disappear?

Post by Forboding Angel »

Why is ttl for lightning stuck under beamlaser visuals? :-/
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Why does the lightning from lightning weapons now instantly disappear?

Post by Kloot »

because 1) lightning-cannon ttl used to be hardcoded to 10 frames up until 98.0 and 2) there is a policy of not introducing spurious new *def tags.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Why does the lightning from lightning weapons now instantly disappear?

Post by FLOZi »

And as such, the wiki page is a 'put it in the most relevant place' display of tags unless you want me to turn it into a massive Venn diagram. :P The two way table linked in https://springrts.com/wiki/Gamedev:Weap ... weaponType has further detail, though it looks like it has been vandalised or something as BeamLaser is missing. Anyway I updated it to reflect that beamTTL has meaning for LightningCannon (it's on weapons not visuals tab which suggests it has more than purely visual impact for BeamLaser)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Why does the lightning from lightning weapons now instantly disappear?

Post by Forboding Angel »

Kloot wrote:because 1) lightning-cannon ttl used to be hardcoded to 10 frames up until 98.0 and 2) there is a policy of not introducing spurious new *def tags.
Thanks for that, kloot :-)

Same @ Flozi :-)
Post Reply

Return to “Game Development”