added entity_is_on_ground

This commit is contained in:
Johnny Bergström 2004-04-29 09:42:00 +00:00
parent 32efef099c
commit 8cb40e903e

View File

@ -132,7 +132,7 @@ stock make_deathmsg(killer,victim,headshot,weapon[])
write_byte( killer ) write_byte( killer )
write_byte( victim ) write_byte( victim )
write_byte( headshot ) write_byte( headshot )
write_string( weapon ) write_string( weapon[] )
message_end() message_end()
return 1 return 1
@ -205,12 +205,7 @@ stock get_entity_visibility(entity) {
return (entity_get_int(entity, EV_INT_effects) & EF_NODRAW) return (entity_get_int(entity, EV_INT_effects) & EF_NODRAW)
} }
stock set_user_velocity(entity, Float:vec[3]) /* Returns true if entity is on ground, else false. */
{ stock entity_is_on_ground(entity) {
return entity_set_vector(entity, EV_SZ_velocity, vec) return entity_get_int(entity, EV_INT_flags) & FL_ONGROUND
}
stock get_user_velocity(entity, Flaot:vec[3])
{
return entity_get_vector(entity, EV_SZ_velocity, vec)
} }