bool console = false;
std::string consoletext[15] = {};
-bool chatting = 0;
std::string displaytext[15] = {};
float displaytime[15] = {};
float displayblinkdelay = 0;
bool consoleblink = 0;
int consoleselected = 0;
-unsigned short crouchkey = 0, jumpkey = 0, forwardkey = 0, chatkey = 0, backkey = 0, leftkey = 0, rightkey = 0, drawkey = 0, throwkey = 0, attackkey = 0;
+unsigned short crouchkey = 0, jumpkey = 0, forwardkey = 0, backkey = 0, leftkey = 0, rightkey = 0, drawkey = 0, throwkey = 0, attackkey = 0;
unsigned short consolekey = 0;
int loading = 0;
extern bool console;
extern std::string consoletext[15];
-extern bool chatting;
extern std::string displaytext[15];
extern float displaytime[15];
extern float displayblinkdelay;
extern bool waiting;
extern Account* accountactive;
-extern unsigned short crouchkey, jumpkey, forwardkey, chatkey, backkey, leftkey, rightkey, drawkey, throwkey, attackkey;
+extern unsigned short crouchkey, jumpkey, forwardkey, backkey, leftkey, rightkey, drawkey, throwkey, attackkey;
extern unsigned short consolekey;
void newGame();
displaytime[0] = 0;
glEnable(GL_TEXTURE_2D);
glColor4f(1, 1, 1, 1);
- if (chatting) {
- sprintf (string, " ]");
- text->glPrint(10, 30 + screenheight - 330, string, 0, 1, screenwidth, screenheight);
- if (displayblink) {
- sprintf (string, "_");
- text->glPrint(30 + (float)(displayselected) * 10, 30 + (screenheight - 330), string, 0, 1, screenwidth, screenheight);
- }
- }
- for (i = 0; i < 15; i++)
- if ((i != 0 || chatting) && displaytime[i] < 4)
+ for (i = 1; i < 15; i++)
+ if (displaytime[i] < 4)
for (j = 0; j < displaytext[i].size(); j++) {
glColor4f(1, 1, 1, 4 - displaytime[i]);
sprintf (string, "%c", displaytext[i][j]);
}
}
- if (Input::isKeyPressed(chatkey) && !console && !chatting && debugmode)
- chatting = 1;
-
- if (chatting) {
- inputText(displaytext[0], &displayselected);
- if (!waiting) {
- if (!displaytext[0].empty()) {
- displaytext[0].clear();
- displayselected = 0;
- }
- chatting = 0;
- }
-
- displayblinkdelay -= multiplier;
- if (displayblinkdelay <= 0) {
- displayblinkdelay = .3;
- displayblink = 1 - displayblink;
- }
- }
- if (chatting)
- keyboardfrozen = true;
-
if (Input::isKeyPressed(consolekey) && debugmode) {
console = !console;
if (console) {
throwkey = SDL_SCANCODE_Q;
attackkey = MOUSEBUTTON1;
consolekey = SDL_SCANCODE_GRAVE;
- chatkey = SDL_SCANCODE_T;
}
void SaveSettings()
opstream << attackkey;
opstream << "\nConsole key:\n";
opstream << consolekey;
- opstream << "\nChat key:\n";
- opstream << chatkey;
opstream << "\nDamage bar:\n";
opstream << showdamagebar;
opstream << "\nStereoMode:\n";
ipstream >> attackkey;
} else if ( !strncmp(setting, "Console key", 11) ) {
ipstream >> consolekey;
- } else if ( !strncmp(setting, "Chat key", 8) ) {
- ipstream >> chatkey;
} else if ( !strncmp(setting, "Damage bar", 10) ) {
ipstream >> showdamagebar;
} else if ( !strncmp(setting, "StereoMode", 10) ) {