]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disallow enabling r_water via mapinfo, automatically enable it on maps with warpzones...
authorMario <mario@smbclan.net>
Wed, 17 Oct 2018 08:44:23 +0000 (18:44 +1000)
committerMario <mario@smbclan.net>
Wed, 17 Oct 2018 08:44:23 +0000 (18:44 +1000)
qcsrc/common/mapinfo.qh
qcsrc/common/util.qc
qcsrc/lib/warpzone/client.qc

index 384513521d285b9e331b3fd1294132171831dcfe..6fbb7ce896235d53fe240be81fd83ea0aea25002 100644 (file)
@@ -674,4 +674,4 @@ void MapInfo_ClearTemps(); // call this when done with mapinfo for this frame
 void MapInfo_Shutdown(); // call this in the shutdown handler
 
 #define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl")
 void MapInfo_Shutdown(); // call this in the shutdown handler
 
 #define MAPINFO_SETTEMP_ACL_USER cvar_string("g_mapinfo_settemp_acl")
-#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* +*"
+#define MAPINFO_SETTEMP_ACL_SYSTEM "-g_mapinfo_* -rcon_* -_* -g_ban* -r_water +*"
index 183302b3a1e0460c246c9c1c8357edfbace43c53..a7e9c42104d222e04d7b6d1d5884c6376eb7b060 100644 (file)
@@ -1298,6 +1298,7 @@ float matchacl(string acl, string str)
                if(s == t)
                {
                        r = d;
                if(s == t)
                {
                        r = d;
+                       break; // if we found a killing case, apply it! other settings may be allowed in the future, but this one is caught
                }
        }
        return r;
                }
        }
        return r;
index 3a6765e9d46fbfc7ed9025238cfe8017a1fc5bde..7f8b0cdc837258a7bb5547d984afbcd960430baa 100644 (file)
@@ -28,6 +28,8 @@ void WarpZone_Fade_PreDraw(entity this)
 void WarpZone_Touch(entity this, entity toucher);
 NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew)
 {
 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
        warpzone_warpzones_exist = 1;
        if (!this.enemy)
        {
        warpzone_warpzones_exist = 1;
        if (!this.enemy)
        {
@@ -84,6 +86,8 @@ NET_HANDLE(ENT_CLIENT_WARPZONE, bool isnew)
 
 NET_HANDLE(ENT_CLIENT_WARPZONE_CAMERA, 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
        warpzone_cameras_exist = 1;
        this.classname = "func_warpzone_camera";
 
        warpzone_cameras_exist = 1;
        this.classname = "func_warpzone_camera";