I found yesterday what really involved the invisibility bug. The fix needs few tests so if available coders what to do some tests before I commit the fix that would be a good idea.
Firstly, here is the final fix I have at that time for the 1.1 branch, but it should work also with 1.0 release:
1. Remove the workaround I found last summer in code/game/g_utils.c by removing the 2 last lines in the G_InitGentity function
2. Apply the fix by removing the last line (the "trap_LinkEntity(ent);") of G_MoverContents function in code/game/g_mover.c... that's all.
Secondly, after only removing the last summer workaround, you can reproduce the invisibility bug by:
1. start a dedicated server with only one bot and without connecting as client, start the dm_train map: you'll obtain a bot playing in Santa Fe Express map. That bot will then own the entity number 0, that's the important point... (You can also reproduce the case with 2 guys without bots and the first connected guy should own the entity number 0)
2. Connect as client and go in free spectator mode, you'll own the entity number 1
3. As spectator, follow the bot and you should see it going invisible each time it comes next to a door. I discover one thing, if you add other bots, or if other guys are playing, each time someone comes next to a door, the bot as entity 0 will become invisible even if it is not next to a door. So with more bot/people the bot can become invisible really often... Normally you won't see its shadow, but you can see it if you spectate the bot in third person view.
Thirdly, apply the fix, and test again, everything should be normal now.
Maybe other bugs can be related to that fix. Tell me if you notice something.
About the fix, the bugged trap_LinkEntity(ent) will be called everytime a player entity is comming next to a door as G_MoverContents is used to check if the player trigger the door. Then linked entity will be in fact the last known by the game... and should only be an empty one with also "0" as entity number, but also empty mix/max and that's explains why the entity 0 will become invisible... So I'm not completly sure the logic around that test is the best, so anyone interested to enhance it can try some other way and propose the best he found.
Also, my last summer workaround should have involved a little more network traffic by sending too many entities to each clients at each network frame, so that new fix should improve a little the network efficiency. I still don't know if that can be a real improvement, but any such gained overhead should remove any minor cases we can't really understand.
Then I won't be around (and won't do deeper tests then) for 3 days or more, so any other good report before I came back about that bug could help
Thanks in advance to contributors
Edit: Fixed a typo in the thread title...