| 08-07-2006, 09:44 PM | #1 |
I have issues with netsplits after some duration on my map. I have several GetLocalPlayer conditions on my map, I will post them all and hopefully some of you who understand this can help me out and tell me exactly what CAN cause a split, and what can't.. i'll post everything that has to do with GetLocalPlayer. Btw, if there are other reasons for desyncs, can you post them here? i'd like to get rid of this issue once and for all. JASS:
if (GetLocalPlayer() == ForPlayer) then
call DisplayTimedTextToPlayer( ForPlayer, .52, -1, 2, "|cffffcc00"+msg+"|r" )
call StartSound(error)
endif
JASS:function FadingTextSingle takes player p, string msg, integer red, integer green, integer blue, real x, real y, real vel, real fade, real life returns nothing local texttag t=CreateTextTag() call SetTextTagText(t,msg,0.024) call SetTextTagPos(t,x,y, 0.00) call SetTextTagColor(t,red,green,blue,255) call SetTextTagVelocity(t,0,vel) call SetTextTagVisibility(t,(GetLocalPlayer() == p)) Not sure about that one either. JASS:
if GetLocalPlayer() == p2 then
call ClearTextMessages()
call ClearSelection()
endif
JASS:
if GetLocalPlayer() == GetOwningPlayer(temp) then
call PingMinimapEx(GetRectCenterX(gg_rct_Light_Spirit_Master), GetRectCenterY(gg_rct_Light_Spirit_Master), 10, 255, 255, 255, true)
endif
JASS:
if GetLocalPlayer()==p then
call SetCameraQuickPosition(GetUnitX(axe2), GetUnitY(axe2))
endif
JASS:
if GetLocalPlayer() == p then
call ClearSelection()
call SelectUnit(u, true)
endif
JASS:
if GetLocalPlayer() == GetTriggerPlayer() then
call SetCameraField(ConvertCameraField(0), CameraSetupGetField(gg_cam_Zoomout1, ConvertCameraField(0)), 2)
endif
Stuff i'm worried about especially is the cameraquickposition that is being used ALOT, however, it is from a BJ, so I wonder about that. Everything here are from BJ's, thats why im confused as to why i still got netsplits. |
| 08-07-2006, 09:53 PM | #2 |
nothing there seems suspicious enough, you know, there are other ways to cause desyncs without even using GetLocalPlayer. |
| 08-07-2006, 10:05 PM | #3 | |
Quote:
|
| 08-07-2006, 10:14 PM | #4 |
Well several natives retrieve local information that shouldn't be used unsynced. These are essentially: JASS:GetCameraTargetPosition, GetCamera...Whatever, IsMultiboardDisplayed/Minimized and maybe others. |
| 08-07-2006, 11:01 PM | #5 |
This site has some info about desynchs: http://dwarfcampaign.com/wiki/index....ltiplayer_maps some of those may be false though. |
| 08-07-2006, 11:20 PM | #6 | |
I would say that Quote:
Are false |
| 08-07-2006, 11:40 PM | #7 |
Changing game speed during the game and having lots of creep camps close to each other are two other possible causes. |
| 08-07-2006, 11:41 PM | #8 |
Anyone who could write that stuff has obviously never seen the PolledWait function. It has never caused a desync, and breaks those rules. Additionally, I've never seen 0 sight range cause a desync, despite a lot of maps using it. Best bet to think logically about what is happening at the time, and which of them are slightly unusual (ie, you don't KNOW won't cause a desync). |
| 08-08-2006, 04:41 AM | #9 |
I do actually have an ability that causes 0 sight range, either way I'll try to eliminate that and see whats up. |
| 08-08-2006, 01:02 PM | #10 |
As far as I know the caster system's dummy uses 0 sight range, then every map with the caster system would desync, hey even dota uses that dummy unit. |
| 08-08-2006, 01:13 PM | #11 |
| 08-08-2006, 01:34 PM | #12 |
No need for that link is there? |
| 08-08-2006, 02:35 PM | #13 |
This version is copy/paste secured... I dont see any problem here. Local player for non existant player cause split, add check for this inside functions. Any string typed will be registered inside wc3 simerror may be unsafe some times. best way to declare string outside localplayer. |
| 08-08-2006, 02:54 PM | #14 | |
Quote:
Thanks, that will help me greatly. |
| 08-08-2006, 04:16 PM | #15 | |
Quote:
|
