Xonotic
resources.qc
Go to the documentation of this file.
1 #include "resources.qh"
2 
3 #ifdef GAMEQC
4 Resource GetResourceType(.float res_field)
5 {
6  FOREACH(Resources, it.m_field == res_field, return it);
7  error("GetResourceType: Invalid field.");
8  return RES_NONE;
9 }
10 
11 .float GetResourceField(Resource res_type)
12 {
13  return res_type.m_field;
14 }
15 #endif
#define FOREACH(list, cond, body)
Definition: iter.qh:19