11-30-2006, 10:10 AM,
|
|
rookie1
Member
|
Posts: 231
Threads: 32
Joined: Nov 2006
|
|
Multiple start positions
I've added support for multiple start positions in r1399. track.txt file need to be changed to add the additional start positions. I've only added 1 more start position in Jarama as a test. Please try it out.
The start positions are in the following format,
start position 0 = 3.516043,28.989994,-34.820953
start position 1 = -2.083957,28.989994,-38.820953
start position 2 = ....
.
.
.
The program will fall back to the old behaviour if track.txt file is not changed. Cars are placed on the starting grid in the same sequence they are created in game.
|
|
12-02-2006, 02:56 AM,
|
|
rookie1
Member
|
Posts: 231
Threads: 32
Joined: Nov 2006
|
|
I've made the change to track editor to support multiple start positions. 'L' key will add the current camera position to the list of start locations. 'K' key will remove the last added start location.
Unfortunately I'm not sure how to use the track editor. Maybe I can commit the change and someone else familiar with the track editor can test it out?
|
|
12-02-2006, 12:46 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
thelusiv Wrote:alex25 uses the track editor a good bit, maybe he will test this out.
i'll give it a try once it's checked in. and speaking of fixes, we should also get dof2joe to output the new listedit format (14 parameters instead of 10) and listedit to add the track friction coefficients to track.txt. i don't know if i can commit things to the editor part of vdrift.
--alex--
|
|
12-02-2006, 06:47 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
thelusiv Wrote:Alex, when I get home later on I'll set you up with SVN commit access on the Track editor branch.
thanks, let me know when it's done.
--alex--
|
|
12-02-2006, 10:06 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
thelusiv Wrote:OK, done!
thanks.
--alex--
|
|
12-02-2006, 10:46 PM,
|
|
rookie1
Member
|
Posts: 231
Threads: 32
Joined: Nov 2006
|
|
Track editor support for multiple start locations committed. Alex, please test it out and let me know if you encounter any problem.
|
|
12-08-2006, 06:57 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
rookie1 Wrote:Track editor support for multiple start locations committed. Alex, please test it out and let me know if you encounter any problem. i finally got a chance to work on this. there is a little bug, such that start position 0 is always at 0,0,0 and all the other start positions get added after that. also i discovered that if you press k too many times, you get a seg fault on exit, presumably because the start position index is negative or something like that.
--alex--
|
|
12-08-2006, 07:22 PM,
|
|
alex25
Senior Member
|
Posts: 531
Threads: 42
Joined: Jun 2006
|
|
alex25 Wrote:there is a little bug, such that start position 0 is always at 0,0,0 and all the other start positions get added after that. i think i know where the problem is. in track.cpp line 505 there is the following code:
Code: if (index == 0) //still using the old format
{
trackconfig.GetParam("start position", tvert);
sl.Set(tvert);
SetStart(sl);
}
sice we are creating a new track the index is zero so we end up inserting a false start (which happens to be (0,0,0) but since tvert is not initialized it can be anything). it think the code should be:
Code: if (index == 0) //still using the old format
{
if (trackconfig.GetParam("start position", tvert))
{
sl.Set(tvert);
SetStart(sl);
}
}
--alex--
|
|
12-10-2006, 06:01 AM,
|
|
rookie1
Member
|
Posts: 231
Threads: 32
Joined: Nov 2006
|
|
I've fixed the bug of seg fault when 'k' is pressed too many times. Didn't check whether the vector is empty before calling pop_back(). I'd assumed vector class would be intelligent enough to handle that. :oops:
Regarding starting orientation, my initial thought was that races will always start on a straight line. If there are indeed cases where race is started on a turn, multiple starting orientation can certainly be added.
|
|
|