#ifdef SVQC
void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner)
{SELFPARAM();
- int slot = 0; // TODO: parameter
- vector org = self.origin + self.view_ofs + self.weaponentity[slot].spawnorigin.x * v_forward - self.weaponentity[slot].spawnorigin.y * v_right + self.weaponentity[slot].spawnorigin.z * v_up;
+ .entity weaponentity = weaponentities[0]; // TODO: parameter
+ entity wep = self.(weaponentity);
+ vector org = self.origin + self.view_ofs + wep.spawnorigin.x * v_forward - wep.spawnorigin.y * v_right + wep.spawnorigin.z * v_up;
if (!sound_allowed(MSG_BROADCAST, casingowner))
casingtype |= 0x80;