.qc (dot qc) - the group for quake c coders of all denominations. If you make quake one mods and write code in quake c, join our group! I'll try to answer any quake c questions - please post your inquiry in the forums...
The eponymous crash report...
Server crashes with no free edicts - that is 32767 entities allocated.
This has happened 2 times. I have a sneaky suspicion something is amiss in tbaby_mitosis.
Some kind of race condition that allocates every free entity.
Will report back with the fix.
When you are debugging your own code -
(Or even better when writing it)
watch out for this...
ldmg = random() * 6;
while (ldmg > 0)
{
tbaby_mitosis(ldmg);
item_eject(newmis, GEN_BOUNCE);
}
Doh!
Seems I forgot to decrement ldmg in the loop. So the loop runs forever ejecting bits and making more blobs. Until there are no ents left.
Since it only happens in this case:
if (self.spawnflags & TB_SUPER)
if (random() < 0.2) // baby blast!
It doesnt occur very often, only 20% chance on a super tarbaby death.
Well, fixed like this:
while (ldmg > 0)
{
tbaby_mitosis(ldmg);
item_eject(newmis, GEN_BOUNCE);
ldmg = ldmg - 1; // fix loop error
}