Could be a problem with the gravity gun code and how it picks up ents.
The problem with your code is that you are not telling the gravgun 
anything has changed

On 26/10/2009 3:22 p.m., Bob Somers wrote:
> Is it possible to alter physics entities while holding them with the
> gravity gun? In my mod, when a player is holding an object, they can
> press a button that changes the model of the object they're holding.
> I've got it working using this:
>
> // change the visual model
> SetModel("path/to/new/model.mdl");
>
> // reset the vphysics model, since the size of the object may have changed
> VPhysicsDestroyObject();
> solid_t tmpSolid;
> PhysModelParseSolid(tmpSolid, this, GetModelIndex());
> VPhysicsInitNormal(SOLID_VPHYSICS, 0, false,&tmpSolid);
>
> It does indeed work, however when the VPhysics model is recreated,
> although the player still appears to be holding the object, they're
> not. As soon as they let go, the object is teleported back to lying on
> the ground where the player was standing when they changed it.
>
> Any way to fix this? Thanks.
>
> --Bob
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>    


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to