|
Re: A6Network - Frozen Throne
[Re: William]
#113546
04/26/07 04:38
04/26/07 04:38
|
Joined: Jan 2006
Posts: 1,829 Neustadt, Germany
TWO
OP
Serious User
|
OP
Serious User
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
|
*Dusty3D RakNet has been made by one man, Rakkar. As the engine is very popular, he don't cares for you 60 users The thing is, if I ship a piece of raknet with my product, I need to pay the license fees. After that I can do with my own code what I want, sure. *William Sure *BoH_Havoc No I compile RakNet myself in the plugin project. I need to do this because I made several changes to RakNet. Ok, I will further develop this plugin Your idea with the only-glue code is nice. I also will give you more updates here what is currently developed. But I still try to cooperate with Rakkar, because most users won't get the thing compiled, even with a step-by-step manual. Bloodline
|
|
|
Re: A6Network - Hot Throne
[Re: Puppeteer]
#113549
04/27/07 11:35
04/27/07 11:35
|
Joined: Jan 2004
Posts: 2,013 The Netherlands
Excessus
Expert
|
Expert
Joined: Jan 2004
Posts: 2,013
The Netherlands
|
Quote:
void Event_NewPlayer() { sys_exit(""); }
Net_SvEventSetFunction(Net_EventNewIncommingConntection, str_create("Event_NewPlayer"));
You have a memory leak
Just curious, though: what code do you use internally for calling that c-script/lite-c function from C++?
|
|
|
Re: A6Network - Hot Throne
[Re: Excessus]
#113550
04/27/07 14:02
04/27/07 14:02
|
Joined: Jan 2006
Posts: 1,829 Neustadt, Germany
TWO
OP
Serious User
|
OP
Serious User
Joined: Jan 2006
Posts: 1,829
Neustadt, Germany
|
Lol, tell me why I'm not a C++ god and my code is very far from beeing perfect. Code:
// *************************************************************** // Copyright (C) 2006/2007 Bloodline except otherwise marked. // All Rights reserved. // ------------------------------------------------------------- // file: Net.Server.Events | date: 10/4/2007 // ------------------------------------------------------------- // purpose: // *************************************************************** // [10/4/2007 Bloodline] - Created
long Net_SvEventFunctions[255];
DLLFUNC void Net_SvEventFunctionsReset() { for(int i=0;i<254;i++) Net_SvEventFunctions[i]=NULL; }
DLLFUNC void Net_SvEventSetFunction(int ID, STRING* Name) { long Func = engine_getscript( Name->chars );
if(Func!=NULL) { if(ID<0 || ID>=255) Net_Error_Raise("Net: Net_SvEventSetFunction - ID is not valid!");
Net_SvEventFunctions[ID] = Func; } else Net_Error_Raise("Net: Net_SvEventSetFunction - Function not found!"); }
void Net_SvEventExecuteFunction(int ID, long Arg1, long Arg2, long Arg3, long Arg4) { if(ID<0 || ID>=255) Net_Error_Raise("Net: Net_SvEventExecuteFunction - ID is not valid!");
if(Net_SvEventFunctions[ID]!=NULL) { engine_callscript( Net_SvEventFunctions[ID], Arg1, Arg2, Arg3, Arg4 ); } }
|
|
|
|