look@ source forts

--------
Owner Nigredo Studios http://www.nigredostudios.com

--- On Mon, 26/10/09, Joshua Scarsbrook <jscarsbr...@gmail.com> wrote:


From: Joshua Scarsbrook <jscarsbr...@gmail.com>
Subject: Re: [hlcoders] Changing physics entities while holding them with the 
gravity gun
To: "Discussion of Half-Life Programming" <hlcoders@list.valvesoftware.com>
Received: Monday, 26 October, 2009, 2:27 PM


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




      
__________________________________________________________________________________
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to