Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

QuakeC Structures and Objects

From Quake Wiki

Revision as of 15:10, 8 May 2008 by ShoTro (talk | contribs) (New page: == Definition of structures and objects == It is often convenient, in C (or C++), to create new structures (or Objects, or record) to store a few related informations at the same place. ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Definition of structures and objects[edit]

It is often convenient, in C (or C++), to create new structures (or Objects, or record) to store a few related informations at the same place. For instance, you may wish to use a single structure to store all the ammo count of the player, and also the current selected weapon, since those informations are obviously related to each other.

Though both entity and vector are obviously structured types, it is impossible to create new structured types of that kind, in Quake-C. However, the entity type can be modified to suit some of your needs.