aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-01-06 19:17:44 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-01-06 19:17:44 +0200
commit2f5c28aaf1ee5cf337b0b6e569d9b06ccade2f21 (patch)
treeb0aa04eda6de865e29ac5e3e4b50168d4a42ddcc
parent4f2c1e36a10ee00c6779a02dd4441fa680fb3497 (diff)
downloadminetest-2f5c28aaf1ee5cf337b0b6e569d9b06ccade2f21.tar.gz
minetest-2f5c28aaf1ee5cf337b0b6e569d9b06ccade2f21.tar.bz2
minetest-2f5c28aaf1ee5cf337b0b6e569d9b06ccade2f21.zip
ObjectRef:setpos() to move player properly (a bit shortcuttish implementation)
-rw-r--r--src/scriptapi.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index 8321a4529..b617626a0 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -1747,6 +1747,10 @@ private:
v3f pos = checkFloatPos(L, 2);
// Do it
co->setPos(pos);
+ // Move player if applicable
+ ServerRemotePlayer *player = getplayer(ref);
+ if(player != NULL)
+ get_server(L)->SendMovePlayer(player);
return 0;
}