Skip to content

Commit

Permalink
fix rear lights -lit, rework boost pos wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cryham committed May 2, 2024
1 parent 9473039 commit 0b28eb8
Show file tree
Hide file tree
Showing 26 changed files with 126 additions and 141 deletions.
4 changes: 2 additions & 2 deletions data/carsim/easy/cars/R3.car
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ brake-color = 1, 0.1, 0

[ model_ofs ]
rot_fix = on
boost-z = -0.30
boost-y = -1.60
boost0-pos = 0.22, -1.576, 0.61
boost1-pos =-0.22, -1.576, 0.61
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/3B.car
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.25
boost-y = -0.84
boost-z = 1.55
boost-size-z = 0.42
boost0-pos = 0.516, -2.726, 0.335
boost1-pos =-0.519, -2.726, 0.335
boost-name = BoostViol
exhaust-x = 2.2
exhaust-y = 0.4
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/BE.car
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.03
boost-y = 0.3
boost-z = 0.45
boost-size-z = 1.15
boost0-pos = 0.213, -1.112, -0.398
boost1-pos =-0.206, -1.112, -0.398
boost-name = ThrusterV1s


Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/BV.car
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ brake-lit3 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.2
boost-y = -0.25
boost-z = 0.0
boost-size-z = 0.5
boost0-pos = 0.310, -1.776, 0.132
boost1-pos =-0.277, -1.776, 0.132

# collision shape params
#---------------------------
Expand Down
4 changes: 2 additions & 2 deletions data/carsim/normal/cars/H1.car
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ brake-lit0 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.00
boost-y = -1.40
boost0-pos = 0.52, -1.62, 0.17
boost1-pos =-0.52, -1.62, 0.17
interior-x = 0.0
interior-y = 0.0
interior-z = 0
Expand Down
4 changes: 2 additions & 2 deletions data/carsim/normal/cars/H2.car
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-z = -0.20
boost-y = -1.30
boost0-pos = 0.534, -1.821, 0.124
boost1-pos =-0.537, -1.821, 0.124
interior-x = 0.0
interior-y = 0.0
interior-z = 0
Expand Down
6 changes: 3 additions & 3 deletions data/carsim/normal/cars/HI.car
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ brake-lit0 = 1
brake-lit1 = 1

[ model_ofs ]
boost-x = 0.0
boost-y = 0.0
boost-z = 0.0
boost0-pos = 0.733, -1.915, 0.016
boost1-pos =-0.723, -1.915, 0.016
#boost-clr = 0.0, 0.2, 0.7
exhaust-x = 2.4
exhaust-y = 0.52
exhaust-z = 0.45
Expand Down
10 changes: 3 additions & 7 deletions data/carsim/normal/cars/Q1.car
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ brake-lit0 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.10
boost-y = -0.40
boost-size-z = 0.66
boost0-pos = 0.274, -0.752, -0.029
boost1-pos =-0.289, -0.752, -0.029
boost1-clr = 0.4, 0.9, 0.9
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
interior-z = 0
exhaust-x = 0.0
exhaust-y = 0.0
exhaust-z = 0.0
exhaust-mirror-second = 1


# collision shape params
Expand Down
5 changes: 1 addition & 4 deletions data/carsim/normal/cars/Q3.car
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ brake-lit0 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.10
boost-y = -0.40
boost-z = -0.14
boost-size-z = 0.0
boost0-pos = 0.022, -0.576, -0.001
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/R1.car
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.10
boost-y = -0.80
boost-z = 0.04
boost-size-z = 0.60
boost0-pos = 0.389, -2.315, 0.173
boost1-pos =-0.368, -2.315, 0.173
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/R2.car
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.10
boost-y = -1.40
boost-z = -0.35
boost-size-z = 0.40
boost0-pos = 0.218, -1.687, 0.352
boost1-pos =-0.215, -1.687, 0.352
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
Expand Down
4 changes: 2 additions & 2 deletions data/carsim/normal/cars/R3.car
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-z = -0.30
boost-y = -1.60
boost0-pos = 0.55, -1.91, 0.4
boost1-pos =-0.55, -1.91, 0.4
boost-name = BoostCyan
interior-x = 0.0
interior-y = 0.0
Expand Down
7 changes: 3 additions & 4 deletions data/carsim/normal/cars/SX.car
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ brake-lit0 = 1
brake-lit1 = 1

[ model_ofs ]
boost-x = 0.0
boost-y = 0.0
boost-z = 0.0
boost0-pos = 0.544, -1.91, -0.024
boost1-pos = -0.547, -1.91, -0.024
exhaust-x = 2.4
exhaust-y = 0.52
exhaust-z = 0.45
exhaust-mirror-second = 1
k

# collision shape params
#---------------------------
[ collision ]
Expand Down
5 changes: 2 additions & 3 deletions data/carsim/normal/cars/SZ.car
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.3
boost-y = -0.6
boost-z = -0.5
boost0-pos = 0.574, -1.515, 0.027
boost1-pos =-0.599, -1.515, 0.027
exhaust-x = 2.4
exhaust-y = 0.52
exhaust-z = 0.45
Expand Down
7 changes: 2 additions & 5 deletions data/carsim/normal/cars/TU.car
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.0
boost-z = 0.655
boost-y = 0.57
boost-size-z = 0
boost0-pos = 0.006, -2.119, -0.412
boost-name = BoostViol
boost-clr = 0.1, 0.0, 1.0
boost-clr = 0.1, 0.05, 1.0
exhaust-x = 0.0
exhaust-y = 0.45
exhaust-z = 0.56
Expand Down
9 changes: 3 additions & 6 deletions data/carsim/normal/cars/TW.car
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@ lights = 2
brake-pos0 = 0.65,-1.56, 0.33
brake-pos1 =-0.65,-1.56, 0.33
brake-size = 0.6
brake-color = 1, 0.04, 0
brake-color = 1, 0.0, 0
brake-lit0 = 1
brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.3
boost-z = 0.09
boost-y = -0.26
boost-size-z = 0
boost0-pos = 0.005, -1.97, -0.135
boost-name = BoostRed
boost-clr = 1.0, 0.8, 0.0
boost-clr = 1.0, 0.2, 0.0
exhaust-x = 2.2
exhaust-y = 0.45
exhaust-z = 0.56
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/U6.car
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ brake-lit3 = 1

[ model_ofs ]
rot_fix = on
boost-x = 0.2
boost-y = -0.31
boost-z = 0.06
boost-size-z = 0.55
boost-name = BoostViol
boost0-pos = 0.253, -1.61, 0.131
boost1-pos = -0.267, -1.61, 0.131

# collision shape params
#---------------------------
Expand Down
10 changes: 6 additions & 4 deletions data/carsim/normal/cars/V1.car
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,18 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.45
boost-y = 0.13
boost-z = -0.63
boost-size-z = 0.49
boost0-pos = 0.353, -1.061, -0.236
boost1-pos =-0.334, -1.061, -0.236
boost-name = ThrusterV1s
boost-clr = 0, 0.1, 1

thrust-x = 1.03
thrust-y = 0.065
thrust-z = 0.015
thrust-size-z = 0
thrust-name = ThrusterV1
thrust-clr = 0, 0.6, 1
thrust-lit = 1


# collision shape params
Expand Down
8 changes: 4 additions & 4 deletions data/carsim/normal/cars/V2.car
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.26
boost-y = -0.70
boost-z = -0.84
boost-size-z = 0.34
boost-name = ThrusterV1
boost-clr = 0, 1, 1
boost0-pos = 0.267, -0.61, 0.27
boost1-pos =-0.267, -0.61, 0.27

thrust-x = 0.66
thrust-y = -0.27
thrust-z = 0.285
thrust-size-z = 0.285
thrust-name = ThrusterV2
thrust-clr = 0.0, 1.0, 0.5
thrust-lit = 1


# collision shape params
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/V3.car
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ brake-lit0 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.1
boost-y = -0.52
boost-z = -0.43
boost-size-z = 0.32
boost0-pos = 0.265, -1.53, -0.14
boost1-pos =-0.248, -1.53, -0.14
boost-name = ThrusterV1
boost-clr = 0.4, 1, 1
thrust-clr = 0.1, 0.5, 1
Expand Down
4 changes: 2 additions & 2 deletions data/carsim/normal/cars/XZ.car
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.22
boost-z = -0.33
boost0-pos = 0.622, -2.08, -0.255
boost1-pos =-0.622, -2.08, -0.255
interior-x = 0.05
interior-y = 0.083
interior-z = 0
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/Y7.car
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ brake-lit1 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.3
boost-z = -0.55
boost-y = 0.14
boost-size-z = 0.4
boost0-pos = 0.295, -2.08, -0.253
boost1-pos =-0.285, -2.08, -0.253

# collision shape params
#---------------------------
Expand Down
6 changes: 2 additions & 4 deletions data/carsim/normal/cars/YG.car
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ brake-lit5 = 1

[ model_ofs ]
rot_fix = on
boost-x = -0.1
boost-z = -0.08
boost-y = 0.35
boost-size-z = 0.4
boost0-pos = 0.253, -1.956, -0.231
boost1-pos =-0.267, -1.956, -0.231

# collision shape params
#---------------------------
Expand Down
12 changes: 7 additions & 5 deletions src/game/CarModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,16 @@ class CarModel
struct FlareSet
{
std::vector<Ogre::Vector3> pos;
std::vector<int> lit; // same size
float size = 0.2f;
Ogre::ColourValue clr{1,1,1,1};
int lit = 0;
}
fsBrakes, fsFlares;

// 💨🔥 boost --------
float boostOfs[3], boostSizeZ, boostClr[3], thrustClr[3]; // ligth clr
int boostCnt;
Ogre::Vector3 boostPos[2];
float boostOfs[2][3], boostSizeZ, boostClr[3], thrustClr[3]; // light clr
std::string sBoostParName, sThrusterPar[PAR_THRUST];
float thrusterOfs[PAR_THRUST][3], thrusterSizeZ[PAR_THRUST];
int thrusterLit[PAR_THRUST];
Expand All @@ -109,9 +111,9 @@ class CarModel
bool bRotFix =0;

// 💨 exhaust position for boost particles-
bool manualExhaustPos; // if true, use values below, if false, guess from bounding box
bool has2exhausts; // car has 2nd exhaust, if true, mirror exhaust 1 for position
float exhaustPos[3]; // position of first exhaust
// bool manualExhaustPos; // if true, use values below, if false, guess from bounding box
// bool has2exhausts; // car has 2nd exhaust, if true, mirror exhaust 1 for position
// float exhaustPos[3]; // position of first exhaust


/// 🆕 Create ------------------------
Expand Down
Loading

0 comments on commit 0b28eb8

Please sign in to comment.