New CEG Operator: OP_RADIUS

New CEG Operator: OP_RADIUS

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

New CEG Operator: OP_RADIUS

Post by Evil4Zerggin »

If possible, I (and most likely other people) would like a new CEG operator, OP_RADIUS. This would multiply the operand by the radius of the explosion. Also helpful would be a unit variable cegRadius and a COB constant CEG_RADIUS to get/set it.

As far as I can tell, the relevant files are:
rts\Sim\Projectiles\ExplosionGenerator.h
rts\Sim\Projectiles\ExplosionGenerator.cpp

The code that executes the CEG code.

rts\Sim\Units\Unit.h
rts\Sim\Units\Unit.cpp

To add the cegRadius variable.

rts\Sim\Units\COB\COBInstance.cpp
COB access to cegRadius.

We'd probably have to assign it a strange letter since 'r', 'a', 'd', 'i', and 's' are already taken. Maybe 'u'?

A wind ('w'?) and/or a gravity ('g'?) operator would also be nice, but radius is the most helpful since people generally want their explosions to match the radius of the weapon without having to define a separate explosion for each radius.

I should really figure out how to build Spring >_>... I did rewrite the wiki's CEG documentation at least.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: New CEG Operator: OP_RADIUS

Post by KDR_11k »

I think wind and gravity should be lumped into an operator along with direction (one op with different numbers selecting different components of different vectors). It's probably not the most intuitive way but at least it leaves us with more letters to work with in the future.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: New CEG Operator: OP_RADIUS

Post by Evil4Zerggin »

So you're suggesting an operator, let's call it 'v' for the moment, such that, say, v0, v1, and v2 select the elements of dir, v3, v4, v5 select the elements of wind, and so on? I think that's a great idea--it would get past the problem that at current dir can only be used to specify an entire float3. In addition to saving letters, this would also allow multiplying dir by a scalar; for example, spawning CEGs on a line using CExpGenSpawner.
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: New CEG Operator: OP_RADIUS

Post by REVENGE »

++++++++++++++++++++ +++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ ++++++

KDR's suggestion ftw.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: New CEG Operator: OP_RADIUS

Post by Tobi »

Unbroke forum by inserting spaces between your pluses.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: New CEG Operator: OP_RADIUS

Post by lurker »

Rather oddly placed spaces.
Post Reply

Return to “Feature Requests”