GameRules_scoring_vip(player, true);
// reset flag
+ flag.solid = SOLID_NOT; // before setorigin to prevent area grid linking
if(player.vehicle)
{
setattachment(flag, player.vehicle, "");
}
set_movetype(flag, MOVETYPE_NONE);
flag.takedamage = DAMAGE_NO;
- flag.solid = SOLID_NOT;
flag.angles = '0 0 0';
flag.ctf_status = FLAG_CARRY;
// reset the flag
setattachment(flag, NULL, "");
tracebox(player.origin - FLAG_DROP_OFFSET, flag.m_mins, flag.m_maxs, player.origin + FLAG_DROP_OFFSET, MOVE_NOMONSTERS, flag);
+ flag.solid = SOLID_TRIGGER; // before setorigin to ensure area grid linking
setorigin(flag, trace_endpos);
flag.owner.flagcarried = NULL;
GameRules_scoring_vip(flag.owner, false);
flag.owner = NULL;
- flag.solid = SOLID_TRIGGER;
flag.ctf_dropper = player;
flag.ctf_droptime = time;
flag.ctf_landtime = 0;
flag.owner = player;
player.flagcarried = flag;
GameRules_scoring_vip(player, true);
+ flag.solid = SOLID_NOT; // before setorigin to prevent area grid linking
if(player.vehicle)
{
setattachment(flag, player.vehicle, "");
// flag setup
set_movetype(flag, MOVETYPE_NONE);
flag.takedamage = DAMAGE_NO;
- flag.solid = SOLID_NOT;
flag.angles = '0 0 0';
flag.ctf_status = FLAG_CARRY;
// reset the flag
setattachment(flag, NULL, "");
+ flag.solid = SOLID_TRIGGER; // before setorigin to ensure area grid linking
setorigin(flag, flag.ctf_spawnorigin);
//set_movetype(flag, ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS)); // would be desired, except maps that want floating flags have it set to fall!
set_movetype(flag, MOVETYPE_NONE); // match the initial setup handling (flag doesn't move when spawned)
flag.takedamage = DAMAGE_NO;
SetResourceExplicit(flag, RES_HEALTH, flag.max_health);
- flag.solid = SOLID_TRIGGER;
flag.velocity = '0 0 0';
flag.angles = flag.mangle;
flag.flags = FL_ITEM | FL_NOTARGET;
{
entity e = new(keepawayball);
setmodel(e, MDL_KA_BALL);
+ e.solid = SOLID_TRIGGER; // before setsize to ensure area grid linking
setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
e.damageforcescale = autocvar_g_keepawayball_damageforcescale;
e.takedamage = DAMAGE_YES;
e.event_damage = ka_DamageEvent;
e.damagedbycontents = true;
IL_PUSH(g_damagedbycontents, e);
- e.solid = SOLID_TRIGGER;
set_movetype(e, MOVETYPE_BOUNCE);
e.glow_color = autocvar_g_keepawayball_trail_color;
e.glow_trail = true;
void kh_Key_Attach(entity key) // runs when a player picks up a key and several times when a key is assigned to a player at the start of a round
{
+ key.solid = SOLID_NOT; // before setorigin to prevent area grid linking
#ifdef KH_PLAYER_USE_ATTACHMENT
entity first = key.owner.kh_next;
if(key == first)
key.flags = 0;
if(IL_CONTAINS(g_items, key))
IL_REMOVE(g_items, key);
- key.solid = SOLID_NOT;
set_movetype(key, MOVETYPE_NONE);
key.team = key.owner.team;
key.nextthink = time;
void kh_Key_Detach(entity key) // runs every time a key is dropped or lost. Runs several times times when all the keys are captured
{
+ key.solid = SOLID_TRIGGER; // before setorigin to ensure area grid linking
#ifdef KH_PLAYER_USE_ATTACHMENT
entity first = key.owner.kh_next;
if(key == first)
key.flags = FL_ITEM;
if(!IL_CONTAINS(g_items, key))
IL_PUSH(g_items, key);
- key.solid = SOLID_TRIGGER;
set_movetype(key, MOVETYPE_TOSS);
key.pain_finished = time + autocvar_g_balance_keyhunt_delay_return;
key.damageforcescale = autocvar_g_balance_keyhunt_damageforcescale;
{
this.netname = "Control Point Icon";
+ this.solid = SOLID_NOT; // before setmodel/setsize to prevent area grid linking
setmodel(this, MDL_ONS_CP);
setsize(this, CPICON_MIN, CPICON_MAX);
if(this.icon_realmodel == NULL)
{
this.icon_realmodel = new(cpicon_model);
+ this.icon_realmodel.solid = SOLID_NOT;
setmodel(this.icon_realmodel, MDL_Null);
setorigin(this.icon_realmodel, this.origin);
setsize(this.icon_realmodel, CPICON_MIN, CPICON_MAX);
set_movetype(this.icon_realmodel, MOVETYPE_NOCLIP);
- this.icon_realmodel.solid = SOLID_NOT;
}
if(this.iscaptured) { this.icon_realmodel.solid = SOLID_BBOX; }
- set_movetype(this, MOVETYPE_NOCLIP);
- this.solid = SOLID_NOT;
set_movetype(this, MOVETYPE_NOCLIP);
this.move_time = time;
this.drawmask = MASK_NORMAL;
setorigin(this, this.origin);
setmodel(this, MDL_ONS_GEN);
+ this.solid = SOLID_BBOX; // before setsize to ensure area grid linking
setsize(this, GENERATOR_MIN, GENERATOR_MAX);
set_movetype(this, MOVETYPE_NOCLIP);
- this.solid = SOLID_BBOX;
set_movetype(this, MOVETYPE_NOCLIP);
this.move_time = time;
this.drawmask = MASK_NORMAL;
{
entity e = new(onslaught_controlpoint_icon);
+ e.solid = SOLID_NOT; // before setsize/setorigin to prevent area grid linking
setsize(e, CPICON_MIN, CPICON_MAX);
setorigin(e, cp.origin + CPICON_OFFSET);
e.owner = cp;
e.max_health = autocvar_g_onslaught_cp_health;
SetResourceExplicit(e, RES_HEALTH, autocvar_g_onslaught_cp_buildhealth);
- e.solid = SOLID_NOT;
e.takedamage = DAMAGE_AIM;
e.bot_attack = true;
IL_PUSH(g_bot_targets, e);
}
}
setorigin(this, this.origin);
+ this.solid = SOLID_TRIGGER; // before setsize to ensure area grid linking
if(this.scale)
setsize(this, this.mins * this.scale, this.maxs * this.scale);
else
setsize(this, this.mins, this.maxs);
set_movetype(this, MOVETYPE_NONE);
- this.solid = SOLID_TRIGGER;
this.model = "";
}