![]() |
#16 | |
Evil Emoticon
Respected User
Project Leader: PoC |
![]() Quote:
|
|
![]() |
![]() |
Sponsored Links - Login to hide this ad! |
|
![]() |
#17 |
AKA Khyrberos
|
![]() ^Yeah, I'm saying it's not ever (rarely) used, so it's OK to utilize it for custom races.
__________________--EDIT-- Although a high-level player might use it for kicks to increase the challenge... Last edited by Kyrbi0 : 05-01-2009 at 03:32 AM. |
![]() |
![]() |
![]() |
#18 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() Damn I was just thinking that the callback interface is missing a player argument. Right now you have to do an extra check for knowing the players, and since the callback normally implies the creation of extra units, i'd say it is not redundant. :)
__________________ |
![]() |
![]() |
![]() |
#20 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() Hey, if you add it, I'll approve it immediately.
__________________ |
![]() |
![]() |
![]() |
#21 | |
Lepus?
Join Date: Jan 2009
Posts: 1,308
![]() ![]() ![]() |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#22 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() I only apporve materials of the highest caliber
__________________ |
![]() |
![]() |
![]() |
#24 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() you didnt update the example
__________________unnaproved :P |
![]() |
![]() |
![]() |
#26 |
Probably AFK
Join Date: Feb 2009
Posts: 635
![]() ![]() ![]() |
![]() How about a "preferred configuration" approach to the registry? Instead of just letting it fail when two races collide, set the "extra" races to the first unfilled position.
__________________![]() method register takes race r, real h returns boolean local CustomRace c = CustomRace.get(r,h) local integer try = 0 if c != 0 then debug call BJDebugMsg("|cffff0000"+.name+" collided with "+CustomRace.get(r,h).name+" registered for "+r2S(r)+" race with Handicap "+R2S(h)) loop exitwhen try > 24 if .REGISTRY[try] == 0 then debug call BJDebugMsg("|cffff0000Registering "+.name+" to the first unregistered entry instead.") set .REGISTRY[try] = integer(this) return true endif endloop debug call BJDebugMsg("|cffff0000All custom race slots are filled. Registration of "+.name+" failed.") return false endif set .REGISTRY[((r2I(r)-1)*6)+(10-R2I(h*10.))] = integer(this) return true endmethod Last edited by cosmicat : 05-13-2009 at 01:04 AM. |
![]() |
![]() |
![]() |
#27 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() problem is, how would the user know which handicap they have to pick? i guess the registering order would suffice...
__________________ |
![]() |
![]() |
![]() |
#29 |
User
Join Date: Jun 2006
Posts: 23
![]() |
![]() I use this code on my map and test it online.
It keeps revealing me and then immediately stop it, flooding a load of text in my screen which is very annoying (but the game is playable). Did I do something wrong? or it's because your bug. |
![]() |
![]() |
![]() |
#30 |
It feels good
Join Date: Mar 2006
Posts: 1,305
![]() ![]() ![]() |
![]() Can you post the race you registered?
__________________ |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
|