diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-10-05 17:40:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-10-05 17:41:18 +0300 |
commit | b0cb2898bfe7f8888a786612444cabc83e8ff0cb (patch) | |
tree | 2c15de449e9ee39adbcfbdea4e2b5cad77c0fe8e /src/map | |
parent | e47b40be9b351ed05b69ba23e065cc26625f7c67 (diff) | |
download | hercules-b0cb2898bfe7f8888a786612444cabc83e8ff0cb.tar.gz hercules-b0cb2898bfe7f8888a786612444cabc83e8ff0cb.tar.bz2 hercules-b0cb2898bfe7f8888a786612444cabc83e8ff0cb.tar.xz hercules-b0cb2898bfe7f8888a786612444cabc83e8ff0cb.zip |
Add at command @camerainfo.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2538f797c..a7dc5dd95 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9810,6 +9810,24 @@ ACMD(reloadclans) return true; } +// show camera window or change camera parameters +ACMD(camerainfo) +{ + if (*message == '\0') { + clif->camera_showWindow(sd); + return true; + } + float range = 0; + float rotation = 0; + float latitude = 0; + if (sscanf(message, "%15f %15f %15f", &range, &rotation, &latitude) < 3) { + clif->message(fd, msg_fd(fd, 452)); // usage @camerainfo range rotation latitude + return false; + } + clif->camera_change(sd, range, rotation, latitude, SELF); + return true; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -10092,6 +10110,7 @@ static void atcommand_basecommands(void) ACMD_DEF(leaveclan), ACMD_DEF(reloadclans), ACMD_DEF(setzone), + ACMD_DEF(camerainfo), }; int i; |