]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Bot AI: allow turning in a more natural way when a low skilled bot is walking
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index 5bf11df86ef5a732d3f59401423ab8ed0705a554..c22737ed0d2d2b5d02bd9595740dca3b322cab80 100644 (file)
@@ -95,8 +95,7 @@ float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets
 }
 
 #define BEGIN_CHEAT_FUNCTION() \
-       float cheating, attempting; \
-       cheating = 0; attempting = 0
+       float cheating = 0, attempting = 0
 #define DID_CHEAT() \
        ++cheating
 #define ADD_CHEATS(e,n) \
@@ -915,29 +914,22 @@ void Drag_Finish(entity dragger)
        }
 }
 
+bool drag_undraggable(entity draggee, entity dragger)
+{
+       // stuff probably shouldn't need this, we should figure out why they do!
+       // exceptions of course are observers and weapon entities, where things mess up
+       return false;
+}
+
 float Drag_IsDraggable(entity draggee, entity dragger)
 {
        // TODO add more checks for bad stuff here
        if(draggee == NULL)
                return false;
-       if(draggee.classname == "func_bobbing")
-               return false;
        if(draggee.classname == "door") // FIXME find out why these must be excluded, or work around the problem (trying to drag these causes like 4 fps)
-               return false;
-       if(draggee.classname == "plat")
-               return false;
-       if(draggee.classname == "func_button")
-               return false;
+               return false; // probably due to BSP collision
 //     if(draggee.model == "")
 //             return false;
-       if(IS_SPEC(draggee))
-               return false;
-       if(IS_OBSERVER(draggee))
-               return false;
-       if(draggee.classname == "exteriorweaponentity")
-               return false;
-       if(draggee.classname == "weaponentity")
-               return false;
 
        return ((draggee.draggable) ? draggee.draggable(draggee, dragger) : true);
 }