}
Movetype_Physics_MatchTicrate(autocvar_cl_casings_ticrate, autocvar_cl_casings_sloppy);
+ if(wasfreed(self))
+ return; // deleted by touch function
self.renderflags = 0;
self.alpha = bound(0, self.cnt - time, 1);
break;
}
- sound (self, CH_SHOTS, s, VOL_BASE, ATTN_NORM);
+ sound (self, CH_SHOTS, s, VOL_BASE, ATTN_LARGE);
}
}
}
{
entity casing;
- casing = RubbleNew("casing");
+ casing = RubbleNew("casing");
casing.state = ReadByte();
casing.silent = (casing.state & 0x80);
casing.state = (casing.state & 0x7F);
}
setsize(casing, '0 0 -1', '0 0 -1');
- }
- else
- Casing_Delete();
- RubbleLimit("casing", autocvar_cl_casings_maxcount, Casing_Delete);
+ RubbleLimit("casing", autocvar_cl_casings_maxcount, Casing_Delete);
+ }
+ else
+ {
+ entity oldself = self;
+ self = casing;
+ Casing_Delete(); // yes, this IS stupid, but I don't need to duplicate all the read* stuff then
+ self = oldself;
+ }
}
void Casings_Precache()