Remove registration checks

Still not complete. See d158e10c
This commit is contained in:
maride 2016-04-02 15:19:10 +02:00
parent be96c43b4b
commit c05119a2da
3 changed files with 2 additions and 61 deletions

View File

@ -279,13 +279,9 @@ void ControlEntityUserInput(tGameEntity *entity)
tCarPhysics *phys=(tCarPhysics*)entity->physics;
tCarDefinition *car=&(phys->car);
int isValid=true;
float velo=~entity->velo;
float driveSlip=0,slip=0,angularVelo=0;
int wheelsOnGround=0;
int valid=true;
if((car->demoAvailable-car->numColors!=1)&&(entity==gCarEntities[gGameInfo->playerID]))
isValid=false;
for(int i=0;i<car->numWheels;i++)
{
@ -297,8 +293,6 @@ void ControlEntityUserInput(tGameEntity *entity)
}
angularVelo+=phys->wheels[i].angularVelo*car->wheels[i].powered;
}
if((gMapInfo->demoAvailable+gMapInfo->numObjs))
isValid=false;
if(wheelsOnGround)
slip/=wheelsOnGround;
@ -307,10 +301,6 @@ void ControlEntityUserInput(tGameEntity *entity)
CalcThrottleBrake(car,phys,driveSlip,angularVelo,velo,slip);
CalcSteering(entity,car,phys,velo);
if(!isValid)
if(entity->regData)
qRT3_LicenseTestApp2(phys->regCode,((tRegData*)(entity->regData))->name,((tRegData*)(entity->regData))->numCopies,isValid);
if(GetButtonInput(kInputHandbrakeButton))
phys->handbrake+=kFrameTime*(1/kHandbrakeTime);
else
@ -320,10 +310,6 @@ void ControlEntityUserInput(tGameEntity *entity)
else if(phys->handbrake<0)
phys->handbrake=0;
if(!isValid)
if(entity->regData)
qRT3_LicenseTestBlock2(phys->regCode,((tRegData*)(entity->regData))->name,((tRegData*)(entity->regData))->numCopies,isValid);
if(gFrameCount*kFrameTime>=kStartGameDelaySeconds)
{
if(gConfig->automatic)
@ -415,31 +401,6 @@ void ControlEntityUserInput(tGameEntity *entity)
phys->throttle=0.7;
else
phys->throttle=phys->idleThrottle;
if(entity==gViewedEntity)
{
int invalid=false;
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_CODE_01,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_CODE_02,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_03,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_04,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_05,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_06,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_07,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_08,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_09,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_10,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_11,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_12,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_13,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_14,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_15,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_16,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_17,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_18,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_19,invalid);
if(!invalid)qRT3_LicenseIsSameCode(phys->regCode,RT3_PIRATED_FAKE_20,invalid);
valid=!invalid;
}
}
else
if(phys->rpm<car->clutchRPM)
@ -451,19 +412,11 @@ void ControlEntityUserInput(tGameEntity *entity)
phys->clutch=0;
}
if(!isValid)
if(gFrameCount>kFPS*30)
phys->throttle=0;
if(GetButtonInput(kInputHorn))
phys->lightFlags|=kLightFlagHorn;
else
phys->lightFlags&=~kLightFlagHorn;
if(!valid)
if(RandomProb(kFrameTime/car->gearSwitchTime*7))
phys->gear=0;
if(GetButtonInput(kInputLeftIndicator))
phys->lightFlags|=kLightFlagLIndLight;
else if(GetButtonInput(kInputRightIndicator))

View File

@ -26,8 +26,6 @@
#include "localtracker.h"
#include "writeout.h"
#include "interfacemultiplayer.h"
#include "reg_tool_3.h"
#include "rt3_redline.h"
#undef MemoryMove
#include "gamemem.h"

View File

@ -167,9 +167,6 @@ float CalcSlipAngle(tVector3 wheelVelo,tVector3 wheelDir,tVector3 groundNormal)
tVector3 PacejkaCalcWheelRoadForces(tGameEntity *carEntity,tCarDefinition *car,tCarPhysics *phys,tWheelCalcData *wheels,int i,float engineTorque,float frictionTorque)
{
int isValid;
qRT3_LicenseTestOdd(phys->regCode,isValid);
if(phys->maxSlip==0)
InitSlipMaxima(car,phys);
@ -213,10 +210,6 @@ tVector3 PacejkaCalcWheelRoadForces(tGameEntity *carEntity,tCarDefinition *car,t
slipRatio=CalcSlipRatio(wheelVelo,wheelDir,phys->wheels[i].angularVelo,car->wheels[i].radius);
slipAngle=CalcSlipAngle(wheelVelo,wheelDir,wheels[i].groundNormal);
//wrong physics calculation if piracy detected
if((!isValid)&&(car->demoAvailable-car->numColors!=1)&&(carEntity==gCarEntities[gGameInfo->playerID]))
slipAngle=-slipRatio;
float longitudinalForce,lateralForce;
CalcCombinedForce(wheels[i].normalForce,phys,&lateralForce,&longitudinalForce,slipRatio,slipAngle);
lateralForce*=grip;
@ -240,8 +233,5 @@ tVector3 PacejkaCalcWheelRoadForces(tGameEntity *carEntity,tCarDefinition *car,t
phys->wheels[i].slip=slipRatio;
phys->wheels[i].slipAngle=slipAngle;
if(gGameInfo->arcade&&(!isValid)&&(car->demoAvailable-car->numColors!=1)&&(carEntity==gCarEntities[gGameInfo->playerID]))
phys->steering=slipRatio;
return totalForce*((float)1/slipRes);
}