Server-side code of the cw_grab entity, the invisible physics handle that the Pickup Objects plugin welds a carried entity to.

The grab moves towards its compute position with shadow control, asks cwPickupObjects:CalculatePosition for a new position 20 times a second, and drops the entity once the player can no longer hold it.

Summary

Methods

Sets up the grab as a heavy, non-solid physics object for the shadow controller.
Moves the grab towards its compute position with shadow control and keeps the held entity awake.
Sets the position the grab moves towards.
Sets the player holding the grab.
Sets the entity the grab is carrying.
Think()server
Updates the held entity's position 20 times a second, and drops it or removes the grab once the player can no longer hold it.
Does nothing; the grab cannot be used.

Methods

Sets up the grab as a heavy, non-solid physics object for the shadow controller.

Moves the grab towards its compute position with shadow control and keeps the held entity awake.

Parameters

  • physicsObject
  • deltaTime

Sets the position the grab moves towards.

Parameters

  • position Vector The target position

Sets the player holding the grab.

Parameters

  • player Player The holding player

Sets the entity the grab is carrying.

Parameters

  • target Entity The held entity

Updates the held entity's position 20 times a second, and drops it or removes the grab once the player can no longer hold it.

Does nothing; the grab cannot be used.

Parameters

  • activator
  • caller

Defined in