Mark., on 10 October 2015 - 07:46 AM, said:
Its intended use is for large models used for buildings and terrain where the origin sector maybe be nowhere near the player's view. Also for complicated and heavy model usage indoors where pipes,cables, vents etc... would be scattered all around and again their origin sectors would get out of player's view when turning around. Or stringing power lines across a city map where buildings might block the origin sector. Many more uses but you get my meaning.
I have an idea, though how practical it is in reality I don't know.
Attached image shows red overhead wires, one of which vanishes because it is in a sector (round the corner) not visible to the player. The following code illustrates the idea behind the fix, where the wire that goes missing is hitagged 666 :-
onevent EVENT_GAME
getactor[THISACTOR].hitag temp3
ifvare temp3 666
{
ifcansee
nullop
else
{
getactor[THISACTOR].sectnum temp3
ifvare temp3 0
{
setactor[THISACTOR].x 29568
setactor[THISACTOR].xoffset 0
setactor[THISACTOR].sectnum 1
}
else
{
setactor[THISACTOR].x 30080
setactor[THISACTOR].xoffset 8
setactor[THISACTOR].sectnum 0
}
}
}
endevent
OK, I hackcoded it here, but you get the idea. How feasible it'd be to automate this in a more general case I don't know.
Also in the attached map I made a second version - follow the red arrow
- no CON code needed, simply duplicated the missing sprite, moved it to another sector and adjusted it's xoffset to put it exactly where the original one was. Visually overlapping which, depending on where you are and where you are looking, one may vanish but the other remains visible. Now I appreciate this may be somewhat awkward with more complex structures.
Thing is, adding a pucka eduke flag isn't so easy. OK, adding the flag is

, but how do you define "always render", bearing in mind sorting is needed for who-is-in-front-of-who during rendering, that kinda thing. The situation could be improved if in addition to the rendering process using the center of a sprite for a render/no-render decision, it included say both ends of the sprite. But in particularly complex scenarious even that might fail This would require multiple player-can-see operations as well as calculating sector numbers in which those ends appear. Probably a lot of (computational) effort. Maybe someone with more detailed knowledge of the inner workings of the rendering process could better comment, but my gut feel is it would be difficult.
If I've misunderstood your issue, perhaps start a new thread with a small test map and lets see what we can do.
TTFN,
Jon
[EDit] OK, now I have me specs on, it isn't quite doing what I thought, bear with me whilst I work it out.