Correct Painting placement

This commit is contained in:
Shoghi Cervantes Pueyo 2013-02-06 15:57:48 +01:00
parent 639cfc8ab8
commit 93fa008acb
2 changed files with 10 additions and 9 deletions

View File

@ -1,14 +1,16 @@
#!/bin/bash
COMPILER_VERSION="0.7"
COMPILER_VERSION="0.8"
PHP_VERSION="5.4.11"
ZEND_VM="GOTO"
ZLIB_VERSION="1.2.7"
GMP_VERSION="5.1.0"
PTHREADS_VERSION="e4700122a89bf759a9c3a024bda0c7d025bcb93d"
PTHREADS_VERSION="d2fb571d6cd624bffe4faf766de128eb976a7d16"
CURL_VERSION="curl-7_28_1"
#READLINE_VERSION="6.2"
echo "[PocketMine] PHP installer and compiler for Linux - by @shoghicp v$COMPILER_VERSION"
echo "[PocketMine] PHP installer and compiler for Linux & Mac - by @shoghicp v$COMPILER_VERSION"
DIR=`pwd`
date > $DIR/install.log 2>&1
uname -a >> $DIR/install.log 2>&1
@ -18,6 +20,7 @@ type autoconf >> $DIR/install.log 2>&1 || { echo >&2 "[ERROR] Please install \"a
type automake >> $DIR/install.log 2>&1 || { echo >&2 "[ERROR] Please install \"automake\""; exit 1; }
type gcc >> $DIR/install.log 2>&1 || { echo >&2 "[ERROR] Please install \"gcc\""; exit 1; }
type m4 >> $DIR/install.log 2>&1 || { echo >&2 "[ERROR] Please install \"m4\""; exit 1; }
rm -r -f install_data/ >> $DIR/install.log 2>&1
rm -r -f php5/ >> $DIR/install.log 2>&1
mkdir -m 0777 install_data >> $DIR/install.log 2>&1
@ -26,7 +29,7 @@ cd install_data
set -e
#PHP 5
echo -n "[PHP5] downloading $PHP_VERSION..."
echo -n "[PHP] downloading $PHP_VERSION..."
wget http://php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -q -O - | tar -zx >> $DIR/install.log 2>&1
mv php-$PHP_VERSION php
echo " done!"
@ -85,6 +88,7 @@ cd ..
rm -r -f ./gmp
echo " done!"
echo -n "[cURL] downloading $CURL_VERSION..."
wget https://github.com/bagder/curl/archive/$CURL_VERSION.tar.gz --no-check-certificate -q -O - | tar -zx >> $DIR/install.log 2>&1
mv curl-$CURL_VERSION curl
@ -109,7 +113,6 @@ mv pthreads-$PTHREADS_VERSION $DIR/install_data/php/ext/pthreads
echo " done!"
set +e
echo -n "[PHP5] checking..."
if which free >/dev/null; then
MAX_MEMORY=$(free -m | awk '/^Mem:/{print $2}')
else
@ -123,6 +126,7 @@ else
OPTIMIZATION=""
fi
set -e
echo -n "[PHP] checking..."
cd php
./buildconf --force >> $DIR/install.log 2>&1
./configure $OPTIMIZATION--prefix=$DIR/php5 \

View File

@ -125,9 +125,6 @@ class Entity extends stdClass{
case ENTITY_OBJECT:
$this->setHealth(1, "generic");
//$this->setName((isset($objects[$this->type]) ? $objects[$this->type]:$this->type));
break;
case ENTITY_PAINTING:
break;
}
}
@ -300,7 +297,7 @@ class Entity extends stdClass{
}
}
if($this->last[0] != $this->x or $this->last[1] != $this->y or $this->last[2] != $this->z or $this->last[3] != $this->yaw or $this->last[4] != $this->pitch){
if($this->class !== ENTITY_OBJECT and ($this->last[0] != $this->x or $this->last[1] != $this->y or $this->last[2] != $this->z or $this->last[3] != $this->yaw or $this->last[4] != $this->pitch)){
$this->server->api->dhandle("entity.move", $this);
if($this->class === ENTITY_PLAYER){
$this->calculateVelocity();