ENTITIES.H 694 B

12345678910111213141516171819202122232425262728293031323334
  1. #define DEFAULTLIGHTLEVEL 300
  2. typedef struct epair_s
  3. {
  4. struct epair_s *next;
  5. char key[MAX_KEY];
  6. char value[MAX_VALUE];
  7. } epair_t;
  8. typedef struct entity_s
  9. {
  10. char classname[64];
  11. vec3_t origin;
  12. float angle;
  13. int light;
  14. int style;
  15. char target[32];
  16. char targetname[32];
  17. struct epair_s *epairs;
  18. struct entity_s *targetent;
  19. } entity_t;
  20. extern entity_t entities[MAX_MAP_ENTITIES];
  21. extern int num_entities;
  22. char *ValueForKey (entity_t *ent, char *key);
  23. void SetKeyValue (entity_t *ent, char *key, char *value);
  24. float FloatForKey (entity_t *ent, char *key);
  25. void GetVectorForKey (entity_t *ent, char *key, vec3_t vec);
  26. void LoadEntities (void);
  27. void WriteEntitiesToString (void);