X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcheats.qc;h=d5c145f26cc144a282de1038811046c7bb0ffa49;hp=93faddb3ecfe8d0fa5444a90745c901ae9e823ad;hb=a86fa5a48ac75276db3da34fd3721678517c62fa;hpb=c82715c24e1a4b500091b3646a78fbcee8602154 diff --git a/qcsrc/server/cheats.qc b/qcsrc/server/cheats.qc index 93faddb3ec..d5c145f26c 100644 --- a/qcsrc/server/cheats.qc +++ b/qcsrc/server/cheats.qc @@ -664,7 +664,7 @@ float CheatCommand(float argc) END_CHEAT_FUNCTION(); } -float Drag(entity e, float candrag); +float Drag(entity e, float grab); void Drag_Begin(entity dragger, entity draggee, vector touchpoint); void Drag_Finish(entity dragger); float Drag_IsDraggable(entity draggee); @@ -716,8 +716,12 @@ float CheatFrame() // ENTITY DRAGGING -float Drag(entity e, float candrag) +float Drag(entity e, float grab) { + // returns TRUE when an entity has been picked up + // If grab is TRUE, the object can also be picked up if it's not being held already + // If grab is FALSE, only keep dragging the object if it's already being held + if(Drag_IsDragging(self)) { if(self.BUTTON_DRAG) @@ -752,7 +756,7 @@ float Drag(entity e, float candrag) else { if(Drag_CanDrag(self)) - if(self.BUTTON_DRAG && candrag) + if(self.BUTTON_DRAG && grab) { if(e) if(Drag_IsDraggable(e)) @@ -945,11 +949,6 @@ void Drag_MoveDrag(entity from, entity to) } } - - - - - void DragBox_Think() { if(self.aiment && self.enemy)