projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f2c1e3
)
ObjectRef:setpos() to move player properly (a bit shortcuttish implementation)
author
Perttu Ahola
<celeron55@gmail.com>
Fri, 6 Jan 2012 17:17:44 +0000
(19:17 +0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Fri, 6 Jan 2012 17:17:44 +0000
(19:17 +0200)
src/scriptapi.cpp
patch
|
blob
|
history
diff --git
a/src/scriptapi.cpp
b/src/scriptapi.cpp
index 8321a452971a410f4c80e2f5815e79b35fe6d7b3..b617626a0bc3a2fb05359992bd40de5719ae4f0a 100644
(file)
--- 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;
}