small fixes

This commit is contained in:
aap
2020-05-19 21:42:55 +02:00
parent 0d0f4da27a
commit 0b0ba49abc
6 changed files with 173 additions and 187 deletions

View File

@ -683,7 +683,7 @@ CEntity::ProcessLightsForEntity(void)
lightOn = true;
break;
case LIGHT_FLICKER_NIGHT:
if(CClock::GetHours() > 18 || CClock::GetHours() < 7){
if(CClock::GetHours() > 18 || CClock::GetHours() < 7 || CWeather::WetRoads > 0.5f){){
if((CTimer::GetTimeInMilliseconds() ^ m_randomSeed) & 0x60)
lightOn = true;
else

View File

@ -1076,13 +1076,13 @@ CPhysical::ProcessShiftSectorList(CPtrList *lists)
if(B->IsBuilding())
skipShift = false;
else if(IsTrafficLight(A->GetModelIndex()) &&
else if(IsStreetLight(A->GetModelIndex()) &&
(B->IsVehicle() || B->IsPed()) &&
A->GetUp().z < 0.66f)
skipShift = true;
else if((A->IsVehicle() || A->IsPed()) &&
B->GetUp().z < 0.66f &&
IsTrafficLight(B->GetModelIndex()))
IsStreetLight(B->GetModelIndex()))
skipShift = true;
// TODO: maybe flip some ifs here
else if(A->IsObject() && B->IsVehicle()){
@ -1407,7 +1407,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
if(B->IsBuilding())
skipCollision = false;
else if(IsTrafficLight(A->GetModelIndex()) &&
else if(IsStreetLight(A->GetModelIndex()) &&
(B->IsVehicle() || B->IsPed()) &&
A->GetUp().z < 0.66f){
skipCollision = true;
@ -1415,7 +1415,7 @@ CPhysical::ProcessCollisionSectorList(CPtrList *lists)
Aobj->m_pCollidingEntity = B;
}else if((A->IsVehicle() || A->IsPed()) &&
B->GetUp().z < 0.66f &&
IsTrafficLight(B->GetModelIndex())){
IsStreetLight(B->GetModelIndex())){
skipCollision = true;
A->bSkipLineCol = true;
Bobj->m_pCollidingEntity = A;