rename morley plus driver enhancements

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@3654 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: a678785b876e032d4df2efe71a2ca718b393a884
Former-commit-id: 10e91b697522c73aa1fd1fa063817580cdb97d26
This commit is contained in:
andrewsumner 2011-06-03 01:59:12 +00:00
parent adbfd5cdad
commit 0f1f3011e0
3 changed files with 123 additions and 10 deletions

View file

@ -98,7 +98,7 @@ ROBOT_DATA(NAME usr_ls1 PREFIX usr_ls1
SET(ROBOT_SUBDIRS 1 2 3 4 5 6 7 8 9 10 11 12 13 14
ls2-bavaria-g3gtr ls2-boxer-96rsr
ls2-cavallo-360r ls2-condor-c400r
ls2-morley-R900 ls2-sprite-gts
ls2-morley-r900 ls2-sprite-gts
ls2-vortex-gt ls2-lynx-xkr
tracks)

View file

@ -481,13 +481,36 @@ void LRaceLine::SplitTrack(tTrack *ptrack, int rl)
while (psegside != NULL)
{
if (psegside->style == TR_WALL || psegside->style == TR_FENCE)
margin = MAX(0.0, margin - (psegCurrent->type == TR_STR ? 0.5 : 1.0));
{
if (psegCurrent->type == TR_STR)
{
margin = MAX(0.0, margin - 0.5);
}
else
{
if ((psegCurrent->type == TR_LFT && side == TR_SIDE_LFT) ||
(psegCurrent->type == TR_RGT && side == TR_SIDE_RGT))
margin = MAX(0.0, margin - 1.5);
else
margin = MAX(0.0, margin - 0.5);
}
}
if (psegside->style != TR_PLAN ||
psegside->surface->kFriction < psegCurrent->surface->kFriction*0.8 ||
psegside->surface->kRoughness > MAX(0.02, psegCurrent->surface->kRoughness*1.2) ||
psegside->surface->kRollRes > MAX(0.005, psegCurrent->surface->kRollRes*1.2))
if (psegside->style == TR_WALL || psegside->style == TR_FENCE)
break;
if (psegside->style == TR_PLAN &&
(psegside->surface->kFriction < psegCurrent->surface->kFriction*0.8 ||
(psegside->surface->kRoughness > MAX(0.02, psegCurrent->surface->kRoughness+0.05)) ||
(psegside->surface->kRollRes > MAX(0.005, psegCurrent->surface->kRollRes+0.03))))
break;
if (psegside->style == TR_CURB &&
(psegside->surface->kFriction >= psegCurrent->surface->kFriction * 0.9 &&
psegside->surface->kRoughness <= psegCurrent->surface->kRoughness + 0.05 &&
psegside->surface->kRollRes <= psegCurrent->surface->kRollRes * 0.03 &&
psegside->height <= psegside->width/10))
break;
if (ptrack->pits.type != TR_PIT_NONE)
{
@ -510,9 +533,12 @@ void LRaceLine::SplitTrack(tTrack *ptrack, int rl)
double thiswidth = MIN(psegside->startWidth, psegside->endWidth) * 1.0;
if (psegCurrent->type == TR_STR)
if ((side == TR_SIDE_LFT && (psegCurrent->type == TR_RGT || psegCurrent->next->type != TR_LFT)) ||
(side == TR_SIDE_RGT && (psegCurrent->type == TR_LFT || psegCurrent->next->type != TR_RGT)))
thiswidth *= 0.6;
if ((side == TR_SIDE_LFT && psegCurrent->type == TR_LFT && psegside->style == TR_CURB) ||
(side == TR_SIDE_RGT && psegCurrent->type == TR_RGT && psegside->style == TR_CURB))
thiswidth *= 0.5;
else if ((side == TR_SIDE_LFT && (psegCurrent->type == TR_RGT || psegCurrent->next->type != TR_LFT)) ||
(side == TR_SIDE_RGT && (psegCurrent->type == TR_LFT || psegCurrent->next->type != TR_RGT)))
thiswidth *= 0.8;
margin += thiswidth;
psegside = psegside->side[side];
}
@ -940,7 +966,15 @@ void LRaceLine::CalcZCurvature(int rl)
if (rl == LINE_MID)
camber *= 2;
}
double slope = camber + zd/3 * SlopeFactor;
double slope = camber + zd/3 * SlopeFactor;
if (rl != LINE_RL)
{
if (slope < 0.0)
slope *= 1.4;
else
slope *= 0.7;
}
SRL[rl].tFriction[i] *= 1.0 + MAX(-0.4, slope);
if (slope < 0.0)

View file

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
file : viper-gts-r.xml
created : Sat Mar 3 18:46:37 CET 2001
copyright : (C) 2001 by Eric Espié
email : Eric.Espie@torcs.org
version : $Id: default.xml 3094 2010-11-05 23:45:40Z kmetykog $
-->
<!-- This program is free software; you can redistribute it and/or modify -->
<!-- it under the terms of the GNU General Public License as published by -->
<!-- the Free Software Foundation; either version 2 of the License, or -->
<!-- (at your option) any later version. -->
<!DOCTYPE params SYSTEM "../../../../src/libs/tgf/params.dtd">
<params name="Viper GTS-R" type="template">
<section name="private">
<attnum name="min corner inverse" min="0" max="2" val="0.0008"/>
<attnum name="increase corner inverse" min="0" max="2" val="0.045"/>
<attnum name="add avoid speed" min="-20" max="20" val="0.0"/>
<attnum name="avoid speed factor" min="-20" max="20" val="0.75"/>
<attnum name="avoid brake factor" min="-20" max="20" val="0.78"/>
<attnum name="exit boost factor" min="-20" max="20" val="1.40"/>
<attnum name="avoid exit boost factor" min="-20" max="20" val="1.3"/>
<attnum name="brake margin" min="-20" max="20" val="1.0"/>
<attnum name="base speed factor" min="0.0" max="50.0" val="1.00"/>
<attnum name="base brake factor" min="0.0" max="50.0" val="0.90"/>
<attnum name="base speed" min="0.0" max="50.0" val="12.20"/>
<attnum name="base brake" min="10.0" max="100.0" val="21.00"/>
<attnum name="brake mod" min="0.0" max="1.0" val="1.00"/>
<attnum name="steer mod" min="0.0" max="1.0" val="1.00"/>
<attnum name="slope factor" min="0.0" max="1.0" val="0.80"/>
<attnum name="accel exit" min="0.0" max="10.0" val="0.50"/>
<attnum name="turn decel" min="0" max="2" val="0.8"/>
<attnum name="curve factor" min="0" max="2" val="0.13"/>
<attnum name="accel curve" min="0" max="2" val="1.20"/>
<attnum name="accel curve limit" min="0" max="6" val="1.5"/>
<attnum name="brake curve" min="0" max="2" val="0.80"/>
<attnum name="brake curve limit" min="0" max="6" val="3"/>
<attnum name="revs change up" min="0" max="2" val="0.82"/>
<attnum name="revs change down" min="0" max="2" val="0.62"/>
<attnum name="revs change down max" min="0" max="2" val="0.72"/>
<attnum name="steer skid" min="0" max="3" val="0.0"/>
<attnum name="steer gain" min="0" max="3" val="1.5"/>
<attnum name="max steer time" min="0.5" max="10" val="1.9"/>
<attnum name="min steer time" min="0.5" max="10" val="1.77"/>
<attnum name="int margin" min="0" max="3" val="1.7"/>
<attnum name="ext margin" min="0" max="2" val="1.3"/>
<attnum name="no team waiting" min="0" max="2" val="1"/>
<attnum name="inc factor" min="0" max="5" val="3.0"/>
<attnum name="overtake caution" min="-20" max="20" val="0.2"/>
<attnum name="tcl slip" min="0.5" max="8.5" val="4.0"/>
<attnum name="skid correction" min="0.0" max="8.5" val="0.5"/>
<attnum name="bump caution" min="0.0" max="4.0" val="0.4"/>
<attnum name="oversteer asr" min="-0.0" max="2.0" val="0.2"/>
<attnum name="side margin" min="0.0" max="4.0" val="1.0"/>
<attnum name="pit offset" min="-200.0" max="200.0" val="-50"/>
<attnum name="steer debug" min="-5" max="5" val="-1.0"/>
<attnum name="overtake debug" min="0" max="1" val="0"/>
<attnum name="raceline debug" min="0" max="1" val="0"/>
</section>
</params>