Added support for viewpointvalue command (#3754)

Additionally added a script command to update the player's camera.
Added a new atcommand camerainfo for this, which is limited to admins.

Credits to @4144 for finding /setcamera
This commit is contained in:
Lemongrass3110
2018-12-20 19:26:02 +01:00
committed by GitHub
parent 1c987de71d
commit 4944491228
11 changed files with 116 additions and 1 deletions

View File

@@ -24043,6 +24043,23 @@ BUILDIN_FUNC(is_party_leader)
return SCRIPT_CMD_SUCCESS;
}
BUILDIN_FUNC( camerainfo ){
#if PACKETVER < 20160525
ShowError("buildin_camerainfo: This command requires PACKETVER 2016-05-25 or newer.\n");
return SCRIPT_CMD_FAILURE;
#else
struct map_session_data* sd;
if( !script_charid2sd( 5, sd ) ){
return SCRIPT_CMD_FAILURE;
}
clif_camerainfo( sd, false, script_getnum( st, 2 ) / 100.0f, script_getnum( st, 3 ) / 100.0f, script_getnum( st, 4 ) / 100.0f );
return SCRIPT_CMD_SUCCESS;
#endif
}
#include "../custom/script.inc"
// declarations that were supposed to be exported from npc_chat.c
@@ -24705,6 +24722,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(identifyall,"??"),
BUILDIN_DEF(is_guild_leader,"?"),
BUILDIN_DEF(is_party_leader,"?"),
BUILDIN_DEF(camerainfo,"iii?"),
#include "../custom/script_def.inc"
{NULL,NULL,NULL},