SweepFire=1;

SweepFire=1;

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

SweepFire=1;

Post by smoth »

It ignores script locks(when the barrel is covered in grey it would normaly be locked via it's script), when the script lock does happen it fires off at an odd angle.

see video here: http://cs.selu.edu/~ssmith/spring/Movie_0003.wmv

If you guys could fix this it would be great, otherwise, I will need to remove it from my project. I would just work around it but I am not sure, I thought it was created so the unit would target other enemies and move to the next one when it's current was dead. What is the real usage?
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Re: SweepFire=1;

Post by Peet »

smoth wrote:I would just work around it but I am not sure, I thought it was created so the unit would target other enemies and move to the next one when it's current was dead. What is the real usage?
That's what it does for me...
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Post by Zpock »

It could use a lot of improvements of course, like making the laser motion blur.. now it looks really choppy when it's turning the laser around.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

Melee Forced Fire lasers!
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

So, has anyone looked into this?
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Maybe this video will get you worried

Post by Noruas »

Now imagine if all lasers dragged, and allies were getting hit by your own laser, which it does, you will understand something needs to be done.
http://spring.unknown-files.net/file/30 ... ng_Device/

Sure is a pretty though.
User avatar
Peet
Malcontent
Posts: 4383
Joined: 27 Feb 2006, 22:04

Post by Peet »

I believe it just causes problems when the firepoint of the weapon is moved by anything other than the aiming function, such as unit movement or other script functions.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

But then why is it aiming at the mountain?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I think air units don't properly tell their weapons how to aim.
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

It depends on the Z dir of the aimpiece being directed in the guns direction, maybe thats not true for that unit ? I only ever tested it with an annihilator.
User avatar
Noruas
XTA Developer
Posts: 1269
Joined: 24 Feb 2005, 02:58

Post by Noruas »

I am not exactly sure what you are asking... find the last beta of xta v8.1 and throw it in the latest svn, type .give ostr and you get that unit with the laser tag already on it.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

SJ: So basically it's like emit-sfx'ing the laser?
SJ
Posts: 618
Joined: 13 Aug 2004, 17:13

Post by SJ »

Sort of I suppose, there is no well defined way for the c++ code to ask the script where the gun is pointing, so the piece rotation dir seemed the most logical thing to use. Emitsfx uses the vector between the two first vertices in the piece though iirc.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

SJ wrote:Emitsfx uses the vector between the two first vertices in the piece though iirc.
Only for 3dos AFAIK and there may be some special handling for empties. s3os use the piece orientation.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Yeha made some changes to use object rotation now instead which is much more useful.

I'm pretty sure beamlasers need a start and end position (firepoint, target position) to get the direction from. I recommend to temporarily save the last target position and use it instead when there is no target. Or perhaps you can think of something without the need of a target position.

edit: Indeed.

BeamLaser.cpp

Code: Select all

wantedDir=targetPos-weaponPos;
wantedDir.Normalize();
Wouldn't it be possible to override wantedDir by using the piece rotation of the piece the weapon is being fired from? If you still need targetPos then perhaps weaponPos*weaponDef->range could work... or something like that. I know I suck at maths...
Post Reply

Return to “Engine”