]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Bot AI: allow bots to directly chase other players in flooded floors and if frozen...
authorterencehill <piuntn@gmail.com>
Thu, 21 Jun 2018 13:16:45 +0000 (15:16 +0200)
committerterencehill <piuntn@gmail.com>
Thu, 21 Jun 2018 13:42:06 +0000 (15:42 +0200)
qcsrc/server/bot/default/navigation.qc

index 2bf1fda728089de3cbd68e90fc5bc961fee129e8..d69da71a521ae04832f8780ba6ff9f9905994fd4 100644 (file)
@@ -1217,8 +1217,11 @@ void navigation_routerating(entity this, entity e, float f, float rangebias)
        if (IS_PLAYER(e))
        {
                bool rate_wps = false;
-               if((e.flags & FL_INWATER) || (e.flags & FL_PARTIALGROUND))
+               if (e.watertype < CONTENT_WATER || (e.waterlevel > WATERLEVEL_WETFEET && !STAT(FROZEN, e))
+                       || (e.flags & FL_PARTIALGROUND))
+               {
                        rate_wps = true;
+               }
 
                if(!IS_ONGROUND(e))
                {