• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Help with a map

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2017
Messages
34
Hello, friends! Not knowing if I correctly posted the topic or not, I thought for a long time which section, but not the essence ......
The problem is, I made a map of the arena, with bots. The first outline so to speak, decided to test with a friend, but every time I play five minutes later throws out. Checked in the local network at home, the same thing. I checked the card code several times but did not see anything like it. Already how much I am engaged in this I did not see such still. Help advice if possible!
 

Dr Super Good

Spell Reviewer
Level 65
Joined
Jan 18, 2005
Messages
27,296
Are you saying that your map out of syncs with other players?

If it does not use GetLocalPlayer or other advanced synchronization breaking functions, then you are likely using the one broken GUI pan camera action.

Running the following action in GUI will cause the panned players to out of sync. This is because it creates a location within a locally executed block which messes up handle ID allocations for that player's client.
JASS:
function SmartCameraPanBJ takes player whichPlayer,location loc,real duration returns nothing
    local real dist
    if (GetLocalPlayer() == whichPlayer) then
        set dist = DistanceBetweenPoints(loc, GetCameraTargetPositionLoc()) // OoS HERE!
        if (dist >= bj_SMARTPAN_TRESHOLD_SNAP) then
            call PanCameraToTimed(GetLocationX(loc), GetLocationY(loc), 0)
        elseif (dist >= bj_SMARTPAN_TRESHOLD_PAN) then
            call PanCameraToTimed(GetLocationX(loc), GetLocationY(loc), duration)
        else
        endif
    endif
endfunction
 
Status
Not open for further replies.
Top