#include "util.qh"
#if defined(CSQC)
- #include "../client/defs.qh"
#include "constants.qh"
#include "../client/mutators/events.qh"
#include "mapinfo.qh"
#include "notifications/all.qh"
+ #include "scores.qh"
#include <common/deathtypes/all.qh>
#elif defined(MENUQC)
#elif defined(SVQC)
#include "constants.qh"
- #include "../server/autocvars.qh"
- #include "../server/defs.qh"
#include "../server/mutators/events.qh"
#include "notifications/all.qh"
#include <common/deathtypes/all.qh>
+ #include "scores.qh"
#include "mapinfo.qh"
#endif
*/
vector real_origin(entity ent)
{
- entity e;
vector v = ((ent.absmin + ent.absmax) * 0.5);
+ entity e = ent.tag_entity;
- e = ent.tag_entity;
while(e)
{
v = v + ((e.absmin + e.absmax) * 0.5);
}
}
+#ifdef GAMEQC
string ScoreString(int pFlags, float pValue)
{
string valstr;
return valstr;
}
+#endif
// compressed vector format:
// like MD3, just even shorter
string mapPriorityList(string order, string(string) mapfunc)
{
string neworder;
- float i, n;
+ float n;
n = tokenize_console(order);
neworder = "";
- for(i = 0; i < n; ++i)
+ for(float i = 0; i < n; ++i)
neworder = strcat(neworder, mapfunc(argv(i)), " ");
return substring(neworder, 0, strlen(neworder) - 1);
string swapInPriorityList(string order, float i, float j)
{
- string s;
- float w, n;
-
- n = tokenize_console(order);
+ float n = tokenize_console(order);
if(i >= 0 && i < n && j >= 0 && j < n && i != j)
{
- s = "";
- for(w = 0; w < n; ++w)
+ string s = "";
+ for(float w = 0; w < n; ++w)
{
if(w == i)
s = strcat(s, argv(j), " ");
int skipIncompleteTag(string theText, float pos, int len)
{
- int i = 0, ch = 0;
int tag_start = -1;
if(substring(theText, pos - 1, 1) == "^")
if(isCaretEscaped(theText, pos - 1) || pos >= len)
return 0;
- ch = str2chr(theText, pos);
+ int ch = str2chr(theText, pos);
if(ch >= '0' && ch <= '9')
return 1; // ^[0-9] color code found
else if (ch == 'x')
}
else
{
- for(i = 2; pos - i >= 0 && i <= 4; ++i)
+ for(int i = 2; pos - i >= 0 && i <= 4; ++i)
{
if(substring(theText, pos - i, 2) == "^x")
{
if (start == -1) // no caret found
return "";
int len = strlen(s)-1;
- int i;
- for(i = len; i >= start; --i)
+ for(int i = len; i >= start; --i)
{
if(substring(s, i, 1) != "^")
continue;