Moved vector natives from engine to core at29896
Moved precache_generic from engine to core at30469
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#include <vault>
|
||||
#include <lang>
|
||||
#include <messages>
|
||||
#include <vector>
|
||||
|
||||
/* Function is called just after server activation.
|
||||
* Good place for configuration loading, commands and cvars registration. */
|
||||
@ -74,6 +75,9 @@ native precache_model(const name[]);
|
||||
/* Precache sound. Can be used only in plugin_precache() function.*/
|
||||
native precache_sound(const name[]);
|
||||
|
||||
/* Precaches any file. */
|
||||
native precache_generic(szFile[]);
|
||||
|
||||
/* Sets info for player. */
|
||||
native set_user_info(index,const info[],const value[]);
|
||||
|
||||
@ -513,9 +517,6 @@ native server_exec();
|
||||
/* Emits sound. Sample must be precached. */
|
||||
native emit_sound(index, channel, sample[], Float:vol, Float:att,flags, pitch);
|
||||
|
||||
/* Returns distance between two vectors. */
|
||||
native get_distance(origin1[3],origin2[3]);
|
||||
|
||||
/* Registers new cvar for HL engine.
|
||||
* Returns the cvar pointer for get/set_pcvar functions.
|
||||
*/
|
||||
@ -809,9 +810,6 @@ native menu_setprop(menu, prop, ...);
|
||||
//and the callback is invoked.
|
||||
native menu_cancel(player);
|
||||
|
||||
// Gets distance between two origins (float)
|
||||
native Float:get_distance_f( Float:Origin1[3], Float:Origin2[3] );
|
||||
|
||||
// Dispatches a client cvar query
|
||||
// id: Player id
|
||||
// cvar: cvar name
|
||||
|
@ -38,8 +38,6 @@ native register_think(Classname[], function[]);
|
||||
* The module will automatically add +5 for Linux.
|
||||
*/
|
||||
|
||||
/* Precaches any file. */
|
||||
native precache_generic(szFile[]);
|
||||
/* Precaches an event. */
|
||||
native precache_event(type, Name[], {Float,Sql,Result,_}:...);
|
||||
|
||||
@ -152,17 +150,6 @@ native trace_hull(Float:origin[3],hull,ignoredent=0,ignoremonsters=0);
|
||||
* Returns 0 if theres no normal. */
|
||||
native trace_normal(iIgnoreEnt, Float:fStart[3], Float:fEnd[3], Float:vReturn[3]);
|
||||
|
||||
/* Changes a Vector to an Angle vector. */
|
||||
native vector_to_angle(Float:fVector[3], Float:vReturn[3]);
|
||||
|
||||
native angle_vector(Float:vector[3],FRU,Float:ret[3])
|
||||
|
||||
/* Gets the length of a vector (float[3]). */
|
||||
native Float:vector_length(Float:vVector[3]);
|
||||
|
||||
/* Gets the distance between 2 vectors (float[3]). */
|
||||
native Float:vector_distance(Float:vVector[3], Float:vVector2[3]);
|
||||
|
||||
/* Gets the ID of a grenade. */
|
||||
native get_grenade_id(id, model[], len, grenadeid = 0);
|
||||
|
||||
|
34
plugins/include/vector.inc
Normal file
34
plugins/include/vector.inc
Normal file
@ -0,0 +1,34 @@
|
||||
/* Vector functions (now part of Core)
|
||||
*
|
||||
* by the AMX Mod X Development Team
|
||||
*
|
||||
* This file is provided as is (no warranties).
|
||||
*/
|
||||
|
||||
#if defined _corevector_included
|
||||
#endinput
|
||||
#endif
|
||||
#define _corevector_included
|
||||
|
||||
/* Used for angle_vector() */
|
||||
#define ANGLEVECTOR_FORWARD 1
|
||||
#define ANGLEVECTOR_RIGHT 2
|
||||
#define ANGLEVECTOR_UP 3
|
||||
|
||||
/* Returns distance between two vectors. */
|
||||
native get_distance(origin1[3],origin2[3]);
|
||||
|
||||
/* Gets distance between two origins (float). */
|
||||
native Float:get_distance_f(Float:Origin1[3], Float:Origin2[3]);
|
||||
|
||||
/* Changes a vector into an angle vector. */
|
||||
native vector_to_angle(Float:fVector[3], Float:vReturn[3]);
|
||||
|
||||
/* Changes an angle vector into a vector. */
|
||||
native angle_vector(Float:vector[3], FRU, Float:ret[3]);
|
||||
|
||||
/* Gets the length of a vector (float[3]). */
|
||||
native Float:vector_length(Float:vVector[3]);
|
||||
|
||||
/* Gets the distance between 2 vectors (float[3]). */
|
||||
native Float:vector_distance(Float:vVector[3], Float:vVector2[3]);
|
Reference in New Issue
Block a user