First complete

This commit is contained in:
moparisthebest
2016-11-05 02:18:08 -04:00
parent 0887a41178
commit fd2414b131
82 changed files with 1689 additions and 6 deletions

35
src/freeminer/.SRCINFO Normal file
View File

@@ -0,0 +1,35 @@
pkgbase = freeminer
pkgdesc = An open source sandbox game inspired by Minecraft.
pkgver = 0.4.14.8
pkgrel = 2
url = http://freeminer.org/
arch = i686
arch = x86_64
license = GPL3
license = CCPL:cc-by-sa-3.0
makedepends = cmake
makedepends = msgpack-c
makedepends = clang
depends = leveldb
depends = curl
depends = hiredis
depends = sqlite
depends = luajit
depends = irrlicht
depends = openal
depends = enet
depends = jsoncpp
depends = libvorbis
depends = hicolor-icon-theme
depends = freetype2
provides = freeminer=0.4.14.8
conflicts = freeminer-git
source = https://github.com/freeminer/freeminer/releases/download/0.4.14.8/freeminer-0.4.14.8.zip
source = enet_shared_lib.patch
source = fix_msgpack.patch
sha512sums = 093c1640c9a070fdbd45074d0a4acc5b7894d23cd436dc3cf794cee8fff92930cf26f8d802b984cb9ce19bac7fccc6e0ce948c816c9e19b9e9551e373e560beb
sha512sums = ac51ee33df27f9fb3bdf16c50b2a9da602d6c55bba7afe21492d0056cdfefa5f84ccfb306c23bd2bcf22066ca3ef2a952110ba0de350602393754f0466383004
sha512sums = 4ac827ed4b1185264c6b7df279c40548b7e5dc5957129ee6dc4fe6ff05222844dabab67cf1f8c1932cac0cc691ac040812eca662d7ff36424eb3d3827bb126a0
pkgname = freeminer

View File

@@ -0,0 +1,12 @@
diff -uprNEBZ --suppress-blank-empty a/src/main.cpp b/src/main.cpp
--- a/src/main.cpp 2015-11-21 01:53:20.445038202 -0600
+++ b/src/main.cpp 2015-11-21 01:57:13.407056516 -0600
@@ -64,7 +64,7 @@ along with Freeminer. If not, see <http
#if USE_ENET
// todo: move to connection
-#include "enet/enet.h"
+#include <enet/enet.h>
#endif
#ifdef HAVE_TOUCHSCREENGUI

View File

@@ -0,0 +1,37 @@
diff -uprNEBZ --suppress-blank-empty a/src/network/networkpacket.cpp b/src/network/networkpacket.cpp
--- a/src/network/networkpacket.cpp 2016-05-16 01:59:02.000000000 -0500
+++ b/src/network/networkpacket.cpp 2016-07-07 22:30:52.572633557 -0500
@@ -539,11 +539,11 @@ Buffer<u8> NetworkPacket::oldForgePacket
}
//freeminer:
-bool parse_msgpack_packet(char *data, u32 datasize, MsgpackPacket *packet, int *command, msgpack::unpacked *msg) {
+bool parse_msgpack_packet(char *data, u32 datasize, MsgpackPacket *packet, int *command, msgpack::unpacked &msg) {
try {
//msgpack::unpacked msg;
msgpack::unpack(msg, data, datasize);
- msgpack::object obj = msg->get();
+ msgpack::object obj = msg.get();
*packet = obj.as<MsgpackPacket>();
*command = (*packet)[MSGPACK_COMMAND].as<int>();
@@ -576,7 +576,7 @@ int NetworkPacket::packet_unpack() {
packet = new MsgpackPacketSafe;
if (!packet_unpacked)
packet_unpacked = new msgpack::unpacked;
- if (!parse_msgpack_packet(getString(0), datasize, packet, &command, packet_unpacked)) {
+ if (!parse_msgpack_packet(getString(0), datasize, packet, &command, *packet_unpacked)) {
//verbosestream<<"Server: Ignoring broken packet from " <<addr_s<<" (peer_id="<<peer_id<<") size="<<datasize<<std::endl;
return 0;
}
diff -uprNEBZ --suppress-blank-empty a/src/network/networkpacket.h b/src/network/networkpacket.h
--- a/src/network/networkpacket.h 2016-05-16 01:59:02.000000000 -0500
+++ b/src/network/networkpacket.h 2016-07-07 22:31:26.005881914 -0500
@@ -140,6 +140,6 @@ private:
};
#include "../util/msgpack_serialize.h"
-bool parse_msgpack_packet(char *data, u32 datasize, MsgpackPacket *packet, int *command, msgpack::unpacked *msg);
+bool parse_msgpack_packet(char *data, u32 datasize, MsgpackPacket *packet, int *command, msgpack::unpacked &msg);
#endif