tjdgns9246
02-01-2012, 00:02
i want to know about velocity.
i've known that velocity is just about speed.
but i saw something confusing.
for example
stock GetEntityVelocity(entity, Float:fVelocity[3])
{
GetEntPropVector(entity, Prop_Data, "m_vecVelocity", fVelocity);
}
if i get that velocity, now i have "m_vecVelocity" of 3 dimensions, right?
and someone used this
g_iVelocity = FindSendPropOffs("CBasePlayer", "m_vecVelocity[0]");
//skipped...
new Float:vecVelocity[3];
GetEntDataVector(client, g_iVelocity, vecVelocity);
vecVelocity[2] += speed;
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vecVelocity);
as you know, code above is in jetpack.sp
and the problem is, why did he use "m_vecVelocity[0]"?
i want to know about difference between [0], [1], [2].
i think it's not like x,y,z or angles.
thanks
i've known that velocity is just about speed.
but i saw something confusing.
for example
stock GetEntityVelocity(entity, Float:fVelocity[3])
{
GetEntPropVector(entity, Prop_Data, "m_vecVelocity", fVelocity);
}
if i get that velocity, now i have "m_vecVelocity" of 3 dimensions, right?
and someone used this
g_iVelocity = FindSendPropOffs("CBasePlayer", "m_vecVelocity[0]");
//skipped...
new Float:vecVelocity[3];
GetEntDataVector(client, g_iVelocity, vecVelocity);
vecVelocity[2] += speed;
TeleportEntity(client, NULL_VECTOR, NULL_VECTOR, vecVelocity);
as you know, code above is in jetpack.sp
and the problem is, why did he use "m_vecVelocity[0]"?
i want to know about difference between [0], [1], [2].
i think it's not like x,y,z or angles.
thanks