Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
UDP3 Start battle
#1
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 Smile

Добавлено через 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\i3RenderContextDX.cpp(1652) : [int __thiscall i3RenderContext::ResetDevice(void)]] : i3RenderContext::ResetDevice() Enter

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

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

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

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

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

[17:32:43][N][E:\PB_Backup_All\2012_12_20\i3\src\i3Gfx\i3RenderContextDX.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
Ответ
#2
не все так просто )
Ответ
#3
Try to indicate _buf.writeByte(0) or _buf.writeByte(255) instead of _buf.writeByte(slot).
Ответ
#4
Codex1to Написал:не все так просто )
Actually yes, when I send the udp packet 66 the user should at least spawn..

PROGRAMMATOR Написал: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
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  UDP3 MomzGames - Auth Protected (v42) vinne 0 3,429 01-08-2020, 03:02 AM
Последний пост: vinne
  [Source] UDP3 MoMz Auth Protected vinne 0 3,022 01-08-2020, 03:01 AM
Последний пост: vinne
  UDP3 Helicopter animation nikolen 0 2,090 09-01-2019, 08:46 PM
Последний пост: nikolen
  [Help] Point blank UDP3 ON indows 0 1,901 07-04-2019, 03:41 AM
Последний пост: indows
  UDP3 Grenade problem zOne62 5 2,106 12-16-2018, 12:03 PM
Последний пост: zOne62
  UDP3 POSITION ERROR Comandante9901 13 5,330 10-10-2018, 09:20 AM
Последний пост: ChunkyHunt
  V42 Battle Bug ChunkyHunt 0 1,576 10-10-2018, 09:08 AM
Последний пост: ChunkyHunt
  help me UDP3 DeathDataForClient Event Id 2048 bmzproject 2 1,690 07-20-2018, 07:04 AM
Последний пост: battleBugado
  UDP3 answer ManuelDev 3 2,064 07-03-2018, 04:27 PM
Последний пост: bmzproject
  UDP3 Send-back packet ManuelDev 3 1,903 06-29-2018, 12:18 PM
Последний пост: ManuelDev

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)