Closed FreeSlave closed 1 year ago
This crash occurs because you made an entity solid without giving it a model. Take a look here: https://github.com/id-Software/Quake/blob/bf4ac424ce754894ac8f1dae6a3981954bc9852d/QW/server/world.c#L727-L728
If the entity is SOLID_NOT
then it's ignored. Otherwise it will be passed along the chain until it gets to SV_SingleClipMoveToEntity
which does this:
if ( sv.models[ent->v.modelindex]->type == 3 )
{
v7 = SV_HullForStudioModel(ent, mins, maxs, offset, &numhulls);
}
else
{
v7 = SV_HullForEntity(ent, mins, maxs, offset);
numhulls = 1;
}
Since you have no model it uses the model at index 0 which is null, that's where the crash occurs.
The crash doesn't occur when that change you linked to is reverted because the explosion is placed outside the map, so the explosion can't "see" the entity and can't hit it.
Thanks for clarification. I set invisible sprite as model and it works okay now. Closing issue.
Add this entity (e.g. to dlls/monsters.cpp)
Load this map explotest.zip. Take a handgrenade and throw one at the box.
For me this produces a crash with following backtrace going into the engine:
If I revert this commit https://github.com/SamVanheer/halflife-updated/commit/078e78766f3782563df5bd262ae0b17168a43b6b the crash doesn't happen.