self.origin_x = ReadShort();
self.origin_y = ReadShort();
self.origin_z = ReadShort();
+ setorigin(self, self.origin);
}
if(sf & 4)
{
casing.origin_x = ReadCoord();
casing.origin_y = ReadCoord();
casing.origin_z = ReadCoord();
+ setorigin(casing, casing.origin);
casing.velocity = decompressShortVector(ReadShort());
casing.angles_x = ReadByte() * 360 / 256;
casing.angles_y = ReadByte() * 360 / 256;
org = trace_endpos;
}
- gib.move_origin = gib.origin = org;
+ gib.move_origin = org;
+ setorigin(gib, org);
gib.move_velocity = vconst * autocvar_cl_gibs_velocity_scale + vrand * autocvar_cl_gibs_velocity_random + '0 0 1' * autocvar_cl_gibs_velocity_up;
gib.move_avelocity = prandomvec() * vlen(gib.move_velocity) * autocvar_cl_gibs_avelocity_scale;
gib.move_time = time;
if(amount <= 0 || !isNew)
return;
- self.origin = org; // for the sounds
+ setorigin(self, org); // for the sounds
specnum = (type & 0x78) / 8; // blood/gibmodel type: using four bits (0..7, bit indexes 3,4,5)
issilent = (type & 0x40);
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(f & 8)
{
void ModelEffect_Draw()
{
self.angles = self.angles + frametime * self.avelocity;
- self.origin = self.origin + frametime * self.velocity;
+ setorigin(self, self.origin + frametime * self.velocity);
self.scale = self.scale1 + (self.scale2 - self.scale1) * (time - self.teleport_time) / (self.lifetime + self.fadetime - self.teleport_time);
self.alpha = self.cnt * bound(0, 1 - (time - self.lifetime) / self.fadetime, 1);
if(self.alpha < ALPHA_MIN_VISIBLE)
e.origin_x = ReadCoord();
e.origin_y = ReadCoord();
e.origin_z = ReadCoord();
+ setorigin(e, e.origin);
if(f & 1)
{
e.velocity_x = ReadCoord();
}
if(self.noise != "")
{
- self.origin = p;
+ setorigin(self, p);
sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
--i;
}
}
- self.origin = o;
+ setorigin(self, o);
}
void Ent_PointParticles_Remove()
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
if(self.count & 0x80)
{
self.velocity_x = ReadCoord();
default:
break;
}
+ setsize(self, self.mins, self.maxs);
}
if(self.gravity)
e.sameteam = 0;
}
- e.origin = getplayerorigin(i);
+ setorigin(e, getplayerorigin(i));
if(e.origin == GETPLAYERORIGIN_ERROR)
continue;
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(sendflags & 2)
gib.gravity = 1;
gib.move_movetype = MOVETYPE_BOUNCE;
- gib.move_origin = gib.origin = _from;
+ gib.move_origin = _from;
+ setorigin(gib, _from);
gib.move_velocity = _to;
gib.move_avelocity = prandomvec() * 32;
gib.move_time = time;
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
self.angles_x = ReadAngle();
self.angles_y = ReadAngle();
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(f & 4)
}
else
self.mins = self.maxs = '0 0 0';
+ setsize(self, self.mins, self.maxs);
if(self.bgmscript)
strunzone(self.bgmscript);
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
+ setorigin(self, self.origin);
}
if(sendflags & 1)
}
void InterpolateOrigin_Undo()
{
- self.origin = self.iorigin2;
+ setorigin(self, self.iorigin2);
if(self.iflags & IFLAG_ANGLES)
self.angles = fixedvectoangles2(self.iforward2, self.iup2);
if(self.iflags & IFLAG_VELOCITY)