projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fca151
)
"whereami()" function: Print coordinates as integers.
author
Florian Forster
<supertux@octo.it>
Sun, 7 Mar 2010 10:00:25 +0000
(10:00 +0000)
committer
Florian Forster
<supertux@octo.it>
Sun, 7 Mar 2010 10:00:25 +0000
(10:00 +0000)
The floating point part of the coordinates are distracting and not relevant.
SVN-Revision: 6568
src/scripting/functions.cpp
patch
|
blob
|
history
diff --git
a/src/scripting/functions.cpp
b/src/scripting/functions.cpp
index
24b6b33
..
5a03f37
100644
(file)
--- a/
src/scripting/functions.cpp
+++ b/
src/scripting/functions.cpp
@@
-252,7
+252,7
@@
void whereami()
{
if (!validate_sector_player()) return;
::Player* tux = Sector::current()->player;
- log_info << "You are at x " <<
tux->get_pos().x << ", y " << tux->get_pos().y
<< std::endl;
+ log_info << "You are at x " <<
((int) tux->get_pos().x) << ", y " << ((int) tux->get_pos().y)
<< std::endl;
}
void gotoend()