float old_delay, old_team, real_team;
// now that the delay has expired, switch to the latest team to lay claim to this point
float old_delay, old_team, real_team;
// now that the delay has expired, switch to the latest team to lay claim to this point
- dom_EventLog("taken", self.team, self.dmg_inflictor);
- self.dmg_inflictor = world;
+ dom_EventLog("taken", this.team, this.dmg_inflictor);
+ this.dmg_inflictor = world;
- Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_DOMINATION_CAPTURE_TIME, head.netname, self.message, points, wait_time);
+ Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_DOMINATION_CAPTURE_TIME, head.netname, this.message, points, wait_time);
- if(self.enemy.playerid == self.enemy_playerid)
- PlayerScore_Add(self.enemy, SP_DOM_TAKES, 1);
+ if(this.enemy.playerid == this.enemy_playerid)
+ PlayerScore_Add(this.enemy, SP_DOM_TAKES, 1);
- if(self.enemy)
- _sound(self.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
+ if(this.enemy)
+ _sound(this.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
- _sound(self, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
+ _sound(this, CH_TRIGGER, head.noise, VOL_BASE, ATTEN_NORM);
- old_delay = self.delay;
- old_team = self.team;
- self.team = real_team;
- self.delay = 0;
- SUB_UseTargets (self, self, NULL);
- self.delay = old_delay;
- self.team = old_team;
+ old_delay = this.delay;
+ old_team = this.team;
+ this.team = real_team;
+ this.delay = 0;
+ SUB_UseTargets (this, this, NULL);
+ this.delay = old_delay;
+ this.team = old_team;
- WaypointSprite_UpdateSprites(self.sprite, msg, WP_Null, WP_Null);
+ WaypointSprite_UpdateSprites(this.sprite, msg, WP_Null, WP_Null);
total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
- WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, colormapPaletteColor(self.goalentity.team - 1, 0));
- WaypointSprite_Ping(self.sprite);
+ WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, colormapPaletteColor(this.goalentity.team - 1, 0));
+ WaypointSprite_Ping(this.sprite);
- self.pain_finished = time + self.t_width;
- if(self.nextthink > self.pain_finished)
- self.nextthink = self.pain_finished;
+ this.pain_finished = time + this.t_width;
+ if(this.nextthink > this.pain_finished)
+ this.nextthink = this.pain_finished;
// give credit to the team
// NOTE: this defaults to 0
if (!domination_roundbased)
// give credit to the team
// NOTE: this defaults to 0
if (!domination_roundbased)
- fragamt = self.frags;
- TeamScore_AddToTeam(self.goalentity.team, ST_SCORE, fragamt);
- TeamScore_AddToTeam(self.goalentity.team, ST_DOM_TICKS, fragamt);
+ fragamt = this.frags;
+ TeamScore_AddToTeam(this.goalentity.team, ST_SCORE, fragamt);
+ TeamScore_AddToTeam(this.goalentity.team, ST_DOM_TICKS, fragamt);
- PlayerScore_Add(self.enemy, SP_SCORE, fragamt);
- PlayerScore_Add(self.enemy, SP_DOM_TICKS, fragamt);
+ PlayerScore_Add(this.enemy, SP_SCORE, fragamt);
+ PlayerScore_Add(this.enemy, SP_DOM_TICKS, fragamt);
while (head && head.team != other.team)
head = find(head, classname, "dom_team");
while (head && head.team != other.team)
head = find(head, classname, "dom_team");
- // self.state = 1;
- // self.delay = time + cvar("g_domination_point_capturetime");
- //self.nextthink = time + cvar("g_domination_point_capturetime");
- //self.think = dompoint_captured;
+ // this.state = 1;
+ // this.delay = time + cvar("g_domination_point_capturetime");
+ //this.nextthink = time + cvar("g_domination_point_capturetime");
+ //this.think = dompoint_captured;
// go to neutral team in the mean time
head = find(world, classname, "dom_team");
// go to neutral team in the mean time
head = find(world, classname, "dom_team");
- WaypointSprite_UpdateSprites(self.sprite, WP_DomNeut, WP_Null, WP_Null);
- WaypointSprite_UpdateTeamRadar(self.sprite, RADARICON_DOMPOINT, '0 1 1');
- WaypointSprite_Ping(self.sprite);
+ WaypointSprite_UpdateSprites(this.sprite, WP_DomNeut, WP_Null, WP_Null);
+ WaypointSprite_UpdateTeamRadar(this.sprite, RADARICON_DOMPOINT, '0 1 1');
+ WaypointSprite_Ping(this.sprite);
- self.enemy = other; // individual player scoring
- self.enemy_playerid = other.playerid;
- dompoint_captured();
+ this.enemy = other; // individual player scoring
+ this.enemy_playerid = other.playerid;
+ dompoint_captured(this);
objerror("no spawnfunc_dom_team with netname \"\" found\n");
// copy important properties from spawnfunc_dom_team entity
objerror("no spawnfunc_dom_team with netname \"\" found\n");
// copy important properties from spawnfunc_dom_team entity
- self.goalentity = head;
- _setmodel(self, head.mdl); // precision already set
- self.skin = head.skin;
+ this.goalentity = head;
+ _setmodel(this, head.mdl); // precision already set
+ this.skin = head.skin;
- if(!self.t_width)
- self.t_width = 0.02; // frame animation rate
- if(!self.t_length)
- self.t_length = 239; // maximum frame
-
- setthink(self, dompointthink);
- self.nextthink = time;
- settouch(self, dompointtouch);
- self.solid = SOLID_TRIGGER;
- self.flags = FL_ITEM;
- setsize(self, '-32 -32 -32', '32 32 32');
- setorigin(self, self.origin + '0 0 20');
- droptofloor(self);
-
- waypoint_spawnforitem(self);
- WaypointSprite_SpawnFixed(WP_DomNeut, self.origin + '0 0 32', self, sprite, RADARICON_DOMPOINT);
+ if(!this.t_width)
+ this.t_width = 0.02; // frame animation rate
+ if(!this.t_length)
+ this.t_length = 239; // maximum frame
+
+ setthink(this, dompointthink);
+ this.nextthink = time;
+ settouch(this, dompointtouch);
+ this.solid = SOLID_TRIGGER;
+ this.flags = FL_ITEM;
+ setsize(this, '-32 -32 -32', '32 32 32');
+ setorigin(this, this.origin + '0 0 20');
+ droptofloor(this);
+
+ waypoint_spawnforitem(this);
+ WaypointSprite_SpawnFixed(WP_DomNeut, this.origin + '0 0 32', this, sprite, RADARICON_DOMPOINT);