71 |
|
|
72 |
|
uint16_t ONICALL connect_to_server(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
73 |
|
{ |
74 |
+ |
//TODO: Move this into the client initialization. Doing it like this is silly. |
75 |
|
if( NetPlatform_Initalize()) { |
76 |
|
static flatline_packet packet; |
77 |
|
sock = NetUDPSocket_Create(27777); |
128 |
|
|
129 |
|
uint16_t ONICALL kick(sl_callinfo* callinfo, uint32_t numargs, sl_arg args[], int* dontuse1, int* dontuse2, sl_arg* ret) |
130 |
|
{ |
131 |
< |
FLrPlayerDisconnect(args[0].value_int32 - 1); |
131 |
> |
FLrPlayerDisconnect(args[0].value_int32); |
132 |
|
FLsPublic_Event(EV_DISCONNECT, &args[0].value_int32); |
133 |
|
return 0; |
134 |
|
} |
226 |
|
SLrScript_Command_Register_ReturnType("addbot","adds a fake client", "", sl_void, addfake); |
227 |
|
SLrScript_Command_Register_Void("kick", "Kicks a client from the server", "clientnum:int", kick); |
228 |
|
SLrScript_Command_Register_Void("con", "Activates a console", "con:int", con); |
228 |
– |
//SLrScript_Command_Register_ReturnType("ai2_spawn","creates and starts an AI from a character object","ai_name:string [force_spawn:string{\"force\"} | ]", sl_void, spawnAI); |
229 |
|
SLrScript_Command_Register_Void("ping", "pong!", "", ping); |
230 |
|
} |