Even more include file changes...

1) Moved message_begin, message_end, and write_ natives to messages.inc
2) Moved MSG constants to message_const.inc
All completely backwards compatible with compiling older plugins of course :)
This commit is contained in:
Scott Ehlert 2006-05-17 20:08:04 +00:00
parent 635b681825
commit 2d75dfe865
4 changed files with 56 additions and 53 deletions

View File

@ -11,8 +11,6 @@
#endif
#define _amxconst_included
#include <message_const>
#define AMXX_VERSION 1.75
#define AMXX_VERSION_NUM 175
stock const AMXX_VERSION_STR[]="1.75"
@ -54,28 +52,6 @@ stock const AMXX_VERSION_STR[]="1.75"
#define PLUGIN_HANDLED 1 /* stop other plugins */
#define PLUGIN_HANDLED_MAIN 2 /* to use in client_command(), continue all plugins but stop the command */
/* Destination types for message_begin() */
#define MSG_BROADCAST 0 /* unreliable to all */
#define MSG_ONE 1 /* reliable to one (msg_entity) */
#define MSG_ALL 2 /* reliable to all */
#define MSG_INIT 3 /* write to the init string */
#define MSG_PVS 4 /* Ents in PVS of org */
#define MSG_PAS 5 /* Ents in PAS of org */
#define MSG_PVS_R 6 /* Reliable to PVS */
#define MSG_PAS_R 7 /* Reliable to PAS */
#define MSG_ONE_UNRELIABLE 8 /* Send to one client, but don't put in reliable stream, put in unreliable datagram ( could be dropped ) */
#define MSG_SPEC 9 /* Sends to all spectator proxies */
/* Message types for message_begin() */
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 /* [vec3] add this angle to the view angle */
#define SVC_NEWUSERMSG 39
#define SVC_HLTV 50
/* Flags for register_cvar() */
#define FCVAR_ARCHIVE 1 /* set to cause it to be saved to vars.rc */
#define FCVAR_USERINFO 2 /* changes the client's info string */

View File

@ -474,21 +474,6 @@ native register_concmd(const cmd[],const function[],flags=-1, info[]="");
/* Registers function which will be called from server console. */
native register_srvcmd(const server_cmd[],const function[],flags=-1, info[]="");
/* These functinos are used to generate client messages.
* You may generate menu, smoke, shockwaves, thunderlights,
* intermission and many many others messages.
* See HL SDK for more examples. */
native message_begin( dest, msg_type, origin[3]={0,0,0},player=0);
native message_end();
native write_byte( x );
native write_char( x );
native write_short( x );
native write_long( x );
native write_entity( x );
native write_angle( x );
native write_coord( x );
native write_string( x[] );
/* Gets info about client command. */
native get_clcmd(index, command[], len1, &flags, info[], len2, flag);

View File

@ -11,6 +11,47 @@
#endif
#define _message_const_included
/* Destination types for message_begin() */
#define MSG_BROADCAST 0 // Unreliable to all
#define MSG_ONE 1 // Reliable to one (msg_entity)
#define MSG_ALL 2 // Reliable to all
#define MSG_INIT 3 // Write to the init string
#define MSG_PVS 4 // Ents in PVS of org
#define MSG_PAS 5 // Ents in PAS of org
#define MSG_PVS_R 6 // Reliable to PVS
#define MSG_PAS_R 7 // Reliable to PAS
#define MSG_ONE_UNRELIABLE 8 // Send to one client, but don't put in reliable stream, put in unreliable datagram (could be dropped)
#define MSG_SPEC 9 // Sends to all spectator proxies
/* Message types for message_begin() */
#define SVC_TEMPENTITY 23
#define SVC_INTERMISSION 30
#define SVC_CDTRACK 32
#define SVC_WEAPONANIM 35
#define SVC_ROOMTYPE 37
#define SVC_ADDANGLE 38 // [vec3] add this angle to the view angle
#define SVC_NEWUSERMSG 39
#define SVC_HLTV 50
/* Message flags for set_msg_block() */
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
/* Used with get_msg_argtype() and set_msg_arg_*
enum
{
ARG_BYTE = 1, /* int */
ARG_CHAR, /* int */
ARG_SHORT, /* int */
ARG_LONG, /* int */
ARG_ANGLE, /* float */
ARG_COORD, /* float */
ARG_STRING, /* string */
ARG_ENTITY, /* int */
}
/* Temp entity message types for message_begin() */
#define TE_BEAMPOINTS 0 // Beam effect between two points
// write_byte(TE_BEAMPOINTS)
// write_coord(startposition.x)

View File

@ -10,21 +10,22 @@
#endif
#define _coremsg_included
#define BLOCK_NOT 0
#define BLOCK_ONCE 1
#define BLOCK_SET 2
#include <message_const>
enum
{
ARG_BYTE = 1, /* int */
ARG_CHAR, /* int */
ARG_SHORT, /* int */
ARG_LONG, /* int */
ARG_ANGLE, /* float */
ARG_COORD, /* float */
ARG_STRING, /* string */
ARG_ENTITY, /* int */
}
/* These functinos are used to generate client messages.
* You may generate menu, smoke, shockwaves, thunderlights,
* intermission and many many others messages.
* See HL SDK for more examples. */
native message_begin(dest, msg_type, origin[3] = {0,0,0}, player = 0);
native message_end();
native write_byte(x);
native write_char(x);
native write_short(x);
native write_long(x);
native write_entity(x);
native write_angle(x);
native write_coord(x);
native write_string(x[]);
/* Sets/Gets what engine messages are blocked. */
native set_msg_block(iMessage, iMessageFlags);