summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/VehicleModelInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modelinfo/VehicleModelInfo.cpp')
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp9
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;
}