Merge pull request #434 from TES3MP/0.6.3 while resolving conflicts

Conflicts:
	apps/openmw-mp/Networking.cpp
	apps/openmw/mwmp/processors/worldstate/ProcessorGameTime.hpp
	components/CMakeLists.txt
	components/openmw-mp/Base/BasePlayer.hpp
	components/openmw-mp/Packets/Worldstate/PacketGameTime.hpp
sol2-server-rewrite
David Cernat 6 years ago
commit ad4214d3e2

@ -216,6 +216,8 @@ case $VS_VERSION in
15|15.0|2017 )
GENERATOR="Visual Studio 15 2017"
TOOLSET="vc140"
TOOLSET_REAL="vc141"
MSVC_REAL_VER="15"
MSVC_VER="14"
MSVC_YEAR="2015"
MSVC_DISPLAY_YEAR="2017"
@ -224,6 +226,8 @@ case $VS_VERSION in
14|14.0|2015 )
GENERATOR="Visual Studio 14 2015"
TOOLSET="vc140"
TOOLSET_REAL="vc140"
MSVC_REAL_VER="14"
MSVC_VER="14"
MSVC_YEAR="2015"
MSVC_DISPLAY_YEAR="2015"
@ -232,6 +236,8 @@ case $VS_VERSION in
12|12.0|2013 )
GENERATOR="Visual Studio 12 2013"
TOOLSET="vc120"
TOOLSET_REAL="vc120"
MSVC_REAL_VER="12"
MSVC_VER="12"
MSVC_YEAR="2013"
MSVC_DISPLAY_YEAR="2013"
@ -385,7 +391,7 @@ else
if [ $MSVC_VER -eq 12 ]; then
printf "Boost 1.58.0 AppVeyor... "
else
printf "Boost 1.60.0 AppVeyor... "
printf "Boost 1.67.0 AppVeyor... "
fi
fi
{
@ -408,14 +414,20 @@ fi
echo Done.
else
# Appveyor unstable has all the boost we need already
if [ $MSVC_VER -eq 12 ]; then
if [ $MSVC_REAL_VER -eq 12 ]; then
BOOST_SDK="c:/Libraries/boost_1_58_0"
else
BOOST_SDK="c:/Libraries/boost_1_60_0"
BOOST_SDK="c:/Libraries/boost_1_67_0"
fi
if [ $MSVC_REAL_VER -eq 15 ]; then
LIB_SUFFIX="1"
else
LIB_SUFFIX="0"
fi
add_cmake_opts -DBOOST_ROOT="$BOOST_SDK" \
-DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.0"
add_cmake_opts -DBoost_COMPILER="-${TOOLSET}"
-DBOOST_LIBRARYDIR="${BOOST_SDK}/lib${BITS}-msvc-${MSVC_VER}.${LIB_SUFFIX}"
add_cmake_opts -DBoost_COMPILER="-${TOOLSET_REAL}"
echo Done.
fi
@ -568,7 +580,7 @@ echo
if [ -z $APPVEYOR ]; then
printf "Qt 5.7.0... "
else
printf "Qt 5.7 AppVeyor... "
printf "Qt 5.10 AppVeyor... "
fi
{
if [ $BITS -eq 64 ]; then
@ -618,7 +630,7 @@ fi
echo Done.
else
QT_SDK="C:/Qt/5.7/msvc${MSVC_YEAR}${SUFFIX}"
QT_SDK="C:/Qt/5.10/msvc${MSVC_DISPLAY_YEAR}${SUFFIX}"
add_cmake_opts -DDESIRED_QT_VERSION=5 \
-DQT_QMAKE_EXECUTABLE="${QT_SDK}/bin/qmake.exe" \

@ -105,7 +105,7 @@ namespace CSMWorld
{ ColumnId_Respawn, "Respawn" },
{ ColumnId_CreatureType, "Creature Type" },
{ ColumnId_SoulPoints, "Soul Points" },
{ ColumnId_OriginalCreature, "Original Creature" },
{ ColumnId_ParentCreature, "Parent Creature" },
{ ColumnId_Biped, "Biped" },
{ ColumnId_HasWeapon, "Has Weapon" },
{ ColumnId_Swims, "Swims" },

@ -99,7 +99,7 @@ namespace CSMWorld
ColumnId_Respawn = 84,
ColumnId_CreatureType = 85,
ColumnId_SoulPoints = 86,
ColumnId_OriginalCreature = 87,
ColumnId_ParentCreature = 87,
ColumnId_Biped = 88,
ColumnId_HasWeapon = 89,
// unused

@ -331,7 +331,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
creatureColumns.mType = &mColumns.back();
mColumns.push_back (RefIdColumn (Columns::ColumnId_Scale, ColumnBase::Display_Float));
creatureColumns.mScale = &mColumns.back();
mColumns.push_back (RefIdColumn (Columns::ColumnId_OriginalCreature, ColumnBase::Display_Creature));
mColumns.push_back (RefIdColumn (Columns::ColumnId_ParentCreature, ColumnBase::Display_Creature));
creatureColumns.mOriginal = &mColumns.back();
static const struct

@ -51,6 +51,7 @@ Networking::Networking(RakNet::RakPeerInterface *peer) : mclient(nullptr)
playerPacketController->SetStream(nullptr, &bsOut);
actorPacketController->SetStream(nullptr, &bsOut);
objectPacketController->SetStream(nullptr, &bsOut);
worldstatePacketController->SetStream(nullptr, &bsOut);
running = true;
exitCode = 0;

@ -1,84 +0,0 @@
#include "Shapeshift.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Log.hpp>
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
#include <apps/openmw-mp/Networking.hpp>
#include <iostream>
using namespace std;
double ShapeshiftFunctions::GetScale(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0.0f);
return player->scale;
}
bool ShapeshiftFunctions::IsWerewolf(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->isWerewolf;
}
const char *ShapeshiftFunctions::GetCreatureRefId(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->creatureRefId.c_str();
}
bool ShapeshiftFunctions::GetCreatureNameDisplayState(unsigned short pid) noexcept
{
Player *player;
GET_PLAYER(pid, player, 0);
return player->displayCreatureName;
}
void ShapeshiftFunctions::SetScale(unsigned short pid, double scale) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->scale = scale;
}
void ShapeshiftFunctions::SetWerewolfState(unsigned short pid, bool isWerewolf) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->isWerewolf = isWerewolf;
}
void ShapeshiftFunctions::SetCreatureRefId(unsigned short pid, const char *refId) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->creatureRefId = refId;
}
void ShapeshiftFunctions::SetCreatureNameDisplayState(unsigned short pid, bool displayState) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->displayCreatureName = displayState;
}
void ShapeshiftFunctions::SendShapeshift(unsigned short pid)
{
Player *player;
GET_PLAYER(pid, player, );
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SHAPESHIFT)->setPlayer(player);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SHAPESHIFT)->Send(false);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_PLAYER_SHAPESHIFT)->Send(true);
}

@ -1,120 +0,0 @@
#ifndef OPENMW_SHAPESHIFTAPI_HPP
#define OPENMW_SHAPESHIFTAPI_HPP
#include "../Types.hpp"
#define SHAPESHIFTAPI \
{"GetScale", ShapeshiftFunctions::GetScale},\
{"IsWerewolf", ShapeshiftFunctions::IsWerewolf},\
{"GetCreatureRefId", ShapeshiftFunctions::GetCreatureRefId},\
{"GetCreatureNameDisplayState", ShapeshiftFunctions::GetCreatureNameDisplayState},\
\
{"SetScale", ShapeshiftFunctions::SetScale},\
{"SetWerewolfState", ShapeshiftFunctions::SetWerewolfState},\
{"SetCreatureRefId", ShapeshiftFunctions::SetCreatureRefId},\
{"SetCreatureNameDisplayState", ShapeshiftFunctions::SetCreatureNameDisplayState},\
\
{"SendShapeshift", ShapeshiftFunctions::SendShapeshift}
class ShapeshiftFunctions
{
public:
/**
* \brief Get the scale of a player.
*
* \param pid The player ID.
* \return The scale.
*/
static double GetScale(unsigned short pid) noexcept;
/**
* \brief Check whether a player is a werewolf.
*
* This is based on the last PlayerShapeshift packet received or sent for that player.
*
* \param pid The player ID.
* \return The werewolf state.
*/
static bool IsWerewolf(unsigned short pid) noexcept;
/**
* \brief Get the refId of the creature the player is disguised as.
*
* \param pid The player ID.
* \return The creature refId.
*/
static const char *GetCreatureRefId(unsigned short pid) noexcept;
/**
* \brief Check whether a player's name is replaced by that of the creature they are
* disguised as when other players hover over them.
*
* This is based on the last PlayerShapeshift packet received or sent for that player.
*
* \param pid The player ID.
* \return The creature name display state.
*/
static bool GetCreatureNameDisplayState(unsigned short pid) noexcept;
/**
* \brief Set the scale of a player.
*
* This changes the scale recorded for that player in the server memory, but
* does not by itself send a packet.
*
* \param pid The player ID.
* \param scale The new scale.
* \return void
*/
static void SetScale(unsigned short pid, double scale) noexcept;
/**
* \brief Set the werewolf state of a player.
*
* This changes the werewolf state recorded for that player in the server memory, but
* does not by itself send a packet.
*
* \param pid The player ID.
* \param isWerewolf The new werewolf state.
* \return void
*/
static void SetWerewolfState(unsigned short pid, bool isWerewolf) noexcept;
/**
* \brief Set the refId of the creature a player is disguised as.
*
* This changes the creature refId recorded for that player in the server memory, but
* does not by itself send a packet.
*
* \param pid The player ID.
* \param refId The creature refId.
* \param displaysCreatureName Whether the player's name appears as that of the creature
* when hovered over by others.
* \return void
*/
static void SetCreatureRefId(unsigned short pid, const char *refId) noexcept;
/**
* \brief Set whether a player's name is replaced by that of the creature they are
* disguised as when other players hover over them.
*
* \param pid The player ID.
* \param displayState The creature name display state.
* \return void
*/
static void SetCreatureNameDisplayState(unsigned short pid, bool displayState) noexcept;
/**
* \brief Send a PlayerShapeshift packet about a player.
*
* This sends the packet to all players connected to the server. It is currently used
* only to communicate werewolf states.
*
* \param pid The player ID.
* \return void
*/
static void SendShapeshift(unsigned short pid);
};
#endif //OPENMW_SHAPESHIFTAPI_HPP

@ -1,50 +0,0 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include <apps/openmw-mp/Networking.hpp>
#include <apps/openmw-mp/Player.hpp>
#include <apps/openmw-mp/Script/ScriptFunctions.hpp>
#include "Worldstate.hpp"
#include <iostream>
using namespace std;
void WorldstateFunctions::SetHour(unsigned short pid, double hour) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->hour = hour;
player->month = -1;
player->day = -1;
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->setPlayer(player);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->Send(false);
}
void WorldstateFunctions::SetMonth(unsigned short pid, int month) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->hour = -1;
player->month = month;
player->day = -1;
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->setPlayer(player);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->Send(false);
}
void WorldstateFunctions::SetDay(unsigned short pid, int day) noexcept
{
Player *player;
GET_PLAYER(pid, player, );
player->hour = -1;
player->month = -1;
player->day = day;
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->setPlayer(player);
mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME)->Send(false);
}

@ -1,44 +0,0 @@
#ifndef OPENMW_WORLDSTATEAPI_HPP
#define OPENMW_WORLDSTATEAPI_HPP
#include "../Types.hpp"
#define WORLDSTATEAPI \
{"SetHour", WorldstateFunctions::SetHour},\
{"SetMonth", WorldstateFunctions::SetMonth},\
{"SetDay", WorldstateFunctions::SetDay}
class WorldstateFunctions
{
public:
/**
* \brief Set the game hour for a player and send a GameTime packet to that player.
*
* \param pid The player ID.
* \param hour The hour.
* \return void
*/
static void SetHour(unsigned short pid, double hour) noexcept;
/**
* \brief Set the game month for a player and send a GameTime packet to that player.
*
* \param pid The player ID.
* \param month The month.
* \return void
*/
static void SetMonth(unsigned short pid, int month) noexcept;
/**
* \brief Set the game day for a player and send a GameTime packet to that player.
*
* \param pid The player ID.
* \param day The day.
* \return void
*/
static void SetDay(unsigned short pid, int day) noexcept;
};
#endif //OPENMW_WORLDSTATEAPI_HPP

@ -12,8 +12,10 @@
#include <boost/tokenizer.hpp>
#include <components/misc/stringops.hpp>
#include <components/openmw-mp/NetworkMessages.hpp>
#include <components/openmw-mp/Version.hpp>
#include <components/openmw-mp/Base/BaseWorldstate.hpp>
#include <apps/openmw/mwworld/inventorystore.hpp>
@ -37,6 +39,7 @@
using namespace std;
mwmp::BaseWorldstate tempWorldstate;
#if defined(SOL_SAFE_FUNCTIONS)
inline int errHandler(lua_State *L)
@ -258,38 +261,47 @@ LuaState::LuaState()
});
lua->set_function("setHour", [](double hour) {
auto packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME);
auto packet = mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME);
tempWorldstate.hour = hour;
tempWorldstate.month = -1;
tempWorldstate.day = -1;
Players::for_each([&hour, &packet](Player *player){
player->hour = hour;
player->month = -1;
player->day = -1;
packet->setPlayer(player);
tempWorldstate.guid = player->guid;
packet->setWorldstate(&tempWorldstate);
packet->Send(false);
});
});
lua->set_function("setMonth", [](int month) {
auto packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME);
auto packet = mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME);
tempWorldstate.hour = -1;
tempWorldstate.month = month;
tempWorldstate.day = -1;
Players::for_each([&month, &packet](Player *player){
player->hour = -1;
player->month = month;
player->day = -1;
packet->setPlayer(player);
tempWorldstate.guid = player->guid;
packet->setWorldstate(&tempWorldstate);
packet->Send(false);
});
});
lua->set_function("setDay", [](int day) {
auto packet = mwmp::Networking::get().getPlayerPacketController()->GetPacket(ID_GAME_TIME);
auto packet = mwmp::Networking::get().getWorldstatePacketController()->GetPacket(ID_GAME_TIME);
tempWorldstate.hour = -1;
tempWorldstate.month = -1;
tempWorldstate.day = day;
Players::for_each([&day, &packet](Player *player){
player->hour = -1;
player->month = -1;
player->day = day;
packet->setPlayer(player);
tempWorldstate.guid = player->guid;
packet->setWorldstate(&tempWorldstate);
packet->Send(false);
});
});

@ -115,14 +115,14 @@ add_openmw_dir (mwmp/processors/actor ProcessorActorAI ProcessorActorAnimFlags P
add_openmw_dir (mwmp/processors/player ProcessorChatMessage ProcessorGUIMessageBox ProcessorHandshake
ProcessorUserDisconnected ProcessorUserMyID ProcessorCellCreate ProcessorRecordDynamic ProcessorGameSettings
ProcessorGameTime ProcessorGameWeather ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack
ProcessorPlayerAttribute ProcessorPlayerBaseInfo ProcessorPlayerBehavior ProcessorPlayerBook ProcessorPlayerBounty
ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath
ProcessorPlayerDisposition ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction
ProcessorPlayerInventory ProcessorPlayerJail ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel
ProcessorPlayerMap ProcessorPlayerMiscellaneous ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys
ProcessorPlayerReputation ProcessorPlayerResurrect ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech
ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic
ProcessorGameWeather ProcessorPlayerAnimFlags ProcessorPlayerAnimPlay ProcessorPlayerAttack ProcessorPlayerAttribute
ProcessorPlayerBaseInfo ProcessorPlayerBehavior ProcessorPlayerBook ProcessorPlayerBounty ProcessorPlayerCellChange
ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerDisposition
ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInteraction ProcessorPlayerInventory ProcessorPlayerJail
ProcessorPlayerJournal ProcessorPlayerKillCount ProcessorPlayerLevel ProcessorPlayerMap ProcessorPlayerMiscellaneous
ProcessorPlayerMomentum ProcessorPlayerPosition ProcessorPlayerQuickKeys ProcessorPlayerReputation ProcessorPlayerResurrect
ProcessorPlayerShapeshift ProcessorPlayerSkill ProcessorPlayerSpeech ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic
ProcessorPlayerTopic
)
add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleCommand ProcessorContainer ProcessorDoorDestination
@ -133,6 +133,9 @@ add_openmw_dir (mwmp/processors/object BaseObjectProcessor ProcessorConsoleComma
ProcessorScriptMemberFloat ProcessorScriptGlobalShort ProcessorScriptGlobalFloat
)
add_openmw_dir (mwmp/processors/worldstate ProcessorGameTime
)
# Main executable
if (NOT ANDROID)

@ -1,7 +1,8 @@
#include "ObjectProcessor.hpp"
#include "../Main.hpp"
#include "../Networking.hpp"
#include "ObjectProcessor.hpp"
using namespace mwmp;
template<class T>

@ -9,7 +9,6 @@
#include "player/ProcessorCellCreate.hpp"
#include "player/ProcessorRecordDynamic.hpp"
#include "player/ProcessorGameSettings.hpp"
#include "player/ProcessorGameTime.hpp"
#include "player/ProcessorGameWeather.hpp"
#include "player/ProcessorPlayerAnimFlags.hpp"
#include "player/ProcessorPlayerAnimPlay.hpp"
@ -93,6 +92,7 @@
#include "actor/ProcessorActorTest.hpp"
#include "WorldstateProcessor.hpp"
#include "worldstate/ProcessorGameTime.hpp"
using namespace mwmp;
@ -106,7 +106,6 @@ void ProcessorInitializer()
PlayerProcessor::AddProcessor(new ProcessorCellCreate());
PlayerProcessor::AddProcessor(new ProcessorRecordDynamic());
PlayerProcessor::AddProcessor(new ProcessorGameSettings());
PlayerProcessor::AddProcessor(new ProcessorGameTime());
PlayerProcessor::AddProcessor(new ProcessorGameWeather());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimFlags());
PlayerProcessor::AddProcessor(new ProcessorPlayerAnimPlay());
@ -186,4 +185,6 @@ void ProcessorInitializer()
ActorProcessor::AddProcessor(new ProcessorActorSpeech());
ActorProcessor::AddProcessor(new ProcessorActorStatsDynamic());
ActorProcessor::AddProcessor(new ProcessorActorTest());
WorldstateProcessor::AddProcessor(new ProcessorGameTime());
}

@ -1,6 +1,7 @@
#include "../Main.hpp"
#include "../Networking.hpp"
#include "WorldstateProcessor.hpp"
#include "../Main.hpp"
using namespace mwmp;
@ -14,6 +15,8 @@ bool WorldstateProcessor::Process(RakNet::Packet &packet, BaseWorldstate &worlds
worldstate.guid = guid;
WorldstatePacket *myPacket = Main::get().getNetworking()->getWorldstatePacket(packet.data[0]);
myPacket->setWorldstate(&worldstate);
myPacket->SetReadStream(&bsIn);
for (auto &processor : processors)

@ -1,18 +1,14 @@
//
// Created by koncord on 16.04.17.
//
#ifndef OPENMW_PROCESSORGAMETIME_HPP
#define OPENMW_PROCESSORGAMETIME_HPP
#include <apps/openmw/mwbase/world.hpp>
#include <apps/openmw/mwbase/environment.hpp>
#include "../PlayerProcessor.hpp"
#include "../WorldstateProcessor.hpp"
namespace mwmp
{
class ProcessorGameTime final: public PlayerProcessor
class ProcessorGameTime final : public WorldstateProcessor
{
public:
ProcessorGameTime()
@ -20,17 +16,17 @@ namespace mwmp
BPP_INIT(ID_GAME_TIME)
}
virtual void Do(PlayerPacket &packet, BasePlayer *player)
virtual void Do(WorldstatePacket &packet, BaseWorldstate &worldstate)
{
if (isLocal())
{
MWBase::World *world = MWBase::Environment::get().getWorld();
if (player->hour != -1)
world->setHour(player->hour);
else if (player->day != -1)
world->setDay(player->day);
else if (player->month != -1)
world->setMonth(player->month);
if (worldstate.hour != -1)
world->setHour(worldstate.hour);
else if (worldstate.day != -1)
world->setDay(worldstate.day);
else if (worldstate.month != -1)
world->setMonth(worldstate.month);
}
}
};

@ -8,35 +8,31 @@ branches:
environment:
matrix:
- msvc: 2013
- msvc: 2015
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- msvc: 2017
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
platform:
- Win32
# - x64
# - Win32
- x64
configuration:
- Debug
# - Release
# For the Qt, Boost, CMake, etc installs
os: Visual Studio 2015
#os: Visual Studio 2017
# We want the git revision for versioning,
# so shallow clones don't work.
clone_depth: 1
cache:
- C:\projects\openmw\deps\Bullet-2.83.7-msvc2013-win32.7z
- C:\projects\openmw\deps\Bullet-2.83.7-msvc2013-win64.7z
- C:\projects\openmw\deps\Bullet-2.83.7-msvc2015-win32.7z
- C:\projects\openmw\deps\Bullet-2.83.7-msvc2015-win64.7z
- C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2013-win32.7z
- C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2013-win32.7z
- C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2015-win64.7z
- C:\projects\openmw\deps\MyGUI-3.2.3-git-msvc2015-win64.7z
- C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2013-win32.7z
- C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2013-win32.7z
- C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2015-win64.7z
- C:\projects\openmw\deps\OSG-3.4.0-scrawl-msvc2015-win64.7z
- C:\projects\openmw\deps\ffmpeg-3.0.1-dev-win32.7z
@ -52,7 +48,7 @@ install:
- set PATH=C:\Program Files\Git\mingw64\bin;%PATH%
before_build:
- cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% -v %msvc%
- cmd: sh %APPVEYOR_BUILD_FOLDER%\CI\before_script.msvc.sh -u -p %PLATFORM% -v %msvc% -V
build_script:
- cmd: if %PLATFORM%==Win32 set build=MSVC%msvc%_32

@ -174,8 +174,7 @@ add_component_dir (openmw-mp/Packets/Actor
add_component_dir (openmw-mp/Packets/Player
PlayerPacket
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGUIWindow PacketGameSettings PacketGameTime
PacketGameWeather
PacketHandshake PacketChatMessage PacketGUIBoxes PacketGUIWindow PacketGameSettings PacketGameWeather
PacketCellCreate PacketRecordDynamic
@ -199,6 +198,7 @@ add_component_dir (openmw-mp/Packets/Object
add_component_dir (openmw-mp/Packets/Worldstate
WorldstatePacket
PacketGameTime
)
add_component_dir (fallback

@ -281,10 +281,7 @@ namespace mwmp
RakNet::RakNetGUID guid;
GUIMessageBox guiMessageBox;
int month;
int day;
GUIWindow guiWindow;
double hour;
// Track only the indexes of the attributes that have been changed,
// with the attribute values themselves being stored in creatureStats.mAttributes

@ -1,6 +1,8 @@
#ifndef OPENMW_BASESTRUCTS_HPP
#define OPENMW_BASESTRUCTS_HPP
#include <string>
#include <components/esm/statstate.hpp>
#include <vector>

@ -19,6 +19,10 @@ namespace mwmp
RakNet::RakNetGUID guid;
int month;
int day;
double hour;
bool isValid;
};
}

@ -8,7 +8,6 @@
#include "../Packets/Player/PacketCellCreate.hpp"
#include "../Packets/Player/PacketRecordDynamic.hpp"
#include "../Packets/Player/PacketGameSettings.hpp"
#include "../Packets/Player/PacketGameTime.hpp"
#include "../Packets/Player/PacketGameWeather.hpp"
#include "../Packets/Player/PacketPlayerActiveSkills.hpp"
#include "../Packets/Player/PacketPlayerAnimFlags.hpp"
@ -60,7 +59,6 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p
AddPacket<PacketCellCreate>(&packets, peer);
AddPacket<PacketRecordDynamic>(&packets, peer);
AddPacket<PacketGameSettings>(&packets, peer);
AddPacket<PacketGameTime>(&packets, peer);
AddPacket<PacketGameWeather>(&packets, peer);
AddPacket<PacketPlayerActiveSkills>(&packets, peer);

@ -1,6 +1,8 @@
#include "../Packets/Worldstate/PacketGameTime.hpp"
#include "WorldstatePacketController.hpp"
mwmp::WorldstatePacketController::WorldstatePacketController(RakNet::RakPeerInterface *peer)
{
AddPacket<PacketGameTime>(&packets, peer);
}

@ -1,13 +1,9 @@
//
// Created by koncord on 30.08.16.
//
#include "PacketGameTime.hpp"
#include <components/openmw-mp/NetworkMessages.hpp>
using namespace mwmp;
PacketGameTime::PacketGameTime(RakNet::RakPeerInterface *peer) : PlayerPacket(peer)
PacketGameTime::PacketGameTime(RakNet::RakPeerInterface *peer) : WorldstatePacket(peer)
{
packetID = ID_GAME_TIME;
orderChannel = CHANNEL_SYSTEM;
@ -15,9 +11,9 @@ PacketGameTime::PacketGameTime(RakNet::RakPeerInterface *peer) : PlayerPacket(pe
void PacketGameTime::Packet(RakNet::BitStream *bs, bool send)
{
PlayerPacket::Packet(bs, send);
WorldstatePacket::Packet(bs, send);
RW(player->month, send);
RW(player->day, send);
RW(player->hour, send);
RW(worldstate->month, send);
RW(worldstate->day, send);
RW(worldstate->hour, send);
}

@ -1,15 +1,11 @@
//
// Created by koncord on 30.08.16.
//
#ifndef OPENMW_PACKETGAMETIME_HPP
#define OPENMW_PACKETGAMETIME_HPP
#include <components/openmw-mp/Packets/Player/PlayerPacket.hpp>
#include <components/openmw-mp/Packets/Worldstate/WorldstatePacket.hpp>
namespace mwmp
{
class PacketGameTime final: public PlayerPacket
class PacketGameTime final : public WorldstatePacket
{
public:
PacketGameTime(RakNet::RakPeerInterface *peer);
Loading…
Cancel
Save