• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Cine filters for player only (desyncs)

Status
Not open for further replies.
Level 25
Joined
Feb 2, 2006
Messages
1,689
I have played around a bit with cine filters for players only using GetLocalPlayer() and it led to desyncs in the game.
Is there some documentation which functions are really safe for players only?

We have these natives:

Code:
native SetCineFilterTexture             takes string filename returns nothing
native SetCineFilterBlendMode           takes blendmode whichMode returns nothing
native SetCineFilterTexMapFlags         takes texmapflags whichFlags returns nothing
native SetCineFilterStartUV             takes real minu, real minv, real maxu, real maxv returns nothing
native SetCineFilterEndUV               takes real minu, real minv, real maxu, real maxv returns nothing
native SetCineFilterStartColor          takes integer red, integer green, integer blue, integer alpha returns nothing
native SetCineFilterEndColor            takes integer red, integer green, integer blue, integer alpha returns nothing
native SetCineFilterDuration            takes real duration returns nothing
native DisplayCineFilter                takes boolean flag returns nothing
native IsCineFilterDisplayed            takes nothing returns boolean

and then there are the BJs:

Code:
CinematicFadeCommonBJ
CinematicFadeBJ
CinematicFilterGenericBJ

I would have thought that the first one CinematicFadeCommonBJ should be safe for players only but the second one CinematicFadeBJ is not since it uses a timer etc. and CinematicFilterGenericBJ isn't safe either because it uses AbortCinematicFadeBJ which destroys a timer. Is this correct or can I only use DisplayCineFilter in a GetLocalPlayer block?
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
As I have understood, you can do something like this:
vJASS:
local real trans0 = 0.00
local real trans1 = 0.00
if GetLocalPlayer() == <Your player> then
    set trans0 = 100.00
    set trans1 = 100.00
endif
call CinematicFilterGenericBJ( duration, bmode, tex, red0, green0, blue0, trans0, red1, green1, blue1, trans1 )
So all players will have the filter but only some of them will see it.
 
Status
Not open for further replies.
Top