The online racing simulator
Searching in All forums
(233 results)
denis-takumi
S3 licensed
Scawen, it's possible to use Shader Model 3.0?
Last edited by denis-takumi, .
denis-takumi
S3 licensed
When i try use
insim.Send( UCID, "Message" )
i catch Exception
WideCharToMultiByte

using Linux + Mono
denis-takumi
S3 licensed
in future i want create mega editor =)
denis-takumi
S3 licensed
i'm add some JSON support.
denis-takumi
S3 licensed
Maybe publish a library on github, so other users can extend the functionality of the library.

I had already added to the library methods of sending certain types of packets, using safe methods like

<?php 
sendButton
sendMtc
sendMst
?>


i'm add lib to github

https://github.com/turbosnail/cinsim
Last edited by denis-takumi, .
denis-takumi
S3 licensed
i have server + insim mod
when i send

<?php 
/reinit
?>


from game to server - server is crashing in SIGSEGV

<?php 
сигнатура проблемы
:
APPCRASH
DCon
.exe
0.0.0.0 
app timestamp
:    50c22758
module name
:    DCon.exe
module ver
:    0.0.0.0
module crash timestamp
:    50c22758
Exeption code
:    c0000005
Address
:    000345cf
?>


denis-takumi
S3 licensed
some lols
cinsim.h have line


<?php 
typedef unsigned char byte
;
?>

but in cinsim.cpp using only

<?php 
unsigned char
?>


denis-takumi
S3 licensed
need. bcz next_packet and udp_next_packet use different sockets

<?php 
SOCKET sock
;                            // TCP Socket (most packets)
SOCKET sockudp;                         // UDP Socket (if requested, for NLP and MCI)
?>

denis-takumi
S3 licensed

<?php 
void send_mtc 
(byte UCID,const charMsg)
{
    
struct IS_MTC pack_mtc;
    
memset(&pack_mtc0sizeof(struct IS_MTC));
    
pack_mtc.Size sizeof(struct IS_MTC);
    
pack_mtc.Type ISP_MTC;
    
pack_mtc.UCID UCID;
    
sprintfpack_mtc.Text"%.127s\0"Msg );
    
insim->send_packet(&pack_mtc);
};

void send_mst (const charText)
{
    
struct IS_MST pack_mst;
    
memset(&pack_mst0sizeof(struct IS_MST));
    
pack_mst.Size sizeof(struct IS_MST);
    
pack_mst.Type ISP_MST;
    
sprintfpack_mst.Msg"%.63s\0"Text );
    
insim->send_packet(&pack_mst);
};
?>

denis-takumi
S3 licensed
i use it > 2 years
send_button and send_mtc is privat

<?php 
/**
* Send a packet
*/
bool CInsim::send_packet(voids_packet)
{

    
byte Type = *((unsigned char*)s_packet+1);
    switch(
Type)
    {
    case 
ISP_BTN:
        return 
send_button(s_packet);
        break;

    case 
ISP_MTC:
        return 
send_mtc(s_packet);
        break;
    }

    
pthread_mutex_lock (&ismutex);
    if (
send(sock, (const char *)s_packet, *((unsigned char*)s_packet), 0) < 0)
    {
        
pthread_mutex_unlock (&ismutex);
        return 
false;
    }
    
pthread_mutex_unlock (&ismutex);
    return 
true;
}


/**
* Send a variable sized button
*/
bool CInsim::send_button(voids_button)
{
    
struct IS_BTN *pack_btn = (struct IS_BTN*)s_button;

    
int text_len strlen(pack_btn->Text);
    
int text2send;

    if (
text_len == 0)
        
text2send 0;
    else
        
text2send = (1+((text_len-1)/4))*4;

    
pack_btn->Size 12 text2send;

    
pthread_mutex_lock (&ismutex);
    if (
send(sock, (const char *)pack_btnpack_btn->Size0) < 0)
    {
        
pthread_mutex_unlock (&ismutex);
        return 
false;
    }
    
pthread_mutex_unlock (&ismutex);
    return 
true;
}

/**
* Send a variable sized message to connect
*/
bool CInsim::send_mtc(voids_mtc)
{

    
struct IS_MTC *pack_mtc = (struct IS_MTC*)s_mtc;
    
int text_len strlen(pack_mtc->Text);
    
int text2send;

    if (
text_len == 0)
        return 
false;
    else if (
text_len 127)
        return 
false;

    
text2send text_len text_len%4;
    
pack_mtc->Size text2send;

    
pthread_mutex_lock (&ismutex);
    if (
send(sock, (const char *)s_mtc,*((unsigned char*)s_mtc), 0) < 0)
    {
        
pthread_mutex_unlock (&ismutex);
        return 
false;
    }
    
pthread_mutex_unlock (&ismutex);
    return 
true;
}
?>

Last edited by denis-takumi, .
denis-takumi
S3 licensed
Scawen, plz attach a manual patch to 1st post. it can't be downloaded because lfs.net is down.
denis-takumi
S3 licensed
Scawen, if you made the non queue connection, may then do an asynchronous skin downloading

800 kb skin == over 1k packets

before user connect to server game download skins


AND

when i set "download skins" to "none" game said "Can't download skin: CAR_blablabla"
i think that this message not need.
just do some notice "Skin downloading is disabled" as "Donloading: CAR_blablabla"
Last edited by denis-takumi, .
denis-takumi
S3 licensed
OFFTOP =)
Scawen, what about /banfile=blablabla.txt
http://lfsforum.net/showthread.php?t=80618
denis-takumi
S3 licensed
NO INSIM!!! *facepalm*

scawen can write this in lfs.exe


<?php 
char banfile
[MAX_PATH];
if ( ( 
strstr(line,"/banlist=") != false ) and ( *(strstr(line,"/banlist=")) == ) )
strcpybanfileline+);
else
strcpybanfile"data\\misc\\bans.ban" );
?>

and just use

<?php 
fopen
(banfile,"r");
?>

if use unsim it will be about 100 lines
and run 10 copyes? nonsense
i dont have access to use insim
Last edited by denis-takumi, .
denis-takumi
S3 licensed
Sorry for offtop.

Scawen, why blackwood not compressed and have .wld extension
may be u compress this track like other (AS WE FE).
denis-takumi
S3 licensed
oh .... *facepalm*
can insim shutdown server or powerup?
DONT OFFTOP

why lfs.exe can use any cfg files but using 1 banlist file?
denis-takumi
S3 licensed
i'm using php for manage servers, and make new forder for new server - BAD.

lfs.exe can understand "lfs.exe /cfg=somefile.cfg"
Add /banlist = bans.ban
denis-takumi
S3 licensed
Scawen, can you add
/banlist = bans.ban

in setup.cfg?
reason: 10 servers use 1 LFS.exe => 1 server ban user on himself and others 9 servers
denis-takumi
S3 licensed
Quote from [Audi TT] :HI Victor! Please, add a filter the version DEDI hosts in "Racers & Hosts online".
See attachment

why do it?
denis-takumi
S3 licensed
Quote from [Audi TT] :In game CSS, don't used complementary programms for of these.

how insim programs would be authenticated?
denis-takumi
S3 licensed
Quote from [Audi TT] :
Admin password don't needs.

what about insim programms?
denis-takumi
S3 licensed
OFFTOP:

Scawen, plz add "kick/ban" and "track select" vote protection

user can modify game memory but server don't protect this

and what about colision hack?
denis-takumi
S3 licensed
MPR attached
LFS vote and select BUG [fixed in 0.6B5]
denis-takumi
S3 licensed
Several days ago I saw a player votes for the kick
on the server where the vote is prohibited
hacker change byte in memory and can vote (select track)

server must protect this
FGED GREDG RDFGDR GSFDG