![]() |
#16 |
Free Software Terrorist
Technical Director
|
![]() Well, this one is suitable for all situations, hence I like it so I submitted it.
__________________ |
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#17 | |
Panda > You
|
![]() Quote:
and the other one? |
|
![]() |
![]() |
![]() |
#18 |
User
Join Date: Nov 2007
Posts: 39
![]() |
![]() So GetCSData sucks?
__________________And what is the best for attaching structs to units/items? |
![]() |
![]() |
![]() |
#19 | |
Free Software Terrorist
Technical Director
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#20 |
Corkscrew Chainsaw!!!
|
![]() You could unconstantify 'MIN_HANDLE_INDEX' or whatever it is, then at map init loop through, create all your timers, set MIN_HANDLE_INDEX to the H2I of the first one and you wouldn't have to worry about size issues.
__________________I think Toadcop does this? |
![]() |
![]() |
![]() |
#21 |
Free Software Terrorist
Technical Director
|
![]() Someone can do that and keep the XXXTimerXXX naming, that's the plan, I think I mentioned so in the first post. But I won't add it to the official version for a simple reason, loading 1000 timers at init is usually worse for robustness and performance than this, it needs a user that knows what he is doing.
__________________ |
![]() |
![]() |
![]() |
#22 |
Procrastination Incarnate
Development Director
|
![]() Well, considering that I annoyed Vex into coding this I should write something about how awesome it is now that he did code it. Well, it is great and I intend to use it in all my future code that will need timers.
__________________ |
![]() |
![]() |
![]() |
#23 |
master of fugue
Join Date: Jun 2007
Posts: 2,453
![]() ![]() ![]() ![]() ![]() |
![]() I think we have more Timer "Unitls" on this forum than all other resources together....
__________________ |
![]() |
![]() |
![]() |
#24 | |
Free Software Terrorist
Technical Director
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#25 |
master of fugue
Join Date: Jun 2007
Posts: 2,453
![]() ![]() ![]() ![]() ![]() |
![]() OT:
__________________Vexorian uses his admin privielges to fuckup my spelilng so he can make joeks about it. |
![]() |
![]() |
![]() |
#26 |
Free Software Terrorist
Technical Director
|
![]() Yeah sure, that's the most logical explanation.
__________________ |
![]() |
![]() |
![]() |
#27 |
User
Join Date: Oct 2006
Posts: 1,490
![]() |
![]() Really minor suggestions :
__________________![]() function NewTimer takes nothing returns timer if (tN==0) then return CreateTimer() // yeah, we win a set :p else set tN=tN-1 endif call SetTimerData(tT[tN],0) return tT[tN] endfunction //========================================================================================== function ReleaseTimer takes timer t returns nothing if(t==null) then debug call BJDebugMsg("Warning: attempt to release a null timer") return endif if (tN==8191) then debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!") //stack is full, the map already has much more troubles than the chance of bug call DestroyTimer(t) else if(GetTimerData(t)==HELD) then debug call BJDebugMsg("Warning: ReleaseTimer: Double free!") return endif call PauseTimer(t) // if the timer is already released, then we don't need to pause it again. call SetTimerData(t,HELD) set tT[tN]=t set tN=tN+1 endif endfunction I love the simplicity of this library, i will use it for dummies units and group as well, gj. |
![]() |
![]() |
![]() |
#28 |
Free Software Terrorist
Technical Director
|
![]() Update.
__________________Hmnn, Troll-Brain, didn't see your post till now, will take a look to those changes later. |
![]() |
![]() |
![]() |
#29 | |
BuranX
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#30 |
Free Software Terrorist
Technical Director
|
![]() update, err, fixed a thread crash in redInit...
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|