mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
fixed stocks using Entvars* to use entity*
This commit is contained in:
parent
2112d0935f
commit
6522feebe9
@ -12,6 +12,7 @@
|
|||||||
#define _engine_stocks_included
|
#define _engine_stocks_included
|
||||||
|
|
||||||
/* Changes an integer vec to a floating vec */
|
/* Changes an integer vec to a floating vec */
|
||||||
|
|
||||||
stock IVecFVec(IVec[3], Float:FVec[3])
|
stock IVecFVec(IVec[3], Float:FVec[3])
|
||||||
{
|
{
|
||||||
FVec[0] = float(IVec[0])
|
FVec[0] = float(IVec[0])
|
||||||
@ -143,14 +144,14 @@ stock user_silentkill(index)
|
|||||||
/* Set endering of an entity */
|
/* Set endering of an entity */
|
||||||
stock set_rendering(index,fx=kRenderFxNone, r=255,g=255,b=255, render=kRenderNormal,amount=16)
|
stock set_rendering(index,fx=kRenderFxNone, r=255,g=255,b=255, render=kRenderNormal,amount=16)
|
||||||
{
|
{
|
||||||
Entvars_Set_Int(index,EV_INT_renderfx,fx)
|
entity_set_int(index,EV_INT_renderfx,fx)
|
||||||
new Float:RenderColor[3]
|
new Float:RenderColor[3]
|
||||||
RenderColor[0] = float(r)
|
RenderColor[0] = float(r)
|
||||||
RenderColor[1] = float(g)
|
RenderColor[1] = float(g)
|
||||||
RenderColor[2] = float(b)
|
RenderColor[2] = float(b)
|
||||||
Entvars_Set_Vector(index,EV_VEC_rendercolor,RenderColor)
|
entity_set_vector(index,EV_VEC_rendercolor,RenderColor)
|
||||||
Entvars_Set_Int(index,EV_INT_rendermode,render)
|
entity_set_int(index,EV_INT_rendermode,render)
|
||||||
Entvars_Set_Float(index,EV_FL_renderamt,float(amount))
|
entity_set_float(index,EV_FL_renderamt,float(amount))
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
@ -158,7 +159,7 @@ stock set_rendering(index,fx=kRenderFxNone, r=255,g=255,b=255, render=kRenderNor
|
|||||||
/* Set flags on an entity */
|
/* Set flags on an entity */
|
||||||
stock set_entity_flags(ent,flag,onoff)
|
stock set_entity_flags(ent,flag,onoff)
|
||||||
{
|
{
|
||||||
if ((Entvars_Get_Int(ent,EV_INT_flags)&flag) > 0)
|
if ((entity_get_int(ent,EV_INT_flags)&flag) > 0)
|
||||||
{
|
{
|
||||||
if (onoff == 1)
|
if (onoff == 1)
|
||||||
{
|
{
|
||||||
@ -166,7 +167,7 @@ stock set_entity_flags(ent,flag,onoff)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Entvars_Set_Int(ent,EV_INT_flags,Entvars_Get_Int(ent,EV_INT_flags)-flag)
|
entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)-flag)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,7 +179,7 @@ stock set_entity_flags(ent,flag,onoff)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Entvars_Set_Int(ent,EV_INT_flags,Entvars_Get_Int(ent,EV_INT_flags)+flag)
|
entity_set_int(ent,EV_INT_flags,entity_get_int(ent,EV_INT_flags)+flag)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user