mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Newly placed tanks now drag away old wreckage if present
Console line input only backspaces to beginning of line git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1050 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+8
-13
@@ -917,26 +917,21 @@ void Console::OnChar(WORD myChar) {
|
||||
|
||||
if (myChar == 8)
|
||||
{
|
||||
if (Input.length() > 0)
|
||||
int l = Input.length();
|
||||
if (l > 0)
|
||||
{
|
||||
wchar_t last = Input[ Input.length() - 1];
|
||||
wchar_t last = Input[ l - 1];
|
||||
if (last == '\n')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
text[0] = 8;
|
||||
text[1] = L' ';
|
||||
text[2] = 8;
|
||||
text[3] = 0;
|
||||
|
||||
Input.resize( Input.length() - 1);
|
||||
|
||||
if (last == '\n')
|
||||
{
|
||||
int cx = Input.rfind( '\n') + 1;
|
||||
cx = Input.length() - cx;
|
||||
SendTextToConsole( text);
|
||||
m_csbiCursor.dwCursorPosition.X = cx;
|
||||
|
||||
return;
|
||||
}
|
||||
Input.resize( l - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user