Shared definition of the cw_book entity, a non-spawnable anim entity with a networked index int that holds the index of its book item.

Summary

Methods

Draw()client
Draws the book's model.
Explode()server
Plays the effect and sound of the book being destroyed.
Draws the book's name and weight when looked at.
Sets up the book's physics and gives it 25 health.
Subtracts the damage from the book's health and destroys it at 0.
Sets which book item the entity is, taking the item's model and skin.
Sets up the networked int 0 (index), the index of the book's item.
Returns TRANSMIT_ALWAYS, so the book is networked to every client.

Methods

Draws the book's model.

Plays the effect and sound of the book being destroyed.

Draws the book's name and weight when looked at.

Parameters

  • x
  • y
  • alpha

Sets up the book's physics and gives it 25 health.

Subtracts the damage from the book's health and destroys it at 0.

Parameters

  • damageInfo

Sets which book item the entity is, taking the item's model and skin.

Networks the item's index in the int 0 data table variable. Does nothing when no item matches.

Parameters

  • book String The book item's unique ID

Sets up the networked int 0 (index), the index of the book's item.

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

Returns

  • Number TRANSMIT_ALWAYS

Defined in