Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
No wait respawn in camera mode
#11
i not understand well this man
this is call
Код:
PlayersSlotsMask |= 1 << player.[color=Blue]SlotId[/color];
Ответ
#12
PlayersSlotsMask is properties of Room class, which contains ready to battle players mask (who press "Ready" button).
Ответ
#13
i very try understand and create method same this
but i not understand very well Sad
u can create simple method for me understand?
please
Ответ
#14
[SRC="csharp"]using PiercingBlow.Game.Network.Send;

namespace PiercingBlow.Game.Network.Receive
{
class PROTOCOL_BATTLE_READYBATTLE_REQ : Packet
{
public override void RunImpl()
{
var slot = Account.Slot;

if (slot.HasState(SlotState.NORMAL))
{
Room.ReadySlotsMask |= 1 << slot.Id;
slot.State = SlotState.READY;
}
else
{
Room.ReadySlotsMask ^= 1 << slot.Id;
slot.State = SlotState.NORMAL;
}

// ...
}
}
}

[/SRC]
Ответ
#15
hey man i try this but not understand well error camera wait round finish this locate?

Код:
using PiercingBlow.Game.Network.Send;

namespace PiercingBlow.Game.Network.Receive
{
    class PROTOCOL_BATTLE_READYBATTLE_REQ : Packet
    {
        public override void RunImpl()
        {
            var slot = Account.Slot;

            if (slot.HasState(SlotState.NORMAL))
            {
                Room.ReadySlotsMask |= 1 << slot.Id;
                slot.State = SlotState.READY;
            }
            else
            {
                Room.ReadySlotsMask ^= 1 << slot.Id;
                slot.State = SlotState.NORMAL;
            }

            // ...
        }
    }
}


Code: C#


This is my code Java
[src=java]public class CM_BATTLE_READY extends ClientPacket {

public CM_BATTLE_READY(int opcode) {
super(opcode);
}

@Override
public void readImpl() {
}

@Override
public void runImpl() {
final Room room = getConnection().getRoom();
if(room.getLeader().equals(getConnection().getPlayer())) {
if(room.isFigth() == 0) {
room.setFigth(1);
room.setTimeLost(room.getKillTime() * 60);
room.blueTeamCount = 0;
room.redTeamCount = 0;
room.doRound = 0;
}
ThreadPoolManager.getInstance().executeTask(new Runnable() {
@Override
public void run() {
for(Player member : getConnection().getRoom().getPlayers().values()) {
RoomSlot slot = room.getRoomSlotByPlayer(member);

if(slot.getState() == SlotState.SLOT_STATE_READY && !room.getLeader().equals(member)) {

slot.setState(SlotState.SLOT_STATE_LOAD);
member.getConnection().sendPacket(new SM_BATTLE_READY(room, getConnection().getPlayer()));
} else if(room.getLeader().equals(member)) {
slot.setState(SlotState.SLOT_STATE_LOAD);
member.getConnection().sendPacket(new SM_BATTLE_READY(room, member));
}
}
}
});
} else {
RoomSlot slotLeader = room.getRoomSlotByPlayer(room.getLeader());
RoomSlot slot = room.getRoomSlotByPlayer(getConnection().getPlayer());

if(slotLeader.getState() == SlotState.SLOT_STATE_LOAD || slotLeader.getState() == SlotState.SLOT_STATE_RENDEZVOUS || slotLeader.getState() == SlotState.SLOT_STATE_PRESTART || slotLeader.getState() == SlotState.SLOT_STATE_BATTLE_READY || slotLeader.getState() == SlotState.SLOT_STATE_BATTLE) {
slot.setState(SlotState.SLOT_STATE_LOAD);
sendPacket(new SM_BATTLE_READY(room, getConnection().getPlayer()));
}
if(slot.getState() == SlotState.SLOT_STATE_READY) {
slot.setState(SlotState.SLOT_STATE_NORMAL);
} else if(slot.getState() == SlotState.SLOT_STATE_NORMAL) {
slot.setState(SlotState.SLOT_STATE_READY);
}
}
ThreadPoolManager.getInstance().executeTask(new Runnable() {
@Override
public void run() {
for(Player member : getConnection().getRoom().getPlayers().values()) {
member.getConnection().sendPacket(new SM_ROOM_INFO(room));
}
}
});
}

[/src]
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  i want to number id mode map giran bmzproject 2 1,602 02-18-2019, 12:20 PM
Последний пост: bmzproject
  Dino and Barrel mode BOMB Exile03 3 2,154 04-13-2018, 09:58 AM
Последний пост: shino2548
  CM_READY help camera mod LeghtZone 0 1,219 03-22-2018, 08:21 PM
Последний пост: LeghtZone
  how to fix ? Client IP LAN Join Room Client Start Battle Can not Respawn bmzproject 1 1,697 01-17-2018, 12:47 AM
Последний пост: PROGRAMMATOR
  Help Me (Remove Tutorial Mode) yGGhz 0 1,013 10-30-2016, 05:14 AM
Последний пост: yGGhz
  Help Where Chelenge Mode ? UNKOWN 2 1,393 03-29-2016, 08:31 AM
Последний пост: UNKOWN
  BATTLE Camera Game mode Exile03 9 2,311 02-08-2016, 06:43 PM
Последний пост: Exile03
  Respawn Effect Exile03 5 2,354 01-30-2016, 05:44 PM
Последний пост: Exile03
  Java Someone know how i can fix Player Respawn BUG Exile03 1 2,086 12-06-2015, 04:54 PM
Последний пост: PROGRAMMATOR

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


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