Use float for spawn command (no need to multiply game coordinates by 100 anymore)
This commit is contained in:
parent
d6d7ca6e76
commit
3ecc265f4d
1 changed files with 6 additions and 6 deletions
|
@ -34,9 +34,9 @@ internal class ChatSpawnCommandHandler
|
||||||
{
|
{
|
||||||
if (args.Length != 4 ||
|
if (args.Length != 4 ||
|
||||||
!(int.TryParse(args[0], out int levelEntityId) &&
|
!(int.TryParse(args[0], out int levelEntityId) &&
|
||||||
int.TryParse(args[1], out int x) &&
|
float.TryParse(args[1], out float x) &&
|
||||||
int.TryParse(args[2], out int y) &&
|
float.TryParse(args[2], out float y) &&
|
||||||
int.TryParse(args[3], out int z)))
|
float.TryParse(args[3], out float z)))
|
||||||
{
|
{
|
||||||
_helperRoom.AddMessage(1338, 0, "Usage: /spawn monster [id] [x] [y] [z]");
|
_helperRoom.AddMessage(1338, 0, "Usage: /spawn monster [id] [x] [y] [z]");
|
||||||
return;
|
return;
|
||||||
|
@ -45,9 +45,9 @@ internal class ChatSpawnCommandHandler
|
||||||
MonsterEntity monster = _entityFactory.CreateMonster(levelEntityId);
|
MonsterEntity monster = _entityFactory.CreateMonster(levelEntityId);
|
||||||
monster.Pos = new()
|
monster.Pos = new()
|
||||||
{
|
{
|
||||||
X = x,
|
X = x * 100,
|
||||||
Y = y,
|
Y = y * 100,
|
||||||
Z = z
|
Z = z * 100
|
||||||
};
|
};
|
||||||
|
|
||||||
_entitySystem.Create(monster);
|
_entitySystem.Create(monster);
|
||||||
|
|
Loading…
Reference in a new issue