reverselight.patch
| main/Beam.cpp (working copy) | ||
|---|---|---|
| 486 | 486 |
totalmass=0; |
| 487 | 487 |
parkingbrake=0; |
| 488 | 488 |
lights=1; |
| 489 |
reverselight=false; |
|
| 489 | 490 |
free_node=0; |
| 490 | 491 |
free_beam=0; |
| 491 | 492 |
free_contacter=0; |
| ... | ... | |
| 8757 | 8758 |
it->lockTruck->blinkingtype = blinkingtype; |
| 8758 | 8759 |
//for(int k=0;k<4;k++) |
| 8759 | 8760 |
// lockTruck->setCustomLight(k, getCustomLight(k)); |
| 8760 | ||
| 8761 |
//forward reverse light e.g. for trailers |
|
| 8762 |
it->lockTruck->reverselight=getReverseLightVisible(); |
|
| 8761 | 8763 |
} |
| 8762 | 8764 |
} |
| 8763 | 8765 |
} |
| ... | ... | |
| 9771 | 9773 |
} else if(flares[i].type == 'b') {
|
| 9772 | 9774 |
isvisible = getBrakeLightVisible(); |
| 9773 | 9775 |
} else if(flares[i].type == 'R') {
|
| 9774 |
if(engine) |
|
| 9776 |
if(engine || reverselight)
|
|
| 9775 | 9777 |
isvisible = getReverseLightVisible(); |
| 9776 | 9778 |
else |
| 9777 | 9779 |
isvisible=false; |
| ... | ... | |
| 11140 | 11142 |
{
|
| 11141 | 11143 |
if(state==NETWORKED) |
| 11142 | 11144 |
return netReverseLight; |
| 11143 |
if (!engine) return 0; |
|
| 11144 |
return (engine->getGear() < 0); |
|
| 11145 |
if (!engine && !reverselight) return 0; |
|
| 11146 |
if (engine) return (engine->getGear() < 0); |
|
| 11147 |
if (reverselight) return true; |
|
| 11148 |
return false; |
|
| 11145 | 11149 |
} |
| 11146 | 11150 | |
| 11147 | 11151 |
// Utility functions /////////////////////////////////////////////////////////// |
| main/Beam.h (working copy) | ||
|---|---|---|
| 330 | 330 |
bool rescuer; |
| 331 | 331 |
int parkingbrake; |
| 332 | 332 |
int lights; |
| 333 |
bool reverselight; |
|
| 333 | 334 |
int smokeId; |
| 334 | 335 |
int editorId; |
| 335 | 336 |
bool shadowOptimizations; |