mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 11:52:32 +01:00
- fix light trails bugs
This commit is contained in:
parent
38f53aca68
commit
b7a0bb4b71
@ -401,6 +401,8 @@ DAMAGED_LAMP damaged_lamp[MAX_DAMAGED_LAMPS];
|
||||
MATRIX debris_mat;
|
||||
MATRIX leaf_mat;
|
||||
|
||||
#define LAMP_STREAK_ID(x,y) (((x) & 0xffff) | (((y) & 0xffff) << 16))
|
||||
|
||||
// [D] [T]
|
||||
void PlacePoolForCar(CAR_DATA *cp, CVECTOR *col, int front, int in_car)
|
||||
{
|
||||
@ -1367,7 +1369,7 @@ void AddSmallStreetLight(CELL_OBJECT *cop, int x, int y, int z, int type)
|
||||
|
||||
v3 = v1;
|
||||
|
||||
LightIndex = find_lamp_streak(cop->pos.vx + cop->pos.vz + x); // [A] was pointer.
|
||||
LightIndex = find_lamp_streak(LAMP_STREAK_ID(cop->pos.vx + x, cop->pos.vz)); // [A] was pointer.
|
||||
|
||||
if (LightIndex > -1)
|
||||
col.cd = 0x60;
|
||||
@ -1771,7 +1773,7 @@ void AddTrafficLight(CELL_OBJECT *cop, int x, int y, int z, int flag, int yang)
|
||||
a.g = (a.g * tempfade) >> 10;
|
||||
|
||||
LightSortCorrect = -140;
|
||||
LightIndex = find_lamp_streak(cop->pos.vx + cop->pos.vz + x + y); // [A] was pointer.
|
||||
LightIndex = find_lamp_streak(LAMP_STREAK_ID(cop->pos.vx + x, cop->pos.vz + y)); // [A] was pointer.
|
||||
|
||||
if (LightIndex < 0)
|
||||
a.cd = 0;
|
||||
|
@ -585,7 +585,9 @@ int main(int argc, char** argv)
|
||||
|
||||
// configure host game
|
||||
ini_sget(config, "game", "drawDistance", "%d", &gDrawDistance);
|
||||
#ifdef DYNAMIC_LIGHTING
|
||||
ini_sget(config, "game", "dynamicLights", "%d", &gEnableDlights);
|
||||
#endif
|
||||
ini_sget(config, "game", "disableChicagoBridges", "%d", &gDisableChicagoBridges);
|
||||
ini_sget(config, "game", "fieldOfView", "%d", &newScrZ);
|
||||
ini_sget(config, "game", "freeCamera", "%d", &enableFreecamera);
|
||||
|
Loading…
Reference in New Issue
Block a user