After installing Anti-Map Hack the map crashes

Terrabull

Veteran Member (Done that)
Reaction score
38
Well the title says it all. I just finished installing Anti Map Hack (according to the directions.) and when the game finishes, it causes a fatal error, crashing warcraft.
Any ideas? I'm stumped.
 

ZugZugZealot

New Member
Reaction score
33
It's some code to counter the use of map hacking. From what I understand, is it's suppose to set all units outside a player's vision to have hidden status from that player, and of course when they go into vision hidden is disabled for the unit(s), and so on.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
It's some code to counter the use of map hacking. From what I understand, is it's suppose to set all units outside a player's vision to have hidden status from that player, and of course when they go into vision hidden is disabled for the unit(s), and so on.

I think he knows perfectly well what it is, but I don't think you get the sarcasm of it.

- We have no idea what system, code, triggers he is talking about.
- We have no link to the system.
- We don't have any reference from it in his script.

In basic twisted concept Terrabull is saying this:
I have a dog called hunker and he has a disease, how can I fix it?

I've seen multiple systems like that, one made in vJass, the other one uses models, etc, etc.
But I'm not going to guess, he gave us too little information to work with.
 

Terrabull

Veteran Member (Done that)
Reaction score
38
From my search of the archives it seemed AMH was a very common thing, because no one else did anything but provide a name. They all got help. Since this happened right as I installed it, I figured that it would be something at least one person had encountered before and be able to say "Oh that's this fix." Kinda like NewGen and it's 2.22 bugs.
The only like for the system I have is this:
http://www.epicwar.com/maps/59894/
And Epicwar is down.
 

Terrabull

Veteran Member (Done that)
Reaction score
38
Okay, I've gotten some feedback from my beta testers and it seems that fatals happen during the game when they issue a build queue to their workers. I am posting the only part of Map-Hack that I copied. This way hopefully I can narrow down the areas that might be causing the problem.
JASS:
library FogProtectShadowEngine needs ReplayDetectEngine
//*************************************************************************
//*                                                                       *                                          *
//*                      FOG PROTECT & SHADOW ENGINE v1.00                *
//*                      CONFIGURATION SETTINGS START HERE                *                     *
//*                                                                       *                                          *
//*************************************************************************
globals

// This is the default alpha value used for shadows. From visual experimentation the alpha
// value of Blizzards shadows appear to be 180. If desire you can change the value
// NOTE: If you wish you can change the alpha value of a shadow using the SetShadowAlpha
// method at any time, this is just the default value when the shadow is created
private integer shadowalpha_default = 180

// This is the interval period used by the system. 0.025 should be the LOWEST value, anything
// lower is pointless since 0.025 matches Wc3's maximum FPS (60 fp/s). If the system is
// causing lag then you should increase it to a value between 0.025 and 0.05. Anything higher
// then 0.05 is seriously not recommended since it will look visually choppy.
// NOTE: The system is INCREDIBLY efficient and it uses the struct-loop system (no H2I/attach
// methods are used for the timer interval) so in 99% of cases you should never have to increase
// the period
private real period = 0.025

endglobals
//*************************************************************************
//*                                                                       *                                          *
//*                            FOG PROTECT & SHADOW ENGINE v1.00          *                       *
//*                            CONFIGURATION SETTINGS END HERE            *                        *
//*                                                                       *                                          *
//*************************************************************************


globals
    private gamecache fp_datacache
    private gamecache fp_handlecache
    private boolean cachefirst = true
    private trigger RegisterUnit = CreateTrigger()
    private group g = CreateGroup()
    //Stack for shadow struct
    private integer array s_StructStack
    private integer array s_StructFreeStack
    private integer s_StructNumber = 0
    private integer s_StructFreeNumber = -1
    //Stack for  unit/graphic struct
    private integer array gp_StructStack
    private integer array gp_StructFreeStack
    private integer gp_StructNumber = 0
    private integer gp_StructFreeNumber = -1    
endglobals

private function H2I takes handle h returns integer
    return h
    return 0
endfunction

private function InitializeDataCache takes nothing returns nothing
call FlushGameCache(InitGameCache("fp_datacache"))
set fp_datacache=InitGameCache("fp_datacache")
endfunction

private function InitializeHandleCache takes nothing returns nothing
call FlushGameCache(InitGameCache("fp_handlecache"))
set fp_handlecache=InitGameCache("fp_handlecache")
endfunction

//Shadow Struct -> Public Use
struct shadow
    real x
    real y
    real centrex
    real centrey
    real width
    real height
    integer r
    integer g
    integer b
    integer a
    unit u
    string path
    image i
    boolean enabled = true
    integer position //position in relation to struct stack

    
    static method Create takes unit u, real centrex, real centrey, real width, real height, integer alpha, string path returns shadow
    local shadow s = shadow.create()
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    set s.x = x
    set s.y = y
    set s.width = width
    set s.height = height
    set s.a = alpha
    set s.u = u
    set s.centrex = centrex
    set s.centrey = centrey
    set s.path = path
    
    if path == "normal" or path == "Normal" or path == "NORMAL" then
        set s.path = "ReplaceableTextures\\Shadows\\Shadow.blp"
    elseif path == "flyer" or path == "Flyer" or path == "FLYER" then
        set s.path = "Textures\\Shadow.blp"
    elseif path == "none" or path == "None" or path == "NONE" then
        set s.path = ""
    endif
    set s.i = CreateImage(s.path, width, height, 0, x - (width / 2), y - (height / 2), 0, centrex, centrey, 0, 2) // image type indicator
    call SetImageRenderAlways(s.i, true)
    call ShowImage(s.i, true)
    call SetImageColor(s.i,255,255,255,alpha)
    set s.r = 255
    set s.g = 255
    set s.b = 255
    set s.a = 180
    //Update Struct Stack
    if s_StructFreeNumber<0 then
        set s.position = s_StructNumber
        set s_StructStack[s_StructNumber] = s
        set s_StructNumber = s_StructNumber+1
    else
        set s.position = s_StructFreeStack[s_StructFreeNumber]
        set s_StructStack[s.position] = s
        set s_StructFreeStack[s_StructFreeNumber] = -1
        set s_StructFreeNumber = s_StructFreeNumber-1
    endif
    call StoreInteger(fp_handlecache,I2S(H2I(s.u)),"0",s)
    return s
    endmethod
    
    method GetShadowPath takes nothing returns string
        return this.path
    endmethod
    
    method GetShadowAlpha takes nothing returns integer
        return this.a
    endmethod
    
    method GetShadowRed takes nothing returns integer
        return this.r
    endmethod
    
    method GetShadowGreen takes nothing returns integer
        return this.g
    endmethod
    
    method GetShadowBlue takes nothing returns integer
        return this.b
    endmethod
    
    method GetShadowCentreX takes nothing returns real
        return this.centrex
    endmethod
    
    method GetShadowCentreY takes nothing returns real
        return this.centrey
    endmethod
    
    method GetShadowHeight takes nothing returns real
        return this.height
    endmethod
    
    method GetShadowWidth takes nothing returns real
        return this.width
    endmethod
    
    method GetShadowUnit takes nothing returns unit
        return this.u
    endmethod
    
    method GetDefaultShadowCentreX takes nothing returns real
        local string s = UnitId2String(GetUnitTypeId(this.u))
        if GetStoredBoolean(fp_datacache,s,"exist") == true then
            return GetStoredReal(fp_datacache,s,"centrex")
        else
            return I2R(0)
        endif
    endmethod
    
    method GetDefaultShadowCentreY takes nothing returns real
        local string s = UnitId2String(GetUnitTypeId(this.u))
        if GetStoredBoolean(fp_datacache,s,"exist") == true then
            return GetStoredReal(fp_datacache,s,"centrey")
        else
            return I2R(0)
        endif
    endmethod
    
    method GetDefaultShadowHeight takes nothing returns real
        local string s = UnitId2String(GetUnitTypeId(this.u))
        if GetStoredBoolean(fp_datacache,s,"exist") == true then
            return GetStoredReal(fp_datacache,s,"height")
        else
            return I2R(0)
        endif
    endmethod
    
    method GetDefaultShadowWidth takes nothing returns real
        local string s = UnitId2String(GetUnitTypeId(this.u))
        if GetStoredBoolean(fp_datacache,s,"exist") == true then
            return GetStoredReal(fp_datacache,s,"width")
        else
            return I2R(0)
        endif
    endmethod
    
    method GetDefaultShadowPath takes nothing returns string
        local string s = UnitId2String(GetUnitTypeId(this.u))
        if GetStoredBoolean(fp_datacache,s,"exist") == true then
            return GetStoredString(fp_datacache,s,"path")
        else
            return ""
        endif
    endmethod
    
    method SetShadowColor takes integer red, integer green, integer blue, integer alpha returns nothing
        call SetImageColor(this.i,red,green,blue,alpha)
        set this.r = red
        set this.g = green
        set this.b = blue
        set this.a = alpha
    endmethod
    
    method SetShadowAlpha takes integer alpha returns nothing
        call SetImageColor(this.i,this.r,this.g,this.b,alpha)
        set this.a = alpha
    endmethod
    
    method SetShadowVisibility takes boolean visibility returns nothing
        call ShowImage(this.i,visibility)
        set this.enabled = visibility
    endmethod
    
    method SetShadowImage takes string path returns nothing
        local string truepath = path
        call DestroyImage(this.i)
        set this.i = null
        if path == "normal" or path == "Normal" or path == "NORMAL" then
            set truepath = "ReplaceableTextures\\Shadows\\Shadow.blp"
        elseif path == "flyer" or path == "Flyer" or path == "FLYER" then
            set truepath = "Textures\\Shadow.blp"
        elseif path == "none" or path == "None" or path == "NONE" then
            set truepath = ""
        endif
        set this.i = CreateImage(truepath, this.width, this.height, 0, this.x - (this.width / 2), this.y - (this.height / 2), 0, this.centrex, this.centrey, 0, 2) // image type indicator
        set this.path = truepath
        call SetImageRenderAlways(this.i, true)
        call ShowImage(this.i, true)
        call SetImageColor(this.i,this.r,this.g,this.b,this.a)
     endmethod
     
    method SetShadowImageEx takes string path, real centrex, real centrey, real width, real height returns nothing
        local string truepath = path
        call DestroyImage(this.i)
        set this.i = null
        if path == "normal" or path == "Normal" or path == "NORMAL" then
            set truepath = "ReplaceableTextures\\Shadows\\Shadow.blp"
        elseif path == "flyer" or path == "Flyer" or path == "FLYER" then
            set truepath = "Textures\\Shadow.blp"
        elseif path == "none" or path == "None" or path == "NONE" then
            set truepath = ""
        endif
        set this.i = CreateImage(truepath, width, height, 0, this.x - (width / 2), this.y - (height / 2), 0, centrex, centrey, 0, 2) // image type indicator
        set this.path = truepath
        set this.centrex = centrex
        set this.centrey = centrey
        set this.width = width
        set this.height = height
        call SetImageRenderAlways(this.i, true)
        call ShowImage(this.i, true)
        call SetImageColor(this.i,this.r,this.g,this.b,this.a)    
     endmethod
     
    method SetShadowDimeansions  takes real centrex, real centrey, real width, real height returns nothing
        call DestroyImage(this.i)
        set this.i = null
        set this.i = CreateImage(this.path, width, height, 0, this.x - (width / 2), this.y - (height / 2), 0, centrex, centrey, 0, 2) // image type indicator
        set this.centrex = centrex
        set this.centrey = centrey
        set this.width = width
        set this.height = height
        call SetImageRenderAlways(this.i, true)
        call ShowImage(this.i, true)
        call SetImageColor(this.i,this.r,this.g,this.b,this.a)
    endmethod
    
    method onDestroy takes nothing returns nothing
    call DestroyImage(this.i)
    set this.i = null
    set s_StructStack[this.position] = -1
    if (this.position>=(s_StructNumber-1)) then
        set s_StructNumber = s_StructNumber-1
    else
        set s_StructFreeNumber = s_StructFreeNumber+1
        set s_StructFreeStack[s_StructFreeNumber] = this.position
    endif
    call StoreInteger(fp_handlecache,I2S(H2I(this.u)),"0",0)
    set this.u = null
    set this.position = -1
    endmethod
     
endstruct

//Struct for managing SetUnitVertexColor/SetUnitScale
struct unitgraphic
    unit u
    integer r
    integer g
    integer b
    integer a
    real x
    real y
    real z
    boolean enabled
    integer position //position in relation to struct stack
    
    static method Create takes unit u, integer red, integer green, integer blue, integer alpha, real x, real y, real z returns unitgraphic
    local unitgraphic gp = unitgraphic.create()
    set gp.r = red
    set gp.g = green
    set gp.b = blue
    set gp.a = alpha
    set gp.x = x
    set gp.y = y
    set gp.z = z
    set gp.u = u
    set gp.enabled = true
    //Update Struct Stack
    if gp_StructFreeNumber<0 then
        set gp.position = gp_StructNumber
        set gp_StructStack[gp_StructNumber] = gp
        set gp_StructNumber = gp_StructNumber+1
    else
        set gp.position = gp_StructFreeStack[gp_StructFreeNumber]
        set gp_StructStack[gp.position] = gp
        set gp_StructFreeStack[gp_StructFreeNumber] = -1
        set gp_StructFreeNumber = gp_StructFreeNumber-1
    endif
    call StoreInteger(fp_handlecache,I2S(H2I(gp.u)),"1",gp)
    set u = null
    return gp
    endmethod
    
    method SetVertexColor takes integer red, integer green, integer blue, integer alpha returns nothing
    set this.r = red
    set this.g = green
    set this.b = blue
    set this.a = alpha
    endmethod
    
    method SetVertexColorBJ takes real red, real green, real blue, real transparency returns nothing
    call this.SetVertexColor(PercentTo255(red), PercentTo255(green), PercentTo255(blue), PercentTo255(100.0-transparency))
    endmethod
    
    method SetScale takes real scaleX, real scaleY, real scaleZ returns nothing
    set this.x = scaleX
    set this.y = scaleY
    set this.z = scaleZ
    endmethod
    
    method SetScalePercent takes real percentScaleX, real percentScaleY, real percentScaleZ returns nothing
    call this.SetScale(percentScaleX * 0.01, percentScaleY * 0.01, percentScaleZ * 0.01)
    endmethod

    method SetGraphicVisibility takes boolean visibility returns nothing
        set this.enabled = visibility
    endmethod
    
    method GetScaleX takes nothing returns real
        return this.x
    endmethod
    
    method GetScaleY takes nothing returns real
        return this.y
    endmethod
    
    method GetScaleZ takes nothing returns real
        return this.z
    endmethod
    
    method GetVertexColorRed takes nothing returns integer
        return this.r
    endmethod
    
    method GetVertexColorGreen takes nothing returns integer
        return this.g
    endmethod
    
    method GetVertexColorBlue takes nothing returns integer
        return this.b
    endmethod
    
    method GetVertexColorAlpha takes nothing returns integer
        return this.a
    endmethod
    
    method GetGraphicVisibility takes nothing returns boolean
        return this.enabled
    endmethod
    
    method onDestroy takes nothing returns nothing
    set gp_StructStack[this.position] = -1
    if (this.position>=(gp_StructNumber-1)) then
        set gp_StructNumber = gp_StructNumber-1
    else
        set gp_StructFreeNumber = gp_StructFreeNumber+1
        set gp_StructFreeStack[gp_StructFreeNumber] = this.position
    endif   
    set this.position = -1
    call StoreInteger(fp_handlecache,I2S(H2I(this.u)),"1",0)
    set this.u = null
    endmethod
   
endstruct

//Public Functions

function RegisterUnitShadow takes integer UnitID, real centrex, real centrey, real height, real width, string ShadowType returns nothing
local string s
if cachefirst then
    call InitializeDataCache()
    set cachefirst = false
endif
set s = UnitId2String(UnitID)
call StoreBoolean(fp_datacache,s,"exist",true)
call StoreReal(fp_datacache,s,"height",height)
call StoreReal(fp_datacache,s,"width",width)
call StoreReal(fp_datacache,s,"centrex",centrex)
call StoreReal(fp_datacache,s,"centrey",centrey)
call StoreString(fp_datacache,s,"path",ShadowType)
endfunction

function RegisterUnitTintEx takes integer UnitID, integer red, integer green, integer blue, integer alpha returns nothing
local string s
if cachefirst then
    call InitializeDataCache()
    set cachefirst = false
endif
set s = UnitId2String(UnitID)
call StoreBoolean(fp_datacache,s,"customtint",true)
call StoreInteger(fp_datacache,s,"tintred",red)
call StoreInteger(fp_datacache,s,"tintgreen",green)
call StoreInteger(fp_datacache,s,"tintblue",blue)
call StoreInteger(fp_datacache,s,"tintalpha",alpha)
endfunction

function RegisterUnitTint takes integer UnitID, integer red, integer green, integer blue returns nothing
call RegisterUnitTintEx(UnitID,red,green,blue,255)
endfunction

function RegisterUnitScaleEx takes integer UnitID, real scaleX, real scaleY, real scaleZ returns nothing
local string s
if cachefirst then
    call InitializeDataCache()
    set cachefirst = false
endif
set s = UnitId2String(UnitID)
call StoreBoolean(fp_datacache,s,"customscale",true)
call StoreReal(fp_datacache,s,"scalex",scaleX)
call StoreReal(fp_datacache,s,"scaley",scaleY)
call StoreReal(fp_datacache,s,"scalez",scaleZ)
endfunction

function RegisterUnitScale takes integer UnitID, real scale returns nothing
call RegisterUnitScaleEx(UnitID,scale,scale,scale)
endfunction

function SetUnitVertexColorAMHS takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing
local unitgraphic gp
if whichUnit != null then
    set gp = GetStoredInteger(fp_handlecache,I2S(H2I(whichUnit)),"1")
    set gp.r = red
    set gp.g = green
    set gp.b = blue
    set gp.a = alpha
endif
endfunction

function SetUnitVertexColorBJAMHS takes unit whichUnit, real red, real green, real blue, real transparency returns nothing
    call SetUnitVertexColorAMHS(whichUnit, PercentTo255(red), PercentTo255(green), PercentTo255(blue), PercentTo255(100.0-transparency))
endfunction

function SetUnitScaleAMHS takes unit whichUnit, real scaleX, real scaleY, real scaleZ returns nothing
local unitgraphic gp
if whichUnit != null then
    set gp = GetStoredInteger(fp_handlecache,I2S(H2I(whichUnit)),"1")
    set gp.x = scaleX
    set gp.y = scaleY
    set gp.z = scaleZ
endif
endfunction

function SetUnitScalePercentAMHS takes unit whichUnit, real percentScaleX, real percentScaleY, real percentScaleZ returns nothing
    call SetUnitScaleAMHS(whichUnit, percentScaleX * 0.01, percentScaleY * 0.01, percentScaleZ * 0.01)
endfunction

function GetUnitShadow takes unit u returns integer
    if u == null then
        return 0
    endif
    return GetStoredInteger(fp_handlecache,I2S(H2I(u)),"0")
endfunction

function GetUnitGraphic takes unit u returns integer
    if u == null then
        return 0
    endif
    return GetStoredInteger(fp_handlecache,I2S(H2I(u)),"1")
endfunction

//End Public Functions

private function AddUnits takes unit u returns nothing
    local string s
    local string path
    local real centrex
    local real centrey
    local real height
    local real width
    local integer red = 255
    local integer green = 255
    local integer blue = 255
    local integer alpha = 255
    local real x = 1
    local real y = 1
    local real z = 1
    local shadow sh
    local unitgraphic gp
    set s = UnitId2String(GetUnitTypeId(u))
    if fp_datacache == null then
        call BJDebugMsg("test")
    endif
    if GetStoredBoolean(fp_datacache,s,"exist") == true then
        set path = GetStoredString(fp_datacache,s,"path")
        set centrex = GetStoredReal(fp_datacache,s,"centrex")
        set centrey = GetStoredReal(fp_datacache,s,"centrey")
        set height = GetStoredReal(fp_datacache,s,"height")
        set width = GetStoredReal(fp_datacache,s,"width")
        set sh = shadow.Create(u,centrex,centrey,width,height,shadowalpha_default,path)
    else
        call BJDebugMsg("|cFFFF0000AMHS ERROR: Unable to create shadow for unit with UnitType ID " + s)
    endif

    if GetStoredBoolean(fp_datacache,s,"customtint") then
        set red = GetStoredInteger(fp_datacache,s,"tintred")
        set green = GetStoredInteger(fp_datacache,s,"tintgreen")
        set blue = GetStoredInteger(fp_datacache,s,"tintblue")
        set alpha = GetStoredInteger(fp_datacache,s,"tintalpha")
    endif
    if GetStoredBoolean(fp_datacache,s,"customscale") then
        set x = GetStoredReal(fp_datacache,s,"scalex")
        set y = GetStoredReal(fp_datacache,s,"scaley")
        set z = GetStoredReal(fp_datacache,s,"scalez")
    endif
    set gp = unitgraphic.Create(u,red,green,blue,alpha,x,y,z)
    set u = null
endfunction

private function ShadowGraphicManager takes nothing returns nothing
local unitgraphic gp
local shadow s
local integer counter = 0
local integer counter2 = 0
local real l1 = GetRandomReal(1000,10000000000)
local real l2 = GetRandomReal(1000,10000000000)
local real l3 = GetRandomReal(1000,10000000000)
loop
    exitwhen counter2 == 11
    if (GetPlayerSlotState(Player(counter2)) == PLAYER_SLOT_STATE_PLAYING) and (GetPlayerController(Player(counter2)) == MAP_CONTROL_USER) then
        loop
            if (gp_StructStack[counter]) > -1 then
                set gp = gp_StructStack[counter]
                if gp.u == null then
                    call gp.destroy()
                else       
                    if IsUnitVisible(gp.u,Player(counter2)) then
                        if GetLocalPlayer() == Player(counter2) then
                            if gp.enabled then
                                call SetUnitVertexColor(gp.u,gp.r,gp.g,gp.b,gp.a)
                                call SetUnitScale(gp.u,gp.x,gp.y,gp.z)
                            else
                                call SetUnitVertexColor(gp.u,0,0,0,0)
                                call SetUnitScale(gp.u,-l1,-l2,-l3)
                            endif
                        endif
                    else
                        if GetLocalPlayer() == Player(counter2) and InGame then
                            call SetUnitVertexColor(gp.u,0,0,0,0)
                            call SetUnitScale(gp.u,-l1,-l2,-l3)
                        endif
                    endif
                endif
            endif
            set counter = counter + 1
            exitwhen counter >= gp_StructNumber
        endloop
        set counter = 0
        loop
            if (s_StructStack[counter]) > -1 then
                set s = s_StructStack[counter]
                if s.u == null then
                    call s.destroy()
                else       
                    if IsUnitVisible(s.u,Player(counter2)) then
                        if GetLocalPlayer() == Player(counter2) then
                            if s.enabled then
                                call ShowImage(s.i,true)
                            else
                                call ShowImage(s.i,false)
                            endif
                        endif
                    else
                        if GetLocalPlayer() == Player(counter2) and InGame then
                            call ShowImage(s.i,false)
                        endif
                    endif
                call SetImagePosition(s.i,GetUnitX(s.u),GetUnitY(s.u),0)
                endif
            endif
            set counter = counter + 1
            exitwhen counter >= s_StructNumber
        endloop
    endif
set counter2 = counter2 + 1
endloop
endfunction

private function GroupAdder takes nothing returns nothing
    call AddUnits(GetEnumUnit())
endfunction

private function TriggerAdder takes nothing returns boolean
    call AddUnits(GetTriggerUnit())
    return true
endfunction

private function AntiLeak takes nothing returns boolean
    return true
endfunction

private function FinalGroup takes nothing returns nothing
    call GroupAddUnit(g,GetEnumUnit())
endfunction

function Trig_Shadow_Engine_Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local integer i = 0
    local group tempgroup
    call InitializeHandleCache()
    if cachefirst then
        call InitializeDataCache()
        set cachefirst = false
    endif
    loop
        exitwhen i > 15
        set tempgroup = CreateGroup()
        call GroupEnumUnitsOfPlayer(tempgroup, Player(i), Filter( function AntiLeak))
        call ForGroup(tempgroup, function FinalGroup)
        call DestroyGroup(tempgroup)
        set tempgroup = null
        set i = i + 1
    endloop
    call ForGroup(g,function GroupAdder)
    call DestroyGroup(g)
    call TriggerRegisterEnterRectSimple(RegisterUnit, bj_mapInitialPlayableArea)
    call TriggerAddCondition(RegisterUnit, Condition (function TriggerAdder))
    call TimerStart(t,period,true,function ShadowGraphicManager)
    set t = null
    set tempgroup = null
endfunction

//===========================================================================
function InitTrig_Fog_Protect_and_Shadow_Engine takes nothing returns nothing
    set gg_trg_Fog_Protect_and_Shadow_Engine = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle(gg_trg_Fog_Protect_and_Shadow_Engine, 0.00)
    call TriggerAddAction( gg_trg_Fog_Protect_and_Shadow_Engine, function Trig_Shadow_Engine_Actions )
endfunction
endlibrary
JASS:
//**************************************************************************************
//*                                                                                    *
//*                         REPLAY DETECT ENGINE V1.30                                 *
//*                     CONFIGURATION SETTINGS START HERE                              *
//*                                                                                    *
//**************************************************************************************
library ReplayDetectEngine
globals
boolean InGame = true
boolean array AMHS_FogDisable
boolean array AMHS_InvisDisable
unit array AMHS_FogDummy
unit array AMHS_InvisDummy
endglobals

//-> IsInGame created by PandaMine with help from Captain Griffen
//This function is what makes it possible for the system not to break replays,
//simply put if your actually playing the game, this function will return false.
//It will return true if the game is being viewed in a replay

private function IsInGame takes nothing returns boolean
local integer counter = 1
local real camerax
local real cameray
local real x
local real y
local boolean output
loop
    exitwhen counter > 12
    if GetLocalPlayer() == Player(counter-1) then
        set camerax = GetCameraTargetPositionX()
        set cameray = GetCameraTargetPositionY()
    endif
    set counter = counter + 1
endloop
set counter = 1
call PauseGame(true)
call TriggerSleepAction(0)
loop
    exitwhen counter > 12
    if GetLocalPlayer() == Player(counter-1) then
        call SetCameraPosition(camerax + 1,cameray + 1)
    endif
    set counter = counter + 1
endloop
call TriggerSleepAction(0)
call PauseGame(false)
set counter = 1
loop
    exitwhen counter > 12
    if GetLocalPlayer() == Player(counter-1) then
        set x = GetCameraTargetPositionX()
        if x == camerax + 1 then
            set output = true
        else
            set output = false
        endif
        call SetCameraPosition(camerax,cameray)
    endif
    set counter = counter + 1
endloop
return output
endfunction 

function AMHS_ReplayEngine takes nothing returns nothing
call EnableUserControl(false)
call TriggerSleepAction(.0)
set InGame = IsInGame()
call EnableUserControl(true)
endfunction

//===========================================================================
function InitTrig_Replay_Detect_Engine takes nothing returns nothing
    set gg_trg_Replay_Detect_Engine = CreateTrigger(  )
endfunction
endlibrary
 

Terrabull

Veteran Member (Done that)
Reaction score
38
Epicwar is back up now. The problem still persists, and I have no idea why.

This system uses GameCache. Given this thread:
http://www.wc3jass.com/viewtopic.php?t=2334&highlight=hack

Could that be the problem? If it is, how would I fix it? Do I need to get PUI or something?
Never mind, after reading further it turns out it is only for Single Player. The search continues.
Never mind what I said about the build queue. I'm getting reports of fatals all the time now, not just at certain times. Including during loading, which is very confusing to me.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top