Something wrong happened when I read bullet sync data with RakNet
#1

I'm learning about RakNet and I was trying to read bullet sync data but the data was not exactly what I want. It gives me strange value and in the code and the video below, you can see that I don't change my weapon but the bulletSyncData[PR_weaponId] value changes. I need a help to solve this.
My English is not good so I cannot have more words.
PHP код:
const ID_BULLET_SYNC 206;
public 
OnIncomingPacket(playeridpacketidBitStream:bs)
{
    if(
packetid == ID_BULLET_SYNC)
    {
        new 
bulletSyncData[PR_BulletSync],
               
Packed:string[128];
        
BS_ReadBulletSync(bsbulletSyncData);
        
format(stringsizeof(string), !"hittype: %d, hitid: %d, weaponid: %d"bulletSyncData[PR_hitType],
        
bulletSyncData[PR_hitId], bulletSyncData[PR_weaponId]);
        
msg(playerid, -1string);
    }
    return 
1;

More at this video.
Reply


Messages In This Thread
Something wrong happened when I read bullet sync data with RakNet - by DuyDang2412 - 23.07.2018, 14:55
Re: Something wrong happened when I read bullet sync data with RakNet - by Calisthenics - 23.07.2018, 15:04
Re: Something wrong happened when I read bullet sync data with RakNet - by DuyDang2412 - 24.07.2018, 00:39
Re: Something wrong happened when I read bullet sync data with RakNet - by Calisthenics - 24.07.2018, 09:03

Forum Jump:


Users browsing this thread: 1 Guest(s)