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, since it's model is set at spawn isn't it? 
Afterwards it doesn't matter if that model is changed cause it won't set 
the model AGAIN unless you tell it to do so.

Maybe you already have that but you didn't show any weapon code, just 
the baseweapon code, so I can't know if you have or haven't.

Hope that helps

Richard Slaughter wrote:
> 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 GetWpnData().szWorldModel
>
> I've also updated the weapon data class to read in a secondary world and 
> view model from the weapon scripts, and have verified by stepping 
> through the code that the alternative weapon model names are being 
> returned correctly, however the world model just doesn't change as seen 
> by others, even though this function is hit and returns a different 
> model name to the one actually being shown.
>
> I've done the same for the view model, and this seems to work fine.
>
> Any ideas if I'm missing something?
> Thanks,
>
> Rich
>   

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

Reply via email to