• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

LocalPlayer() fog of war does desync

Status
Not open for further replies.
So, this should be valid, then?
Code:
local fogmodifier fr = CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, bj_mapInitialPlayableArea, false, false)
        call FogModifierStop(fr)
    if GetLocalPlayer() == Player(0) then //+++++ REMOVING FOG MASK TO ALLOW PLAYER LOOK FOR MISSLE
call FogModifierStart(fr)
endif
set fr = null
 
So, this should be valid, then?
Code:
local fogmodifier fr = CreateFogModifierRect(Player(0), FOG_OF_WAR_VISIBLE, bj_mapInitialPlayableArea, false, false)
        call FogModifierStop(fr)
    if GetLocalPlayer() == Player(0) then //+++++ REMOVING FOG MASK TO ALLOW PLAYER LOOK FOR MISSLE
call FogModifierStart(fr)
endif
set fr = null
Yes,but...Is the fogmodifier created by "fr" no longer used
 
Also it will still cause a desync if it allows a unit to do something they could not do in the other state.

For example placing a range unit at the base of a cliff with a melee enemy unit above. By default the range unit cannot see the melee unit above so cannot attack it. A modifier is then created and kept disabled for everyone and the ranged unit still cannot see and attack the melee unit. The modifier is then enabled locally for a single player resulting in the ranged unit being able to attack the melee unit but just on that player's client. The player is now out of sync with every other client because on his client the ranged unit attacked the melee unit while on all other clients the range unit still has not attacked the melee unit.
 
Status
Not open for further replies.
Back
Top