From: Perttu Ahola Date: Fri, 6 Jan 2012 17:17:44 +0000 (+0200) Subject: ObjectRef:setpos() to move player properly (a bit shortcuttish implementation) X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=2f5c28aaf1ee5cf337b0b6e569d9b06ccade2f21;p=zefram%2Fminetest%2Fminetest_engine.git ObjectRef:setpos() to move player properly (a bit shortcuttish implementation) --- diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 8321a452..b617626a 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; }