plugins/include/entity_prop_stocks.inc
changeset 1837 652038bb27e6
parent 1834 74d7a2edeb49
child 1845 a2e4c1cbf800
     1.1 --- a/plugins/include/entity_prop_stocks.inc	Mon Jan 07 06:58:43 2008 +0000
     1.2 +++ b/plugins/include/entity_prop_stocks.inc	Mon Jan 07 06:59:44 2008 +0000
     1.3 @@ -35,20 +35,65 @@
     1.4  #endif
     1.5  #define _entity_prop_stocks_included
     1.6  
     1.7 -enum
     1.8 +enum MoveType
     1.9  {
    1.10 -	MOVETYPE_NONE = 0,			/** never moves */
    1.11 -	MOVETYPE_ISOMETRIC,			/** For players */
    1.12 -	MOVETYPE_WALK,				/** Player only - moving on the ground */
    1.13 -	MOVETYPE_STEP,				/** gravity, special edge handling -- monsters use this */
    1.14 -	MOVETYPE_FLY,				/** No gravity, but still collides with stuff */
    1.15 -	MOVETYPE_FLYGRAVITY,			/** flies through the air + is affected by gravity */
    1.16 -	MOVETYPE_VPHYSICS,			/** uses VPHYSICS for simulation */
    1.17 -	MOVETYPE_PUSH,				/** no clip to world, push and crush */
    1.18 -	MOVETYPE_NOCLIP,			/** No gravity, no collisions, still do velocity/avelocity */
    1.19 -	MOVETYPE_LADDER,			/** Used by players only when going onto a ladder */
    1.20 -	MOVETYPE_OBSERVER,			/** Observer movement, depends on player's observer mode */
    1.21 -	MOVETYPE_CUSTOM,			/** Allows the entity to describe its own physics */
    1.22 +	MOVETYPE_NONE = 0,			/**< never moves */
    1.23 +	MOVETYPE_ISOMETRIC,			/**< For players */
    1.24 +	MOVETYPE_WALK,				/**< Player only - moving on the ground */
    1.25 +	MOVETYPE_STEP,				/**< gravity, special edge handling -- monsters use this */
    1.26 +	MOVETYPE_FLY,				/**< No gravity, but still collides with stuff */
    1.27 +	MOVETYPE_FLYGRAVITY,		/**< flies through the air + is affected by gravity */
    1.28 +	MOVETYPE_VPHYSICS,			/**< uses VPHYSICS for simulation */
    1.29 +	MOVETYPE_PUSH,				/**< no clip to world, push and crush */
    1.30 +	MOVETYPE_NOCLIP,			/**< No gravity, no collisions, still do velocity/avelocity */
    1.31 +	MOVETYPE_LADDER,			/**< Used by players only when going onto a ladder */
    1.32 +	MOVETYPE_OBSERVER,			/**< Observer movement, depends on player's observer mode */
    1.33 +	MOVETYPE_CUSTOM,			/**< Allows the entity to describe its own physics */
    1.34 +};
    1.35 +
    1.36 +enum RenderMode
    1.37 +{	
    1.38 +	RENDER_NORMAL,			/**< src */
    1.39 +	RENDER_TRANSCOLOR,		/**< c*a+dest*(1-a) */
    1.40 +	RENDER_TRANSTEXTURE,	/**< src*a+dest*(1-a) */
    1.41 +	RENDER_GLOW,			/**< src*a+dest -- No Z buffer checks -- Fixed size in screen space */
    1.42 +	RENDER_TRANSALPHA,		/**< src*srca+dest*(1-srca) */
    1.43 +	RENDER_TRANSADD,		/**< src*a+dest */
    1.44 +	RENDER_ENVIRONMENTAL,	/**< not drawn, used for environmental effects */
    1.45 +	RENDER_TRANSADDFRAMEBLEND, /**< use a fractional frame value to blend between animation frames */
    1.46 +	RENDER_TRANSALPHAADD,	/**< src + dest*(1-a) */
    1.47 +	RENDER_WORLDGLOW,		/**< Same as kRenderGlow but not fixed size in screen space */
    1.48 +	RENDER_NONE,			/**< Don't render. */
    1.49 +};
    1.50 +
    1.51 +enum RenderFx
    1.52 +{	
    1.53 +	RENDERFX_NONE = 0, 
    1.54 +	RENDERFX_PULSE_SLOW, 
    1.55 +	RENDERFX_PULSE_FAST, 
    1.56 +	RENDERFX_PULSE_SLOW_WIDE, 
    1.57 +	RENDERFX_PULSE_FAST_WIDE, 
    1.58 +	RENDERFX_FADE_SLOW, 
    1.59 +	RENDERFX_FADE_FAST, 
    1.60 +	RENDERFX_SOLID_SLOW, 
    1.61 +	RENDERFX_SOLID_FAST, 	   
    1.62 +	RENDERFX_STROBE_SLOW, 
    1.63 +	RENDERFX_STROBE_FAST, 
    1.64 +	RENDERFX_STROBE_FASTER, 
    1.65 +	RENDERFX_FLICKER_SLOW, 
    1.66 +	RENDERFX_FLICKER_FAST,
    1.67 +	RENDERFX_NO_DISSIPATION,
    1.68 +	RENDERFX_DISTORT,			/**< Distort/scale/translate flicker */
    1.69 +	RENDERFX_HOLOGRAM,			/**< kRenderFxDistort + distance fade */
    1.70 +	RENDERFX_EXPLODE,			/**< Scale up really big! */
    1.71 +	RENDERFX_GLOWSHELL,			/**< Glowing Shell */
    1.72 +	RENDERFX_CLAMP_MIN_SCALE,	/**< Keep this sprite from getting very small (SPRITES only!) */
    1.73 +	RENDERFX_ENV_RAIN,			/**< for environmental rendermode, make rain */
    1.74 +	RENDERFX_ENV_SNOW,			/**<  "        "            "    , make snow */
    1.75 +	RENDERFX_SPOTLIGHT,			/**< TEST CODE for experimental spotlight */
    1.76 +	RENDERFX_RAGDOLL,			/**< HACKHACK: TEST CODE for signalling death of a ragdoll character */
    1.77 +	RENDERFX_PULSE_FAST_WIDER,
    1.78 +	RENDERFX_MAX
    1.79  };
    1.80  
    1.81  #define IN_ATTACK		(1 << 0)
    1.82 @@ -84,10 +129,10 @@
    1.83   * @return			Movetype, see enum above.
    1.84   * @error			Invalid entity index, or lack of mod compliance.
    1.85   */
    1.86 -stock GetEntityMovetype(entity)
    1.87 +stock MoveType:GetEntityMoveType(entity)
    1.88  {
    1.89  	new offset = GetEntSendPropOffs(entity, "movetype");
    1.90 -	return GetEntData(entity, offset, 1);
    1.91 +	return MoveType:GetEntData(entity, offset, 1);
    1.92  }
    1.93  
    1.94  /**
    1.95 @@ -98,13 +143,63 @@
    1.96   * @noreturn
    1.97   * @error			Invalid entity index, or lack of mod compliance.
    1.98   */
    1.99 -stock SetEntityMovetype(entity, mt)
   1.100 +stock SetEntityMoveType(entity, MoveType:mt)
   1.101  {
   1.102  	new offset = GetEntSendPropOffs(entity, "movetype");
   1.103  	SetEntData(entity, offset, mt, 1, true);
   1.104  }
   1.105  
   1.106  /**
   1.107 + * Gets an entity's render mode.
   1.108 + *
   1.109 + * @param entity	Entity index.
   1.110 + * @return			RenderMode value.
   1.111 + * @error			Invalid entity index, or lack of mod compliance.
   1.112 + */
   1.113 +stock RenderMode:GetEntityRenderMode(entity)
   1.114 +{
   1.115 +	return RenderMode:GetEntProp(entity, Prop_Send, "m_nRenderMode", 1);
   1.116 +}
   1.117 +
   1.118 +/**
   1.119 + * Sets an entity's render mode.
   1.120 + *
   1.121 + * @param entity	Entity index.
   1.122 + * @param mode		RenderMode value.
   1.123 + * @noreturn
   1.124 + * @error			Invalid entity index, or lack of mod compliance.
   1.125 + */
   1.126 +stock SetEntityRenderMode(entity, RenderMode:mode)
   1.127 +{
   1.128 +	SetEntProp(entity, Prop_Send, "m_nRenderMode", mode, 1);
   1.129 +}
   1.130 +
   1.131 +/**
   1.132 + * Gets an entity's render Fx.
   1.133 + *
   1.134 + * @param entity	Entity index.
   1.135 + * @return			RenderFx value.
   1.136 + * @error			Invalid entity index, or lack of mod compliance.
   1.137 + */
   1.138 +stock RenderFx:GetEntityRenderFx(entity)
   1.139 +{
   1.140 +	return RenderFx:GetEntProp(entity, Prop_Send, "m_nRenderFX", 1);
   1.141 +}
   1.142 +
   1.143 +/**
   1.144 + * Sets an entity's render Fx.
   1.145 + *
   1.146 + * @param entity	Entity index.
   1.147 + * @param fx		RenderFx value.
   1.148 + * @noreturn
   1.149 + * @error			Invalid entity index, or lack of mod compliance.
   1.150 + */
   1.151 +stock SetEntityRenderFx(entity, RenderFx:fx)
   1.152 +{
   1.153 +	SetEntProp(entity, Prop_Send, "m_nRenderFX", fx, 1);
   1.154 +}
   1.155 +
   1.156 +/**
   1.157   * Sets an entity's color.
   1.158   *
   1.159   * @param entity	Entity index
   1.160 @@ -124,6 +219,8 @@
   1.161  	SetEntData(entity, offset + 3, a, 1, true);
   1.162  }
   1.163  
   1.164 +/* GuessSDKVersion */
   1.165 +
   1.166  /**
   1.167   * Gets an entity's gravity.
   1.168   *
   1.169 @@ -175,3 +272,14 @@
   1.170  	return GetEntProp(client, Prop_Data, "m_nButtons");
   1.171  }
   1.172  
   1.173 +#pragma deprecated Case change, use MoveType version
   1.174 +stock SetEntityMovetype(entity, any:mt)
   1.175 +{
   1.176 +	SetEntityMoveType(entity, MoveType:mt);
   1.177 +}
   1.178 +
   1.179 +#pragma deprecated Case change, use MoveType version
   1.180 +stock GetEntityMovetype(entity)
   1.181 +{
   1.182 +	return _:GetEntityMoveType(entity);
   1.183 +}