CSQC CBaseEntity: Only set drawmask when modelindex is valid

This commit is contained in:
Marco Cawthorne 2020-01-20 19:35:57 +01:00
parent 905e90d499
commit 8f50766457

View file

@ -64,6 +64,10 @@ void CBaseEntity::ReadEntity(float flChanged)
}
if (flChanged & BASEFL_CHANGED_MOVETYPE) {
movetype = readbyte();
if (movetype == MOVETYPE_PHYSICS) {
movetype = MOVETYPE_NONE;
}
}
if (flChanged & BASEFL_CHANGED_SIZE) {
mins[0] = readcoord();
@ -86,7 +90,12 @@ void CBaseEntity::ReadEntity(float flChanged)
effects = readfloat();
}
drawmask = MASK_ENGINE;
if (modelindex) {
drawmask = MASK_ENGINE;
} else {
drawmask = 0;
}
setorigin(this, origin);
setsize(this, mins, maxs);
}