HomeWildfire Games

Let the template define the actor used for the projectile. Also let projectiles…

Description

Let the template define the actor used for the projectile. Also let projectiles have an impact animation (such as an explosion).

This will enable us in the future to have technologies that change projectiles.
This is also somewhat of a refactoring.

Patch By: Mate-86

Reviewed By: wraitii

Trac Tickets: #1909

Differential Revision: https://code.wildfiregames.com/D945

Event Timeline

elexis added a subscriber: elexis.Dec 23 2017, 11:40 AM

Thanks for the patch and review, an important feature!

/ps/trunk/binaries/data/mods/public/simulation/components/Attack.js
540

Aren't those mandatory properties?

556

(> 0 unneeded)

wraitii added inline comments.Dec 23 2017, 11:43 AM
/ps/trunk/binaries/data/mods/public/simulation/components/Attack.js
540

Not yet. Could be changed after D1171 imo.

elexis added inline comments.Dec 23 2017, 11:47 AM
/ps/trunk/binaries/data/mods/public/simulation/components/Attack.js
540

One can specify a Projectile without an ActorName?

wraitii added inline comments.Dec 23 2017, 11:58 AM
/ps/trunk/binaries/data/mods/public/simulation/components/Attack.js
540

Yes, see L552 we fall back to the visual actor (for now, though we may keep the behaviour).

elexis added inline comments.Dec 23 2017, 12:06 PM
/ps/trunk/binaries/data/mods/public/simulation/components/Attack.js
540

That sounds kind of problematic.
Not applying the [[https://en.wikipedia.org/wiki/Single_source_of_truth|single source of truth pattern) here means someone specifies the projectile in the actor but then the template changes it.

Same for the launch point. Specifying it either in the actor or in the simulation template, means there can't be any confusion or contradiction.