+// =====================================================
+// Server side game commands code, reworked by Samual
+// Last updated: July 13th, 2011
+// =====================================================
+
#define GC_REQUEST_HELP 1
#define GC_REQUEST_COMMAND 2
#define GC_REQUEST_USAGE 3
void race_deleteTime(string map, float pos);
-// ======================
-// Supporting Functions
-// ======================
+
+// ============================
+// Misc. Supporting Functions
+// ============================
+
+// used by GameCommand_radarmap()
float FullTraceFraction(vector a, vector mi, vector ma, vector b)
{
vector c;
return white / (black + white);
}
-
float RadarMapAtPoint_Trace(float x, float y, float w, float h, float zmin, float zsize, float q)
{
vector a, b, mi, ma;
return c / q;
}
-
void sharpen_set(float x, float v)
{
sharpen_buffer[x + 2 * RADAR_WIDTH_MAX] = v;
}
-
float sharpen_getpixel(float x, float y)
{
if(x < 0)
return 0;
return sharpen_buffer[x + y * RADAR_WIDTH_MAX];
}
-
float sharpen_get(float x, float a)
{
float sum;
sum -= sharpen_getpixel(x, 2);
return bound(0, sum * a, 1);
}
-
void sharpen_shift(float w)
{
float i;
sharpen_buffer[i + 2 * RADAR_WIDTH_MAX] = 0;
}
}
-
void sharpen_init(float w)
{
float i;
sharpen_buffer[i + 2 * RADAR_WIDTH_MAX] = 0;
}
}
-
void RadarMap_Next()
{
if(radarmapper.count & 4)
remove(radarmapper);
radarmapper = world;
}
-
-// rough map entity
-// cnt: current line
-// size: pixel width/height
-// maxs: cell width/height
-// frame: counter
void RadarMap_Think()
{
+ // rough map entity
+ // cnt: current line
+ // size: pixel width/height
+ // maxs: cell width/height
+ // frame: counter
+
float i, x, l;
string si;
self.nextthink = time + 1;
setorigin(self, self.origin + '0 0 8');
}
-
void modelbug()
{
entity e;
}
-// =====================
-// Command Controllers
-// =====================
+// =======================
+// Command Sub-Functions
+// =======================
void GameCommand_adminmsg(float request, float argc)
{
}
}
+
+// =========================================
+// Main Function Called By Engine (sv_cmd)
+// =========================================
+
void GameCommand(string command)
{
// ===== TODO list =====
default:
print("Invalid command. For a list of supported commands, try sv_cmd help.\n");
}
-}
-
+}
\ No newline at end of file