Simu - removed "cheats", standardising friction/aero across all skill levels

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

Former-commit-id: 4a752ef4db7f02b856e5b4eeeed001b037eb184f
Former-commit-id: c8fd2f02ea56c9e73f833f5ff231d638bd35265f
This commit is contained in:
andrewsumner 2009-07-06 03:21:34 +00:00
parent 0b9f0c3d9f
commit bd1b206667
4 changed files with 18 additions and 5 deletions

View file

@ -27,6 +27,8 @@
#include "sim.h"
//tdble simDammageFactor[] = {0.0f, 0.5f, 0.8f, 1.0f, 1.0f};
tdble simDammageFactor[] = {0.0f, 0.5f, 0.8f, 1.0f, 1.0f};
tdble simSkidFactor[] = {0.40f, 0.35f, 0.3f, 0.0f, 0.0f};
//tdble simSkidFactor[] = {0.40f, 0.35f, 0.3f, 0.0f, 0.0f};
tdble simSkidFactor[] = {0.00f, 0.00f, 0.0f, 0.0f, 0.0f};

View file

@ -291,7 +291,11 @@ static void SimCarCollideResponse(void * /*dummy*/, DtObjectRef obj1, DtObjectRe
}
if ((car[i]->carElt->_state & RM_CAR_STATE_FINISH) == 0) {
car[i]->dammage += (int)(CAR_DAMMAGE * fabs(j) * damFactor * simDammageFactor[car[i]->carElt->_skillLevel]);
float dammage = (CAR_DAMMAGE * fabs(j) * damFactor * simDammageFactor[car[i]->carElt->_skillLevel]);
dammage *= MIN(1.5, dammage / 500.0);
if (dammage < 10)
dammage = 0;
car[i]->dammage += (int)(dammage);
}
// Compute collision velocity.

View file

@ -33,6 +33,8 @@ void SimulationOptions::SetFromSkill (int skill)
option_list.Set(PRM_DAMAGE_SUSPENSION, false);
option_list.Set(PRM_DAMAGE_ALIGNMENT, true);
option_list.Set(PRM_DAMAGE_AERO, false);
option_list.Set(PRM_MODEL_AERO_FACTOR, 1.0f);
option_list.Set(PRM_MODEL_AEROFLOW, SIMPLE);
option_list.Set(PRM_MODEL_TYRE_TEMPERATURE, false);
break;
case 2:
@ -40,13 +42,17 @@ void SimulationOptions::SetFromSkill (int skill)
option_list.Set(PRM_DAMAGE_SUSPENSION, false);
option_list.Set(PRM_DAMAGE_ALIGNMENT, true);
option_list.Set(PRM_DAMAGE_AERO, false);
option_list.Set(PRM_MODEL_AERO_FACTOR, 1.0f);
option_list.Set(PRM_MODEL_AEROFLOW, SIMPLE);
option_list.Set(PRM_MODEL_TYRE_TEMPERATURE, false);
break;
case 3:
option_list.Set(PRM_DAMAGE_TYRES, 0.0f);
option_list.Set(PRM_DAMAGE_SUSPENSION, true);
option_list.Set(PRM_DAMAGE_SUSPENSION, false);
//option_list.Set(PRM_DAMAGE_SUSPENSION, true);
option_list.Set(PRM_DAMAGE_ALIGNMENT, true);
option_list.Set(PRM_DAMAGE_AERO, true);
option_list.Set(PRM_DAMAGE_AERO, false);
//option_list.Set(PRM_DAMAGE_AERO, true);
option_list.Set(PRM_MODEL_TYRE_TEMPERATURE, false);
option_list.Set(PRM_MODEL_AERO_FACTOR, 1.0f);
option_list.Set(PRM_MODEL_AEROFLOW, SIMPLE);

View file

@ -29,4 +29,5 @@
tdble simDammageFactor[] = {0.0f, 0.5f, 0.8f, 1.0f, 1.0f};
tdble simSkidFactor[] = {0.40f, 0.35f, 0.3f, 0.0f, 0.0f};
//tdble simSkidFactor[] = {0.40f, 0.35f, 0.3f, 0.0f, 0.0f};
tdble simSkidFactor[] = {0.00f, 0.00f, 0.0f, 0.0f, 0.0f};