If you break then you end that case, and the thread will continue to do whatever is after the switch, if anything, which is pointless really, if you use return then the thread returns from the method completely, instead of spending cpu time checking to see if it needs to do more work.
@DontLookDown:
I was fixing .Arco's completely broken npc which he posted.
Nice,
but not much of a helpfull release since u need more than an npc with the item that is not implemented yet for people that do not have it u need more than that u need dds files like ItemMinIcon,MapItemIcon,texture & console scripts for items in ini and the txt files.
ex:
Well them files have already been released so I don't need to put them on my thread.
If people got them files, then they can use my NPC.
If they don't, well, that's there fault.
If you break then you end that case, and the thread will continue to do whatever is after the switch, if anything, which is pointless really, if you use return then the thread returns from the method completely, instead of spending cpu time checking to see if it needs to do more work.
@DontLookDown:
I was fixing .Arco's completely broken npc which he posted.
Ah so in all retrospect, I should go through all the cases in the source and end them with return rather than break?
Ah so in all retrospect, I should go through all the cases in the source and end them with return rather than break?
If your worried about performance at all though you should also apply this to your chat commands, because atleast the npc dialogs are a switch, where as commands are not, however you can change commands over to be a switch aswell, its very simple to do.
If your worried about performance at all though you should also apply this to your chat commands, because atleast the npc dialogs are a switch, where as commands are not, however you can change commands over to be a switch aswell, its very simple to do.
Well item uses are a switch so should I not use the return?
How to add SandRaider Client 5165 (: 09/04/2010 - CO2 PServer Guides & Releases - 30 Replies Well simply download this patch and put it in
your client folder and in OldCODB..
And just add a npc that gives u that item cuz i coudnt get it by command for some reason.
Well enjoy (:
MEGAUPLOAD - The leading online storage and file delivery service
SandRaider Item ID? 02/09/2010 - CO2 Private Server - 1 Replies What is the SandRaider Item ID?