]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add button8 (grab button) to keybinds.txt. Also document the use of grabbing and...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 09:09:51 +0000 (12:09 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 09:09:51 +0000 (12:09 +0300)
defaultXonotic.cfg
keybinds.txt
qcsrc/server/mutators/sandbox.qc

index a5a035585a19cc02b5dbc4a3bd8b2b4d6040683c..58f6d687349707cdcc6e39a5a9b0b86ce3f225b3 100644 (file)
@@ -1044,6 +1044,7 @@ bind r reload
 bind BACKSPACE dropweapon
 bind g dropweapon
 bind f +use
+bind v +button8 // drag object
 
 // misc
 bind e +hook
index 2df89afae0e9f0ecf8b5dd4cdc6a737071a65a80..2c89f704b8c1599d38971dc071973929d5ab3f6a 100644 (file)
@@ -56,6 +56,7 @@
 "spec"                                  "enter spectator mode"
 "dropweapon"                            "drop weapon"
 "+use"                                  "drop key / drop flag"
+"+button8"                              "drag object"
 ""                                      ""
 ""                                      "User defined"
 "+userbind 1"                           "$userbind1"
index 28017401af9033b3bf5d24f813f7870699d041de..7bb4ad1b2477efc03723b4f7bb7b25b956a4f290 100644 (file)
@@ -15,6 +15,8 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                        print_to(self, "You can use the following sandbox commands:");
                        print_to(self, "^7\"^2spawn_object ^3models/foo/bar.md3^7\" spawns a new object in front of the player, and gives it the specified model");
                        print_to(self, "^7\"^2spawn_item ^3item^7\" spawns the specified item in front of the player. Only weapons are currently supported");
+                       print_to(self, "^7\"^2remove_object^7\" removes the object the player is looking at. Players can only remove their own objects");
+                       print_to(self, "^1button8 ^7can be used to grab and carry objects. Players can only grab their own objects");
                        return TRUE;
                }
                else if(argv(1) == "spawn_object")
@@ -53,7 +55,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                }
                else if(argv(1) == "spawn_item")
                {
-                       // weapons are the only items currently supported
+                       // only weapons are currently supported
 
                        if(cmd_argc < 3)
                        {
@@ -79,7 +81,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                }
                        }
 
-                       print_to(self, "WARNING: Attempted to spawn an invalid or unsupported item. See 'g_sandbox help' for supported items");
+                       print_to(self, "WARNING: Attempted to spawn an invalid or unsupported item. See 'g_sandbox help' for allowed items");
                        return TRUE;
                }
                else if(argv(1) == "remove_object")
@@ -114,8 +116,8 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerPreThink)
 
        // grab is TRUE if the object can be picked up. While an object is being carried, the Drag() function
        // must execute for it either way, otherwise it would cause bugs if it went out of the player's trace.
-       // This also makes sure that an object can only pe picked up if in range, but does not get dropped if it goes
-       // out of range while slinging it around.
+       // This also makes sure that an object can only pe picked up if in range, but does not get dropped if
+       // it goes out of range while slinging it around.
 
        if(trace_ent.classname == "object" && trace_ent.realowner == self && vlen(trace_ent.origin - self.origin) <= autocvar_g_sandbox_editor_distance_edit)
                grab = TRUE; // object can be picked up