summaryrefslogtreecommitdiff
path: root/gamemode/cl_various/material.lua
diff options
context:
space:
mode:
authorApickx <Apickx@cogarr.org>2015-12-28 19:18:30 -0500
committerApickx <Apickx@cogarr.org>2015-12-28 19:18:30 -0500
commit868e729d68b5913716bfe5ddb512f4099851e9a2 (patch)
tree6441108754145dfd68a6e23bea382b5cb1ab63d5 /gamemode/cl_various/material.lua
downloadgearfox-868e729d68b5913716bfe5ddb512f4099851e9a2.tar.gz
gearfox-868e729d68b5913716bfe5ddb512f4099851e9a2.tar.bz2
gearfox-868e729d68b5913716bfe5ddb512f4099851e9a2.zip
Initial commitHEADmaster
Diffstat (limited to 'gamemode/cl_various/material.lua')
-rw-r--r--gamemode/cl_various/material.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/gamemode/cl_various/material.lua b/gamemode/cl_various/material.lua
new file mode 100644
index 0000000..bd48612
--- /dev/null
+++ b/gamemode/cl_various/material.lua
@@ -0,0 +1,18 @@
+
+local SourceSkyname = GetConVar("sv_skyname"):GetString() --We need the source of the maps original skybox texture so we can manipulate it.
+local SourceSkyPre = {"lf","ft","rt","bk","dn","up",}
+local SourceSkyMat = {
+ Material("skybox/"..SourceSkyname.."lf"),
+ Material("skybox/"..SourceSkyname.."ft"),
+ Material("skybox/"..SourceSkyname.."rt"),
+ Material("skybox/"..SourceSkyname.."bk"),
+ Material("skybox/"..SourceSkyname.."dn"),
+ Material("skybox/"..SourceSkyname.."up"),
+}
+
+function ChangeSkybox(skyboxname)
+ for i = 1,6 do
+ local D = Material("skybox/"..skyboxname..SourceSkyPre[i]):GetTexture("$basetexture")
+ SourceSkyMat[i]:SetTexture("$basetexture",D)
+ end
+end \ No newline at end of file