Shared definition of the cw_garbage entity: its entity fields and its networked index variable.

Summary

Methods

Blocks every tool on the pile.
Draw()client
Draws the pile's model.
Picks a random garbage model and sets up the pile's physics, colliding only with the world.
Stops the pile from moving unless a player holds it or it is constrained.
Sets up the networked int 0 (index).
Think()client
Does nothing on the client.
Returns TRANSMIT_ALWAYS, so the pile is networked to every client.
Starts searching the pile when a crouching, untied player or one holding a push broom uses it.

Methods

Blocks every tool on the pile.

Parameters

  • player
  • trace
  • tool

Returns

  • Boolean Always false

Draws the pile's model.

On the server

Picks a random garbage model and sets up the pile's physics, colliding only with the world.

On the client

Does nothing on the client.

Defined in

Stops the pile from moving unless a player holds it or it is constrained.

Parameters

  • physicsObject

Sets up the networked int 0 (index).

Does nothing on the client.

Returns TRANSMIT_ALWAYS, so the pile is networked to every client.

Returns

  • Number TRANSMIT_ALWAYS

Starts searching the pile when a crouching, untied player or one holding a push broom uses it.

The search takes GetGarbageTime seconds within 192 units and runs PlayerTakeGarbage once the pile has been removed. Standing players are told to crouch.

Parameters

  • activator
  • caller

Defined in