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);
// 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)
else
{
if(Drag_CanDrag(self))
- if(self.BUTTON_DRAG && candrag)
+ if(self.BUTTON_DRAG && grab)
{
if(e)
if(Drag_IsDraggable(e))
}
}
-
-
-
-
-
void DragBox_Think()
{
if(self.aiment && self.enemy)