wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
554 stars 332 forks source link

CamControler bug #955

Closed Yuri6037 closed 9 years ago

Yuri6037 commented 9 years ago

After going to a certain distance from the point the player is sitting down, the WireCamControler stops to update position and client parent entity is no longer rendered. Is there any way you can fix that ?

AbigailBuccaneer commented 9 years ago

@Divran this sounds like a bug with PVSs?

Yuri6037 commented 9 years ago

Note : I've tested that and reproduced that on TSCM Sandbox Build server, Person (server owner) said that he is using the latest WireMod, so I conclude that it's linked to yoru addon.

I can try to see if I can reproduce in singleplayer/fix the issue.

EDIT : The problem does not happen on Singleplayer it seams to be only related to servers.

Divran commented 9 years ago

I've had several issues with the player leaving the visleaf (or whatever it's called in source), but I thought I'd fixed them all using a special hook: https://github.com/wiremod/wire/blob/master/lua/entities/gmod_wire_cameracontroller.lua#L561-L568

@Yuri6037 try it in a local server instead (Instead of launching single player, set the number of players to greater than 1, so that it hosts a local server). Local servers behave similarly to actual servers (at least closer than single player), so you might be able to reproduce the issue there. If you can't reproduce it on the same map in a local server, I believe we can conclude that the issue is on the TSCM Sandbox Build server. Perhaps a badly coded addon is blocking the hook I linked above from being called?

Yuri6037 commented 9 years ago

After some research using TSCM's Starfall, I can conclude the problem is linked to entity remove client side ! After going to a certain distance entities you can't see are being removed client side but not server side causing Wire Cam Controler to fail updating position. To verify that I used print(entity) on an entity that is far away from player. I got a valid entity server side but when print(entity) client side by sending it's index (EntIndex) I see Null Entity.

Is this linked to Source Engine itself or is it TSCM ? I believe it's TSCM Anti lag or something like that.

EDIT : Definatly not happening in local server, I think it's a TSCM addon for anti lag or something like that.

Divran commented 9 years ago

If it is TSCM Anti lag then it's up to the server owner to fix it. The anti-lag should remove entities that are a certain distance away from the player's PVS, not from the player entity, since there are many ways that the player's PVS could be moved (not just via cam controller).

Yuri6037 commented 9 years ago

Thanks Drivan, please don't close this, I posted something on TSCM forums in the hope Person see the problem.

If you want to follow here is the link : http://teamscm.co.uk/showthread.php?tid=1309

Divran commented 9 years ago

Of course. Let me know if it turned out to be Wire's fault after all, although I don't think it is.

Divran commented 9 years ago

@AbigailBuccaneer okay but we just said not to close it <.< (yet)

AbigailBuccaneer commented 9 years ago

It can easily be reopened if needed, and all the evidence points to it being something other than us.