wc3edit.net
https://forum.wc3edit.net/

Improve JJCP
http://forum.wc3edit.net/deprotection-cheating-f64/improve-jjcp-t10945.html
Page 1 of 1

Author:  youkaiz [ May 6th, 2009, 7:29 am ]
Post subject:  Improve JJCP

When i testing my map with JJCP it create lots of leaks with -tele cheat.(because have so many units in my map)
Each time a unit receive a order it create an leak, in RPG maps or maps with many units in can cause havy lag
(default angel handles is +- 4000 handles when use -tele it can create more than 1000 handles per min)

but it can be easy fix.

Search in JJCP for Tele2 and add "call RemoveLocation(k2k)" after endif
Like this:

function Tele2 takes nothing returns nothing
local unit u2u=GetTriggerUnit()
local location k2k=GetOrderPointLoc()
if GetIssuedOrderId()==851990then
call SetUnitPosition(u2u,GetLocationX(k2k),GetLocationY(k2k))
endif
call RemoveLocation(k2k)
set u2u=null
set k2k=null
endfunction

and to improve -nocd you can do this.(to make it like wtf in dota)
firs add unit TempUnit to globals var

search for function ResetCD

replace all function with it:

function ResetCD2 takes nothing returns nothing
call UnitResetCooldown(TempUnit)
call DestroyTimer(GetExpiredTimer())
endfunction
function ResetCD takes nothing returns nothing
set TempUnit = GetTriggerUnit()
call TimerStart(CreateTimer(),0.,false,function ResetCD2)
endfunction

it will wait for next frame to resset unit cooldown
i think it can help to improve JJCP XD

Author:  Risen [ May 7th, 2009, 12:07 am ]
Post subject:  Re: Improve JJCP

Code:
function Tele2 takes nothing returns nothing
local unit u2u=GetTriggerUnit()
local location k2k=GetOrderPointLoc()
if GetIssuedOrderId()==851990then
call SetUnitPosition(u2u,GetLocationX(k2k),GetLocationY(k2k))
endif
set u2u=null
set k2k=null
endfunction

Just search tele2 and do a RemoveLocation call.

It's up to you, I haven't even seen JJ in forever anyways.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/