diff options
author | aap <aap@papnet.eu> | 2020-12-04 01:12:58 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-04 01:12:58 +0100 |
commit | 9714a3776996d97e680cea575967a1d6041f5723 (patch) | |
tree | 0810bc2c542a9cf63b49ebbb0f6f6d37f0653755 /src/modelinfo/VehicleModelInfo.cpp | |
parent | 814771c3b50cbda512efa6bb6cffb81d48cd48bf (diff) |
bit more GTA_VERSION and GTA_PS2
Diffstat (limited to 'src/modelinfo/VehicleModelInfo.cpp')
-rw-r--r-- | src/modelinfo/VehicleModelInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp index afda70d3..17754211 100644 --- a/src/modelinfo/VehicleModelInfo.cpp +++ b/src/modelinfo/VehicleModelInfo.cpp @@ -998,6 +998,8 @@ CVehicleModelInfo::SetEnvironmentMapCB(RpMaterial *material, void *data) return material; } +bool initialised; + RpAtomic* CVehicleModelInfo::SetEnvironmentMapCB(RpAtomic *atomic, void *data) { @@ -1011,7 +1013,12 @@ CVehicleModelInfo::SetEnvironmentMapCB(RpAtomic *atomic, void *data) RpGeometryForAllMaterials(geo, SetEnvironmentMapCB, data); RpGeometrySetFlags(geo, RpGeometryGetFlags(geo) | rpGEOMETRYMODULATEMATERIALCOLOR); RpMatFXAtomicEnableEffects(atomic); - // PS2 sets of PS2Manager lighting CB here +#ifdef GTA_PS2 + if(!initialised){ + SetupPS2ManagerLightingCallback(RpAtomicGetInstancePipeline(atomic)); + initialised = true; + } +#endif } return atomic; } |