Page 2 of 3
Posted: 08 Feb 2007, 02:32
by smoth
Most likely. Spring doesn't have an abstract weapon class. So several cases are made where by it determines behavoir.
The problem comes in with the:
Trajectoryheight=1;
Making the weapon a missile.
This is the only way to get arced fire outside of high trajectory. The funny thing is acurracy offsets the target location a little behind the actuall target. However, the other weapons get a nice sorta random spread.
I am not really sure what to say because I didn't look at the code back when I was looking at writing a few patches.
Posted: 08 Feb 2007, 03:19
by MadRat
I've only used that trajectoryheight for guided weapons. I was under the impression a 1 value was perpindicularly straight up and not necessary aimed at the target. If you use an unguided rocket does that make it shoot straight up?
Can't test until this weekend. My windows pc is waiting parts and this linux machien has only 800mb left on the hard drive. Don't want to get greedy and screw up the only working machine I got to install it on.
edit - I bet the trajectoryheight patch was written with missiles in mind and that is where its broken. It probably supercedes the code for computing trajectory. The author probably didn't put in code for alternatives to missiles when using the tag. By default it probably assumes the guidance tag is on when computing trajectory and that is why it has perfect aim linearly speaking.
Posted: 08 Feb 2007, 03:53
by smoth
on a non guided weapon it arcs a shot. it was meant for balistics.
I think there was another tag for vertical launch(I do not use it so I cannot remember it

)
changelog wrote:Added missile tdf tag trajectoryHeight, this sets in how high an arc the missile will move toward the target,0 = straight, 1=45 degree above, can be anything>=0, default 0
Posted: 08 Feb 2007, 07:20
by yuritch
Actually, from the description it sounds like TrajectoryHeight is the tangent of the firing angle. So TrajectoryHeight=1 equals a 45 degrees angle, and 90 deg. angle would require TrajectoryHeight=infinity. Values less then 1.0 should give angles lower than 45 degrees (TrajectoryHeight=0.5 should give approx. 27 degrees).
Posted: 08 Feb 2007, 08:10
by smoth
correct.
Posted: 08 Feb 2007, 11:12
by KDR_11k
I've copied the two lines that handle inaccuracy in the EmgWeapon.cpp to the MissileLauncher.cpp, I think it should work but I can't get Spring to compile anymore (unrelated error, missing a .h for the sound system).
Posted: 09 Feb 2007, 02:42
by MadRat
Any luck on the recompile tonight, KDR_11k?
Posted: 09 Feb 2007, 08:48
by KDR_11k
Noone told me what I should do about that header file. It seems to be part of DirectX but the DX SDK is only for VC++.
Posted: 11 Feb 2007, 05:21
by MadRat
Don't give up! :)
Posted: 11 Feb 2007, 05:30
by FLOZi
if you send me the patch / post it on smoths forums i'll compile it
Posted: 11 Feb 2007, 07:55
by KDR_11k
Code: Select all
Index: MissileLauncher.cpp
===================================================================
--- MissileLauncher.cpp (revision 3404)
+++ MissileLauncher.cpp (working copy)
@@ -52,6 +52,11 @@
dir.Normalize();
}
}
+
+ dir+=(gs->randVector()*sprayangle+salvoError)*(1-owner->limExperience*0.5f); //Applies the weapon's
+ //inaccuracy to the projectile
+ dir.Normalize();
+
float3 startSpeed=dir*weaponDef->startvelocity;
if(onlyForward && dynamic_cast<CAirMoveType*>(owner->moveType))
startSpeed+=owner->speed;
As I said, just a simple copy and paste from another file.
Posted: 11 Feb 2007, 15:37
by KDR_11k
Flozi made a test build, I haven't tested it that thoroughly but it appears to work, missiles now spread like other weapons.
Posted: 11 Feb 2007, 20:43
by Fanger
WOOT
Posted: 11 Feb 2007, 21:13
by Argh
Great, between that and Wobble I can do some very funky stuff

Posted: 11 Feb 2007, 22:12
by MadRat
Technically on a guided missile it should only initially aim away from the target, right?
I would think it would apply regardless if guided or unguided at launch, but still guide the same way to the target post-launch.
Posted: 11 Feb 2007, 22:17
by Guessmyname
You mean you couldn't already?
Posted: 11 Feb 2007, 22:44
by KDR_11k
I haven't tried what happens with guided missiles but I'd expect them to just turn towards their target after launch.
Posted: 11 Feb 2007, 23:06
by Guessmyname
That would be cool
Posted: 11 Feb 2007, 23:17
by Fanger
MACROSS MISSILES!!!!!
THRUST VECTORING!!
WEE..
all good stuff..
Posted: 12 Feb 2007, 01:50
by Noruas
Now all we need is lasers that wobble as well as the image itself, then itd look sick.