I created entity which is placed on the air. I've got little problem because that entity doesn't have gravity. Can anyone show me what did I wrong? Thanks
Code:
int iEnt = CreateEntityByName("prop_physics_override");
if (iEnt == -1)
return;
DispatchKeyValue(iEnt, "classname", "skrzynka");
DispatchKeyValue(iEnt, "model", "models/props_crates/static_crate_40.mdl");
DispatchSpawn(iEnt);
//ActivateEntity(iEnt);
//SetEntityModel(iEnt, "models/props_crates/static_crate_40.mdl");
SetEntProp(iEnt, Prop_Send, "m_nSolidType", 2);
SetEntProp(iEnt, Prop_Data, "m_CollisionGroup", 0);
SetEntPropEnt(iEnt, Prop_Send, "m_hOwnerEntity", cId);
SetEntityMoveType(iEnt, MOVETYPE_FLYGRAVITY);
SetEntityGravity(iEnt, 0.5);
float minbounds[3] = {-16.0, -16.0, 0.0};
float maxbounds[3] = {16.0, 16.0, 16.0};
SetEntPropVector(iEnt, Prop_Send, "m_vecMins", minbounds);
SetEntPropVector(iEnt, Prop_Send, "m_vecMaxs", maxbounds);
//fPozycja[1] -= 200.0;
TeleportEntity(iEnt, fPozycja, NULL_VECTOR, NULL_VECTOR);