Re #307: Remove unused cosine calculation

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

Former-commit-id: 706b5c54c3ec6a654dc3f403b37fc21ccc60cba2
Former-commit-id: fb04b7622873413e32ca81ddde1eaf4f6d7facba
This commit is contained in:
kakukri 2011-02-05 19:25:22 +00:00
parent 86fda0d827
commit 2388da5346

View file

@ -89,14 +89,6 @@ SimAeroUpdate(tCar *car, tSituation *s)
tdble speed = sqrt(car->DynGC.vel.x*car->DynGC.vel.x + car->DynGC.vel.y*car->DynGC.vel.y); tdble speed = sqrt(car->DynGC.vel.x*car->DynGC.vel.x + car->DynGC.vel.y*car->DynGC.vel.y);
tdble cosa = 1.0f; tdble cosa = 1.0f;
if (speed > 1.0f) {
cosa = car->DynGC.vel.x/speed;
}
if (cosa < 0.0f) {
cosa = 0.0f;
}
car->aero.drag = -SIGN(car->DynGC.vel.x) * car->aero.SCx2 * v2 * (1.0f + (tdble)car->dammage / 10000.0f) * dragK * dragK; car->aero.drag = -SIGN(car->DynGC.vel.x) * car->aero.SCx2 * v2 * (1.0f + (tdble)car->dammage / 10000.0f) * dragK * dragK;
hm = 1.5f * (car->wheel[0].rideHeight + car->wheel[1].rideHeight + car->wheel[2].rideHeight + car->wheel[3].rideHeight); hm = 1.5f * (car->wheel[0].rideHeight + car->wheel[1].rideHeight + car->wheel[2].rideHeight + car->wheel[3].rideHeight);