I wonder how the entities are stored in HL. Why? Because i need to be sure for a traceline function i am writing.
In HL1, i see for looping through clients, to know player index + entity, we use INDEXENT(index).
I see in the RACC code, the EXACT SAME THING, happens. So that means, we copy players too in the index. Though i am not interested in those!
My traceline function, is taking either an iPlayer index, OR an iEntity index. Since MY entities list starts with 0, i want to keep it this way. So you mean, ENTITY 10 in MY list, it must translate this index into the proper index of HL1 and then find the correct pEdict for it...
So far i have this:
Code:
// when iEntityFires is set, so this entity should be ignored
if (iEntityFires)
{
// FIXME: Is this true or not?
// The entity in half-life is indexed , 0 = worldspawn, 1 to > max players is the player
// so , in order to know the correct entity compared to our list, we should somehow
// compensate.
//
// so, in ITM_, the real entity list starts at 0
// in Half-Life it starts at 1
// , in ITM we have a SEPERATED clients list
// , in HL its integrated in the entity list
//
//
// so, to be sure ITM Index 0 equals HL1 entity 1 (cause 0 is worldspawn) we have to do
//
// entity_index = iITMEntityIndex+MaxPlayersInServer
// pEntIgnore = INDEXENT (entity_index); // attempt to bind this entity's structure
}
as you can see, only comments. My question is, is the theory correct?
And yes, i know, i could just copy the entire freaking list, what is 32 entities anyway at max? But even then...