set_movetype(this.icon_realmodel, MOVETYPE_NOCLIP);
}
- if(this.iscaptured) { this.icon_realmodel.solid = SOLID_BBOX; }
+ if(this.iscaptured)
+ {
+ this.icon_realmodel.solid = SOLID_BBOX;
+ setorigin(this.icon_realmodel, this.icon_realmodel.origin); // link
+ }
set_movetype(this, MOVETYPE_NOCLIP);
this.move_time = time;
sound(this, CH_TRIGGER, SND_ONS_CONTROLPOINT_BUILT, VOL_BASE, ATTEN_NORM);
this.owner.iscaptured = true;
this.solid = SOLID_BBOX;
+ setorigin(this, this.origin); // setorigin after change to solid field to ensure area grid linking
Send_Effect(EFFECT_CAP(this.owner.team), this.owner.origin, '0 0 0', 1);
setorigin(this, this.origin);
_setmodel(this, tur.model);
_setmodel(this.tur_head, tur.head_model);
+ this.solid = SOLID_BBOX; // before setsize so it will be linked to the area grid
+ this.tur_head.solid = SOLID_NOT;
setsize(this, tur.m_mins, tur.m_maxs);
setsize(this.tur_head, '0 0 0', '0 0 0');
set_movetype(this, MOVETYPE_NOCLIP);
this.tur_head.angles = this.angles;
SetResourceExplicit(this, RES_HEALTH, 255);
- this.solid = SOLID_BBOX;
- this.tur_head.solid = SOLID_NOT;
set_movetype(this, MOVETYPE_NOCLIP);
set_movetype(this.tur_head, MOVETYPE_NOCLIP);
this.draw = turret_draw;
Turret tur = get_turretinfo(this.m_id);
tur.tr_setup(tur, this);
+
+ setorigin(this, this.origin); // make sure it's linked to the area grid
}
entity rocket = new(walker_rocket);
setorigin(rocket, org);
-
+ rocket.solid = SOLID_BBOX; // before setsize so it will be linked to the area grid
sound (this, CH_WEAPON_A, SND_HAGAR_FIRE, VOL_BASE, ATTEN_NORM);
setsize (rocket, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
rocket.flags = FL_PROJECTILE;
IL_PUSH(g_projectiles, rocket);
IL_PUSH(g_bot_dodge, rocket);
- rocket.solid = SOLID_BBOX;
rocket.max_health = time + 9;
rocket.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT;
WriteAngle(MSG_ONE, 0);
}
- setsize(player, STAT(PL_MIN, player), STAT(PL_MAX, player));
-
player.takedamage = DAMAGE_AIM;
player.solid = SOLID_SLIDEBOX;
set_movetype(player, MOVETYPE_WALK);
}
player.last_vehiclecheck = time + 3;
player.vehicle_enter_delay = time + 2;
+ setsize(player, STAT(PL_MIN, player), STAT(PL_MAX, player));
CSQCVehicleSetup(player, HUD_NORMAL);
}
CSQCVehicleSetup(player, HUD_NORMAL);
- setsize(player, STAT(PL_MIN, player), STAT(PL_MAX, player));
player.takedamage = DAMAGE_AIM;
player.solid = SOLID_SLIDEBOX;
delete(gunner.(weaponentity));
}
player.vehicle_enter_delay = time + 2;
+ setsize(player, STAT(PL_MIN, player), STAT(PL_MAX, player));
fixedmakevectors(vehic.angles);
setmodel(_flare, MDL_VEH_RAPTOR_FLARE);
_flare.effects = EF_LOWPRECISION | EF_FLAME;
_flare.scale = 0.5;
+ _flare.solid = SOLID_CORPSE; // before setorigin so it will be linked to the area grid
setorigin(_flare, actor.origin - '0 0 16');
set_movetype(_flare, MOVETYPE_TOSS);
_flare.gravity = 0.15;
setthink(_flare, raptor_flare_think);
_flare.nextthink = time;
_flare.owner = veh ? veh : player;
- _flare.solid = SOLID_CORPSE;
_flare.takedamage = DAMAGE_YES;
_flare.event_damage = raptor_flare_damage;
SetResourceExplicit(_flare, RES_HEALTH, 20);
entity bomb_2 = new(bombmount_right);
vector org = gettaginfo(this, gettagindex(this, "bombmount_left"));
+ bomb_1.solid = bomb_2.solid = SOLID_BBOX; // before setorigin to ensure area grid linking
setorigin(bomb_1, org);
org = gettaginfo(this, gettagindex(this, "bombmount_right"));
setorigin(bomb_2, org);
bomb_1.owner = bomb_2.owner = this;
bomb_1.realowner = bomb_2.realowner = this.owner;
- bomb_1.solid = bomb_2.solid = SOLID_BBOX;
bomb_1.gravity = bomb_2.gravity = 1;
PROJECTILE_MAKETRIGGER(bomb_1);
{
entity sfrag = new(RaptorCBShellfrag);
setmodel(sfrag, MDL_VEH_RAPTOR_CB_FRAGMENT);
+ sfrag.solid = SOLID_CORPSE; // before setorigin to ensure area grid linking
setorigin(sfrag, _org);
set_movetype(sfrag, MOVETYPE_BOUNCE);
sfrag.gravity = 0.15;
- sfrag.solid = SOLID_CORPSE;
sfrag.draw = RaptorCBShellfragDraw;
IL_PUSH(g_drawables, sfrag);
b.angles = this.angles;
setsize(b, this.mins, this.maxs);
+ h.solid = SOLID_BBOX; // before setorigin for immediate area grid linking
vector org = gettaginfo(this, gettagindex(this, "tag_head"));
setorigin(h, org);
set_movetype(h, MOVETYPE_BOUNCE);
- h.solid = SOLID_BBOX;
h.velocity = v_up * (500 + random() * 500) + randomvec() * 128;
h.modelflags = MF_ROCKET;
h.effects = EF_FLAME | EF_LOWPRECISION;
setthink(h, spiderbot_headfade);
h.nextthink = time;
+ g1.solid = SOLID_CORPSE; // before setorigin for immediate area grid linking
org = gettaginfo(this.tur_head, gettagindex(this.tur_head, "tag_hardpoint01"));
setorigin(g1, org);
set_movetype(g1, MOVETYPE_TOSS);
- g1.solid = SOLID_CORPSE;
g1.velocity = v_forward * 700 + (randomvec() * 32);
g1.avelocity = randomvec() * 180;
+ g2.solid = SOLID_CORPSE; // before setorigin for immediate area grid linking
org = gettaginfo(this.tur_head, gettagindex(this.tur_head, "tag_hardpoint02"));
setorigin(g2, org);
set_movetype(g2, MOVETYPE_TOSS);
- g2.solid = SOLID_CORPSE;
g2.velocity = v_forward * 700 + (randomvec() * 32);
g2.avelocity = randomvec() * 180;
#else
teleporter.solid = SOLID_BSP;
#endif
+ setorigin(teleporter, teleporter.origin); // link it to the area grid
}
void Portal_Remove(entity portal, float killed)