]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/client.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / client.qc
index 3a6765e9d46fbfc7ed9025238cfe8017a1fc5bde..df1ab6b806bf91e3b6d84e337d51fcee99dad8f2 100644 (file)
@@ -28,6 +28,11 @@ void WarpZone_Fade_PreDraw(entity this)
 void WarpZone_Touch(entity this, entity toucher);
 NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew)
 {
+       if(!warpzone_warpzones_exist)
+       {
+               cvar_settemp("r_water", "1"); // HACK for DarkPlaces: always enable reflections when a map has warpzones
+               cvar_settemp("r_water_resolutionmultiplier", "1"); // HACK for DarkPlaces: enforce full quality so entities can be seen clearly through warpzones
+       }
        warpzone_warpzones_exist = 1;
        if (!this.enemy)
        {
@@ -84,6 +89,11 @@ NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew)
 
 NET_HANDLE(ENT_CLIENT_WARPZONE_CAMERA, bool isnew)
 {
+       if(!warpzone_cameras_exist)
+       {
+               cvar_settemp("r_water", "1"); // HACK for DarkPlaces: always enable reflections when a map has cameras
+               cvar_settemp("r_water_resolutionmultiplier", "1"); // HACK for DarkPlaces: enforce full quality so entities can be seen clearly through warpzones
+       }
        warpzone_cameras_exist = 1;
        this.classname = "func_warpzone_camera";