Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/console.cc')
-rw-r--r--src/server/console.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/console.cc b/src/server/console.cc
index ab03c58..9fdad4f 100644
--- a/src/server/console.cc
+++ b/src/server/console.cc
@@ -104,7 +104,7 @@ Console::~Console()
void Console::dump()
{
// dump console content
- for (Text::iterator it = log().begin(); it != log().end(); it++) {
+ for (Queue::iterator it = log().begin(); it != log().end(); it++) {
sys::ConsoleInterface::print((*it));
}
}
@@ -200,8 +200,8 @@ void Console::draw_status()
if (core::game()) {
attroff(A_BOLD);
color_set(2, NULL);
- int minutes = (int) floorf(core::game()->serverframetime() / 60.0f);
- int seconds = (int) floorf( core::game()->serverframetime() - (float) minutes* 60.0f);
+ int minutes = (int) floorf(core::game()->time() / 60.0f);
+ int seconds = (int) floorf( core::game()->time() - (float) minutes* 60.0f);
std::stringstream status;
status << "time " << std::setfill(' ') << std::setw(3) << minutes << ":" << std::setfill('0') << std::setw(2) << seconds;
mvaddnstr(0, 2, status.str().c_str(), status.str().size());
@@ -215,7 +215,7 @@ void Console::draw_text()
if ((w < 3) || (h < 3))
return;
- Text lines;
+ Queue lines;
int height = stdwin->_maxy - 1;
int width = stdwin->_maxx - 1;
@@ -223,7 +223,7 @@ void Console::draw_text()
int current_line = 0;
// parse console text, wrap long lines
- for (Text::iterator it = log().begin(); it != log().end() && current_line < bottom; it++) {
+ for (Queue::iterator it = log().begin(); it != log().end() && current_line < bottom; it++) {
if (current_line >= bottom - height) {
std::string linedata(*it);
linedata += '\n';
@@ -314,7 +314,7 @@ void Console::draw_text()
color_set(0, NULL);
attroff(A_BOLD);
- for (Text::reverse_iterator rit = lines.rbegin(); (y > 0) && (rit != lines.rend()); ++rit) {
+ for (Queue::reverse_iterator rit = lines.rbegin(); (y > 0) && (rit != lines.rend()); ++rit) {
const char *c = (*rit).c_str();
int x = 0;
@@ -360,10 +360,10 @@ void Console::draw()
console_updated = false;
}
-void Console::frame(float seconds)
+void Console::frame()
{
const size_t scroll_offset = 3;
- Text::reverse_iterator upit;
+ History::reverse_iterator upit;
if (!console_initialized)
return;
@@ -467,9 +467,9 @@ void Console::frame(float seconds)
if (input_updated) {
draw_input();
}
- if (roundf(core::game()->serverframetime()) != prev_time) {
+ if (roundf(core::application()->time()) != prev_time) {
draw_status();
- prev_time = roundf(core::game()->serverframetime());
+ prev_time = roundf(core::application()->time());
input_updated = true;
}
if (input_updated) {