Re: [hlcoders] How to properly use TraceFilters?

2009-01-17 Thread Felipe G. Silveira
Looks like the normal vector trick won't work... the normal for both the ceiling and the floor are (0,0,1)... I thought the trace would hit only when entering the world.. (Actually I thought the external parts of the map would get removed by vbsp...) I done some tests with the traceline and the

[hlcoders] Changing the weapon world model during play

2009-01-17 Thread Richard Slaughter
Hi List, I'm having a problem changing a weapon's world model dynamically during play. I've altered CWeaponHL2MPBase::GetWorld model so that it does the following: if(GetHL2MPPlayerOwner() GetHL2MPPlayerOwner-ShouldShowOtherWeapon()) return GetWpnData().szAltWorldModel else return

Re: [hlcoders] Changing the weapon world model during play

2009-01-17 Thread Tony Sergi
When you go to change it, SetModel(GetWorldModel()); -Tony -Original Message- From: hlcoders-boun...@list.valvesoftware.com [mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Richard Slaughter Sent: January-17-09 8:40 AM To: Discussion of Half-Life Programming Subject:

Re: [hlcoders] Changing the weapon world model during play

2009-01-17 Thread Yorg Kuijs
Well, you say it returns the different model names correctly but shouldn't there be a think function of sorts in the actual weapon file so it will actually change it's viewmodel to the modelname returned? I mean just cause it gets the name doesn't mean the model is gonna actually be changed,

Re: [hlcoders] Changing the weapon world model during play

2009-01-17 Thread Tony Sergi
You're going to have to modify GetWorldModelIndex() so that it will return the index of your alternate model if it's supposed to. You could just inherit it and override it. And where the model is precached from the script, store the model index of your alternate model, the way it stores

Re: [hlcoders] Changing the weapon world model during play

2009-01-17 Thread Richard Slaughter
Awesome, thanks a lot Tony that did the trick! Tony Sergi wrote: You're going to have to modify GetWorldModelIndex() so that it will return the index of your alternate model if it's supposed to. You could just inherit it and override it. And where the model is precached from the script,

Re: [hlcoders] Multi-Pass Shaders?

2009-01-17 Thread Walter Gray
Well, thanks you Maarten's help, I've found the appropriate functions for changing the render target. I just have one other problem: The shader needs to know how big a pixel is texture coordinates so that it can grab the adjacent pixels and blend them. The only way I have figured out to do

Re: [hlcoders] Multi-Pass Shaders?

2009-01-17 Thread Maarten De Meyer
http://pastebin.com/m5d914966 Well, thanks you Maarten's help, I've found the appropriate functions for changing the render target. I just have one other problem: The shader needs to know how big a pixel is texture coordinates so that it can grab the adjacent pixels and blend them. The only