forked from teamnwah/openmw-tes3coop
[General] Rename ID_GAME_DIE and ID_GAME_RESURRECT
This commit is contained in:
parent
4aaa9ed694
commit
5c269a5f8d
9 changed files with 29 additions and 27 deletions
|
@ -356,9 +356,9 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
break;
|
||||
}
|
||||
|
||||
case ID_GAME_DIE:
|
||||
case ID_PLAYER_DEATH:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_DIE from %s", player->npc.mName.c_str());
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_DEATH from %s", player->npc.mName.c_str());
|
||||
|
||||
Player *killer = Players::getPlayer(player->getLastAttackerId());
|
||||
|
||||
|
@ -384,9 +384,9 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
break;
|
||||
}
|
||||
|
||||
case ID_GAME_RESURRECT:
|
||||
case ID_PLAYER_RESURRECT:
|
||||
{
|
||||
DEBUG_PRINTF("ID_GAME_RESURRECT\n");
|
||||
DEBUG_PRINTF("ID_PLAYER_RESURRECT\n");
|
||||
//packetResurrect.Read(player);
|
||||
player->creatureStats.mDead = false;
|
||||
myPacket->Send(player, true);
|
||||
|
|
|
@ -458,7 +458,7 @@ void StatsFunctions::Resurrect(unsigned short pid)
|
|||
{
|
||||
Player *player;
|
||||
GET_PLAYER(pid, player,);
|
||||
mwmp::Networking::get().getPlayerController()->GetPacket(ID_GAME_RESURRECT)->RequestData(player->guid);
|
||||
mwmp::Networking::get().getPlayerController()->GetPacket(ID_PLAYER_RESURRECT)->RequestData(player->guid);
|
||||
}
|
||||
|
||||
void StatsFunctions::SendBaseInfo(unsigned short pid) noexcept
|
||||
|
|
|
@ -556,7 +556,7 @@ void LocalPlayer::updateDeadState(bool forceUpdate)
|
|||
{
|
||||
creatureStats.mDead = true;
|
||||
RakNet::BitStream bs;
|
||||
getNetworking()->getPlayerPacket((RakNet::MessageID)ID_GAME_DIE)->Packet(&bs, this, true);
|
||||
getNetworking()->getPlayerPacket((RakNet::MessageID)ID_PLAYER_DEATH)->Packet(&bs, this, true);
|
||||
getNetworking()->sendData(&bs);
|
||||
isDead = true;
|
||||
}
|
||||
|
|
|
@ -454,9 +454,9 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case ID_GAME_DIE:
|
||||
case ID_PLAYER_DEATH:
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_GAME_DIE from server");
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received ID_PLAYER_DEATH from server");
|
||||
if (guid == myGuid)
|
||||
{
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
|
@ -477,7 +477,7 @@ void Networking::processPlayerPacket(RakNet::Packet *packet)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case ID_GAME_RESURRECT:
|
||||
case ID_PLAYER_RESURRECT:
|
||||
{
|
||||
if (guid == myGuid)
|
||||
{
|
||||
|
|
|
@ -161,6 +161,8 @@ add_component_dir (openmw-mp
|
|||
Packets/Player/PacketPlayerSpellbook Packets/Player/PacketPlayerJournal Packets/Player/PacketPlayerActiveSkills
|
||||
Packets/Player/PacketPlayerCellChange Packets/Player/PacketPlayerCellState
|
||||
|
||||
Packets/Player/PacketPlayerResurrect
|
||||
|
||||
Packets/Player/PacketGUIBoxes Packets/Player/PacketTime
|
||||
|
||||
Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectScale
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#include "../Packets/Player/PacketPlayerEquipment.hpp"
|
||||
#include "../Packets/Player/PacketPlayerAttack.hpp"
|
||||
#include "../Packets/Player/PacketPlayerDynamicStats.hpp"
|
||||
#include "../Packets/Player/PacketResurrect.hpp"
|
||||
#include "../Packets/Player/PacketDie.hpp"
|
||||
#include "../Packets/Player/PacketPlayerResurrect.hpp"
|
||||
#include "../Packets/Player/PacketPlayerDeath.hpp"
|
||||
#include "../Packets/Player/PacketSendMyID.hpp"
|
||||
#include "../Packets/Player/PacketDisconnect.hpp"
|
||||
#include "../Packets/Player/PacketPlayerDrawState.hpp"
|
||||
|
@ -51,9 +51,9 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
|
|||
|
||||
AddPacket<PacketPlayerAttack>(&packets, peer);
|
||||
AddPacket<PacketPlayerDynamicStats>(&packets, peer);
|
||||
AddPacket<PacketResurrect>(&packets, peer);
|
||||
AddPacket<PacketPlayerResurrect>(&packets, peer);
|
||||
|
||||
AddPacket<PacketDie>(&packets, peer);
|
||||
AddPacket<PacketPlayerDeath>(&packets, peer);
|
||||
AddPacket<PacketPlayerDrawState>(&packets, peer);
|
||||
AddPacket<PacketSendMyID>(&packets, peer);
|
||||
AddPacket<PacketDisconnect>(&packets, peer);
|
||||
|
|
|
@ -18,8 +18,8 @@ enum GameMessages
|
|||
ID_USER_MYID,
|
||||
ID_PLAYER_EQUIPMENT,
|
||||
ID_USER_DISCONNECTED,
|
||||
ID_GAME_DIE,
|
||||
ID_GAME_RESURRECT,
|
||||
ID_PLAYER_DEATH,
|
||||
ID_PLAYER_RESURRECT,
|
||||
ID_CHAT_MESSAGE,
|
||||
ID_PLAYER_DRAWSTATE,
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// Created by koncord on 13.01.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKETDIE_HPP
|
||||
#define OPENMW_PACKETDIE_HPP
|
||||
#ifndef OPENMW_PACKETPLAYERDEATH_HPP
|
||||
#define OPENMW_PACKETPLAYERDEATH_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
|
@ -11,12 +11,12 @@
|
|||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketDie: public PlayerPacket
|
||||
class PacketPlayerDeath: public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketDie(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
PacketPlayerDeath(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_DIE;
|
||||
packetID = ID_PLAYER_DEATH;
|
||||
}
|
||||
void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
{
|
||||
|
@ -26,4 +26,4 @@ namespace mwmp
|
|||
};
|
||||
}
|
||||
|
||||
#endif //OPENMW_PACKETDIE_HPP
|
||||
#endif //OPENMW_PACKETPLAYERDEATH_HPP
|
|
@ -2,8 +2,8 @@
|
|||
// Created by koncord on 13.01.16.
|
||||
//
|
||||
|
||||
#ifndef OPENMW_PACKETRESURRECT_HPP
|
||||
#define OPENMW_PACKETRESURRECT_HPP
|
||||
#ifndef OPENMW_PACKETPLAYERRESURRECT_HPP
|
||||
#define OPENMW_PACKETPLAYERRESURRECT_HPP
|
||||
|
||||
|
||||
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
|
||||
|
@ -11,12 +11,12 @@
|
|||
|
||||
namespace mwmp
|
||||
{
|
||||
class PacketResurrect: public PlayerPacket
|
||||
class PacketPlayerResurrect: public PlayerPacket
|
||||
{
|
||||
public:
|
||||
PacketResurrect(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
PacketPlayerResurrect(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
|
||||
{
|
||||
packetID = ID_GAME_RESURRECT;
|
||||
packetID = ID_PLAYER_RESURRECT;
|
||||
}
|
||||
void Packet(RakNet::BitStream *bs, BasePlayer *player, bool send)
|
||||
{
|
||||
|
@ -27,4 +27,4 @@ namespace mwmp
|
|||
}
|
||||
|
||||
|
||||
#endif //OPENMW_PACKETRESURRECT_HPP
|
||||
#endif //OPENMW_PACKETPLAYERRESURRECT_HPP
|
Loading…
Reference in a new issue