Форум администраторов игровых серверов

Форум администраторов игровых серверов (https://forum.zone-game.info/TT.php)
-   Point Blank (Piercing Blow) (https://forum.zone-game.info/forumdisplay.php?f=204)
-   -   [Point Blank] UDP3 Start battle (https://forum.zone-game.info/showthread.php?t=43150)

ManuelDev 20.05.2018 18:07

UDP3 Start battle
 
Hi,
I've finally begin to develop the UDP3 on v37 client.

I send successfully the packet 66 to all the players but the battle still don't start, the battle start just on bot.
When I'm on pvp, the battle remain on "Ready for game"

Where I'm wrong?
You can check the code here (all the player.net are successfully setup)
Код:

case 65:
{               
    Room room = rm.getRoom(msg.sender().getAddress());
    if(room != null){
        Player player = room.getPlayerBySock(msg.sender().getAddress());
        if(player != null){
            player.net = new InetSocketAddress(sender.getHostName(), sender.getPort());
            player.room = room;
            player.ctx = ctx;
            ByteBuf _buf = Unpooled.buffer(0, 14).order(ByteOrder.LITTLE_ENDIAN);
            _buf.writeByte(66);
            _buf.writeByte(slot);
            _buf.writeFloat(time);
            _buf.writeByte(1);
            _buf.writeShort(14);
            _buf.writeShort(0);
            _buf.writeShort(0);
            _buf.writeByte(8);                       
            for(Player _player : room.jogadores.values())
                _player.ctx.writeAndFlush(new DatagramPacket(_buf.copy(), _player.net));
        }else BattleEnvironment.getLogger().Info("Ask ended for invalid player.");
    }else BattleEnvironment.getLogger().Info("Ask ended for invalid room.");
    break;
}

@PROGRAMMATOR, @Awiion

Thanks in advance if someone is going to reply :)

Добавлено через 27 минут
EDIT:
This is what i've found on bc.log, maybe something wrong with the slots?
Цитата:

[2018/5/20-17h:32m:42s] ====PRESTARTBATTLE SERVER TYPE : SERVER_TYPE_DEDICATION ====
[17:32:42][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1652) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() Enter

[17:32:42][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1664) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 1

[17:32:42][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1715) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 2

[17:32:42][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1719) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 3

[17:32:42][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1723) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 4

[17:32:43][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1727) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 5

[17:32:43][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderC ontextDX.cpp(1733) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() Leave

[2018/5/20-17h:32m:45s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:46s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:47s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:48s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:49s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:50s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:51s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:52s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:53s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:54s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:55s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:56s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:57s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:58s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:32m:59s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:0s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:1s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:2s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:3s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:4s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:5s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0
[2018/5/20-17h:33m:6s] UDP Out nUserIdx != SLOT_DEDICATION_IDX:nUserIdx= 0

Codex1to 20.05.2018 23:59

Re: UDP3 Start battle
 
не все так просто )

PROGRAMMATOR 21.05.2018 18:49

Re: UDP3 Start battle
 
Try to indicate _buf.writeByte(0) or _buf.writeByte(255) instead of _buf.writeByte(slot).

ManuelDev 21.05.2018 20:49

Re: UDP3 Start battle
 
Цитата:

Сообщение от Codex1to (Сообщение 431491)
не все так просто )

Actually yes, when I send the udp packet 66 the user should at least spawn..

Цитата:

Сообщение от PROGRAMMATOR (Сообщение 431500)
Try to indicate _buf.writeByte(0) or _buf.writeByte(255) instead of _buf.writeByte(slot).

I've tried, but still no work.
Another thing that i've noticed is that BC.log is changed.

This is what show now:
Код:

[2018/5/21-19h:48m:27s] ====PRESTARTBATTLE SERVER TYPE : SERVER_TYPE_DEDICATION ====
[19:48:27][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1652) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() Enter

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1664) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 1

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1715) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 2

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1719) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 3

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1723) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 4

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1727) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() 5

[19:48:28][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.cpp(1733) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() Leave



Текущее время: 06:29. Часовой пояс GMT +3.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot