From c05119a2daac5bfe941ff1b45adad4c8d6976b8a Mon Sep 17 00:00:00 2001 From: maride Date: Sat, 2 Apr 2016 15:19:10 +0200 Subject: [PATCH] Remove registration checks Still not complete. See d158e10c --- source/controls.cpp | 49 +-------------------------------- source/interfacemultiplayer.cpp | 2 -- source/tire.cpp | 12 +------- 3 files changed, 2 insertions(+), 61 deletions(-) diff --git a/source/controls.cpp b/source/controls.cpp index 7dc030b..ee4d22f 100755 --- a/source/controls.cpp +++ b/source/controls.cpp @@ -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;inumWheels;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; @@ -306,11 +300,7 @@ void ControlEntityUserInput(tGameEntity *entity) slip=0; 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->rpmclutchRPM) @@ -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)) diff --git a/source/interfacemultiplayer.cpp b/source/interfacemultiplayer.cpp index 708eba1..4616079 100644 --- a/source/interfacemultiplayer.cpp +++ b/source/interfacemultiplayer.cpp @@ -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" diff --git a/source/tire.cpp b/source/tire.cpp index 07c727b..90f0c92 100644 --- a/source/tire.cpp +++ b/source/tire.cpp @@ -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; @@ -239,9 +232,6 @@ tVector3 PacejkaCalcWheelRoadForces(tGameEntity *carEntity,tCarDefinition *car,t phys->wheels[i].slipVelo=sqrt(sqr(longitunalSlipVelo)+sqr(lateralSlipVelo));//*wheels[i].normalForce*car->numWheels/(car->mass*9.81); 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); }