// declarations
entity tmp_entity;
- self.nextthink = time + 0.1; // only 10 fps, more is unnecessary.
+ self.nextthink = time + 0.2; // only 5 fps, more is unnecessary.
// captureshield
if(self == ctf_worldflaglist) // only for the first flag
if(!trace_startsolid) // can we resize it without getting stuck?
setsize(self, FLAG_MIN, FLAG_MAX); }
- if(self.owner.classname != "player" || (self.owner.deadflag) || (self.owner.flagcarried != self)) {
- dprint("CANNOT HAPPEN - player dead and STILL had a flag!\n");
- ctf_Handle_Drop(self.owner);
- return; }
+ //if(self.owner.classname == "player" || (self.owner.deadflag) || (self.owner.flagcarried != self)) {
+ // dprint("CANNOT HAPPEN - player dead and STILL had a flag!\n");
+ // ctf_Handle_Drop(self.owner);
+ // return; }
// main think method
switch(self.ctf_status)
if(time > self.ctf_droptime + autocvar_g_ctf_flag_returntime)
{
bprint("The ", self.netname, " has returned to base\n");
- sound (self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
+ sound(self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
ctf_EventLog("returned", self.team, world);
ctf_RespawnFlag(self);
}
flag.reset = ctf_Reset;
flag.touch = ctf_FlagTouch;
flag.think = ctf_FlagThink;
+ flag.nextthink = time + 0.2;
flag.ctf_status = FLAG_BASE;
// appearence
// flag constants
#define FLAG_MIN (PL_MIN + '0 0 -13')
#define FLAG_MAX (PL_MAX + '0 0 -13')
-
-#define FLAG_CARRY_OFFSET '-15 0 7'
+#define FLAG_CARRY_OFFSET ('-15 0 7')
#define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_z - 13))
-#define FLAG_WAYPOINT_OFFSET '0 0 64'
+#define FLAG_WAYPOINT_OFFSET ('0 0 64')
-#define ctf_spawnorigin dropped_origin
+// list of flags on the map
+entity ctf_worldflaglist;
+.entity ctf_worldflagnext;
+// waypoint sprites
.entity bot_basewaypoint; // flag waypointsprite
.entity wps_flagbase;
.entity wps_flagcarrier;
.entity wps_flagdropped;
-entity ctf_worldflaglist; // CTF flags in the map
-.entity ctf_worldflagnext;
-
+// flag properties
+#define ctf_spawnorigin dropped_origin
float ctf_captimerecord; // record time for capturing the flag
.float ctf_pickuptime;
.float ctf_pickupid;