| 11-11-2005, 03:41 PM | #1 |
I was always under the impression that creating player-specific fade filters wouldn't desynch, since I don't believe they return a sub-class of handles; but after testing it online, they apparently do. About a second after having the fade filter appear, I was dropped with the "Waiting for host..." dialog. To make sure it was the filters, I commented out any local fade filters I saw, and sure enough, it worked flawlessly. What is the best way around this? I believe Antarf said that you can set a local string independant for each player, and use that instead of performing the action only on certain clients: JASS:local string path = "" if (GetLocalPlayer() == [Some Player]) then set path = "The Real Path Goes Here" endif // Whatever action you need to carry out with the path. |
| 11-11-2005, 04:59 PM | #2 |
It depends on the trigger action you use. The advanced fade filter action does not desync. I'm not sure why this is so, I think the others generate a timer or something ike that... Anyway, I read this in a thread a long time ago where somebody tested a bunch of GUI actions with GetLocalPlayer() to see which desync, the "advanced fade filter" was said to work, and I later sucessfuly implemented that in a map without getting server splits. |
| 11-11-2005, 06:42 PM | #3 | |
Quote:
That seems very strange, since I can confirm the "standard" fade-filters do desynch. Thanks for the info. |
| 11-11-2005, 09:51 PM | #4 |
nono, its not strange at all :) if you look at the function for standard fade: JASS:function CinematicFadeBJ takes integer fadetype, real duration, string tex, real red, real green, real blue, real trans returns nothing if (fadetype == bj_CINEFADETYPE_FADEOUT) then // Fade out to the requested color. call AbortCinematicFadeBJ() call CinematicFadeCommonBJ(red, green, blue, duration, tex, 100, trans) elseif (fadetype == bj_CINEFADETYPE_FADEIN) then // Fade in from the requested color. call AbortCinematicFadeBJ() call CinematicFadeCommonBJ(red, green, blue, duration, tex, trans, 100) call FinishCinematicFadeAfterBJ(duration) elseif (fadetype == bj_CINEFADETYPE_FADEOUTIN) then // Fade out to the requested color, and then fade back in from it. if (duration > 0) then call AbortCinematicFadeBJ() call CinematicFadeCommonBJ(red, green, blue, duration * 0.5, tex, 100, trans) call ContinueCinematicFadeAfterBJ(duration * 0.5, red, green, blue, trans, tex) call FinishCinematicFadeAfterBJ(duration) endif else // Unrecognized fadetype - ignore the request. endif endfunction JASS:function FinishCinematicFadeAfterBJ takes real duration returns nothing // Create a timer to end the cinematic fade. set bj_cineFadeFinishTimer = CreateTimer() call TimerStart(bj_cineFadeFinishTimer, duration, false, function FinishCinematicFadeBJ) endfunction JASS:function CinematicFilterGenericBJ takes real duration, blendmode bmode, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing call AbortCinematicFadeBJ() call SetCineFilterTexture(tex) call SetCineFilterBlendMode(bmode) call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE) call SetCineFilterStartUV(0, 0, 1, 1) call SetCineFilterEndUV(0, 0, 1, 1) call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0)) call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1)) call SetCineFilterDuration(duration) call DisplayCineFilter(true) endfunction so all in all, ani was right :) but its not strange at all ;) |
| 11-12-2005, 02:41 AM | #5 |
Actually that is supposed to desync too. a solved fade filter for a specific player was made: http://www.wc3jass.com/viewtopic.php?t=86 |
| 11-12-2005, 09:03 AM | #6 | |
Quote:
Oh, right, because of the AbortCinematicFadeBJ() function. But that only comes into consideration if you use the regular fade filter actions in addition to this one, otherwise it won't desync. That explains why I didn't get a desync on my map. JASS:function AbortCinematicFadeBJ takes nothing returns nothing if (bj_cineFadeContinueTimer != null) then call DestroyTimer(bj_cineFadeContinueTimer) endif if (bj_cineFadeFinishTimer != null) then call DestroyTimer(bj_cineFadeFinishTimer) endif endfunction |
| 11-12-2005, 05:38 PM | #7 |
Thanks Vex and Antarf, I just assumed the fade filter functions were native's and didn't take a look at them. |
