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
|
|