mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-22 20:55:52 +12:00
Add presents and fix bugs
This commit is contained in:
parent
d9cdd05acb
commit
0cf1665a11
12 changed files with 273 additions and 123 deletions
|
@ -177,27 +177,32 @@ namespace HISP.Game
|
|||
if (GameServer.GetUsersAt(this.X, this.Y, true, true).Length > 0)
|
||||
return;
|
||||
|
||||
if (UdlrScriptPos + 1 >= UDLRScript.Length)
|
||||
UdlrScriptPos = 0;
|
||||
else
|
||||
UdlrScriptPos++;
|
||||
|
||||
switch (UDLRScript.ToLower()[UdlrScriptPos])
|
||||
{
|
||||
case 'u':
|
||||
Y++;
|
||||
break;
|
||||
case 'd':
|
||||
Logger.DebugPrint(this.Name + " Moved up: was " + X + ", " + Y + " now: " + X + ", " + (Y + 1).ToString());
|
||||
Y--;
|
||||
break;
|
||||
case 'd':
|
||||
Logger.DebugPrint(this.Name + " Moved down: was " + X + ", " + Y + " now: " + X + ", " + (Y - 1).ToString());
|
||||
Y++;
|
||||
break;
|
||||
case 'l':
|
||||
Logger.DebugPrint(this.Name + " Moved left: was " + X + ", " + Y + " now: " + (X - 1).ToString() + ", " + Y );
|
||||
X--;
|
||||
break;
|
||||
case 'r':
|
||||
Logger.DebugPrint(this.Name + " Moved right: was " + X + ", " + Y + " now: " + (X + 1).ToString() + ", " + Y);
|
||||
X++;
|
||||
break;
|
||||
}
|
||||
|
||||
if (UdlrScriptPos > UDLRScript.Length)
|
||||
UdlrScriptPos = 0;
|
||||
else
|
||||
UdlrScriptPos++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue