Quote:
|
Originally Posted by kwo
Someone asked me about that...
|
Me?
I've looked into HLSDK about items. KWo, why don't you just hide items and make them non-solid or other way untouchable instead of removing them? Was it an optimization hint?
I tried to remove visual effect of falling down items. I did this with the next code, but read comments:
Code:
MakeEnt(item_id)
{
...
// NOTE: next code remove visual effect of falling items but an item
// can fall through the grate
if(!engfunc(EngFunc_DropToFloor, entid)) {
// item is dropped out of the level
engfunc(EngFunc_RemoveEntity, entid)
g_EntTable[entid] = -1
return 0
}
}
See a screenshot to make things clearer. Stupid engine function

Another way to fix it - make it invisible first. Then use tasks to emulate think function to detect an item is on the ground, then make it visible. But this can be CPU consuming. What you think?
And again a bounding boxe issue. See another screenshot. I think implementation of described above algrorithm becomes a must (we should set bounding boxes only when it's already on the ground).