Re: [hlcoders] Wierd vgui screen on a weapon
Made a workaround. 1. Commented in CViewRender::DrawViewModels: viewModelSetup.zNear = view.zNearViewmodel; Note: this breaks viewmodels that weren't compiled for HL2. 2. In C_VGuiScreen::DrawModel, before g_pMatSystemSurface-DrawPanelIn3DSpace added CMatRenderContextPtr pRenderContext( materials ); pRenderContext-DepthRange( 0.0f, 0.1f ); And after DrawScreenOverlay(); added pRenderContext-DepthRange( 0.0, 1.0 ); So, a question: Is there a legit way of getting CViewSetup for C_VGuiScreen::DrawModel (so I don't have to comment that one line)? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Wierd vgui screen on a weapon
Another workaround, now with stealing CViewSetup. That's not a proper fix, but at least it works for now. So if somebody have some fresh ideas - share them please :p Note: don't use this workaround with previous one. -- 1. Add CViewSetup g_View; before void CViewRender::SetUpView(). 2. Add g_View = m_View; at the end of CViewRender::SetUpView(). 3. Before C_VGuiScreen::DrawModel add #include view_shared.h #include iviewrender.h extern CViewSetup g_View; 4. Replace code between ComputePanelToWorld(); and return 1; with this: CMatRenderContextPtr pRenderContext( materials ); pRenderContext-MatrixMode( MATERIAL_PROJECTION ); pRenderContext-PushMatrix(); CViewSetup viewModelSetup( g_View ); viewModelSetup.zNear = g_View.zNearViewmodel; viewModelSetup.zFar = g_View.zFarViewmodel; viewModelSetup.fov = g_View.fovViewmodel; render-Push3DView( viewModelSetup, 0, NULL, view-GetFrustum() ); pRenderContext-DepthRange( 0.0f, 0.1f ); g_pMatSystemSurface-DrawPanelIn3DSpace( pPanel-GetVPanel(), m_PanelToWorld, m_nPixelWidth, m_nPixelHeight, m_flWidth, m_flHeight ); // Finally, a pass to set the z buffer... DrawScreenOverlay(); pRenderContext-DepthRange( 0.0, 1.0 ); render-PopView( view-GetFrustum() ); pRenderContext-MatrixMode( MATERIAL_PROJECTION ); pRenderContext-PopMatrix(); -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Wierd vgui screen on a weapon
I remember having that problem, too, and I think the solution was to draw the vgui screen on a render target and use that render target as a texture of the model. Well, I was thinking about that too. But I was thinking about resizing screen in-game, so using RT will only be partial solution. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Wierd vgui screen on a weapon
Hi list! How's weekend going? I've got a wierd problem with vgui screen on a weapon. I first asked on a steam forums, but nobody got an idea. http://goo.gl/gaKqp So, any ideas? I'm using Orange Box sources. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] hlcoders Digest, Vol 6, Issue 5
Are you high? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Switch from third person to third person shoulder
My guess would be to remove if( m_SFRLocal.m_bAiming ) or replace it with something else. Everything else seem ok. Hi, I'm trying to have the camera switch from third person to third person shoulder when the user holds the right mouse button. here are my methods on the client and server : Shared: int buttonsChanged = m_afButtonPressed | m_afButtonReleased; if( buttonsChanged IN_ZOOM ) { if( m_nButtons IN_ZOOM ) { StartAiming(); } else if( m_SFRLocal.m_bAiming ) { StopAiming(); m_nButtons = ~IN_ZOOM; } } Client: void C_ASW_Player::StartAiming() { ASWInput()-CAM_ToThirdPersonShoulder(); m_SFRLocal.m_fTimeNextAim = gpGlobals-curtime + 0.5f; } void C_ASW_Player::StopAiming() { ASWInput()-CAM_ToThirdPerson(); m_SFRLocal.m_fTimeNextAim = gpGlobals-curtime + 0.1f; } Server: void CASW_Player::StartAiming() { StartWalking(); m_SFRLocal.m_bAiming = true; //local player data m_SFRLocal.m_fTimeNextAim = gpGlobals-curtime + 0.5f; } void CASW_Player::StopAiming() { StopWalking(); m_SFRLocal.m_bAiming = false; //local player data m_SFRLocal.m_fTimeNextAim = gpGlobals-curtime + 0.1f; } For some reasons the camera doesn't behave correctly and stays stuck in either third person or third person shoulder... ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Should I switch ASW SDK or stay with Source 2007
Meh. Just another conversation about Source SDK *not* being updated. I think I'll write typical come on, Valve!. Yeah, perfect. Come on, Valve! ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] hlcoders Digest, Vol 4, Issue 4
Go cry to your UE3 daddy. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] View model transform @ mouselook
CBaseViewModel::CalcViewModelLag Thanks. Bob I know too well, it's sway I was looking for :) -Original Message- From: Garry Newman Sent: donderdag 3 maart 2011 11:06 To: Discussion of Half-Life Programming Subject: Re: [hlcoders] View model transform @ mouselook It's called view bob and view sway. That should help you find it :) garry On Thu, Mar 3, 2011 at 9:56 AM, Maarten De Meyer maar...@off-limits.be wrote: Hi list, As a fix for a previously posted issue we seriously scaled down all our view models. As a consequence i've had to change quite a few things in code ( eg muzzle flashes, sprint bob code,...) One thing still escapes me: when turning around quickly using the mouse, the view model gets distorted. I assume this is a voluntary effect in source somewhere to make looking around more dynamic. Problem is, with the new weapon scales this deformation is way too big so I'd need to modify it, and I have no idea where in the code this effect is applied. Anyone know where to look? Maarten ___ 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 ___ 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
Re: [hlcoders] CounterStrike application...
I guess he's trying to write client-side application that'll print the amount of money to chat by key press. Plugins won't help with that until its server-side. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Gravity Gun vs The use key pick-up
Yea the MP version of the gravity gun predicts the props location on the client side which is nice and quick. Is SP version same? If not, how do I make it so? Because IMO props with physcannon or 'use' move a bit jerky when player is turning around. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Old-school motion blur on Orange box
Have a look at worldspawn.h Do you mean world.cpp and world.h? Only interesting thing there is Spawn(), but I still don't know how to clean a material/texture used in motion blur code. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Old-school motion blur on Orange box
Ok guys, I figured out alt-tab issue (that's was my mistake lol) and I have last question: How do I clean what was rendered in motion blur? I need to do that because when I load new map I see old transparent image over new one. if ( ( fNextDrawTime - gpGlobals-curtime ) 1.0f ) { fNextDrawTime = 0.0f; // need to clean motion blur stuff here return; } ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Old-school motion blur on Orange box
You can add ff_motionblur 0 to your world spawn, and then trigger it back on with a short timmer so that you start with a fresh blur. Well I'm not a mapper so I tried to switch mblur off by myself before starting new map and then switch it on - using console of course. Result? It didn't helped. Not that it's impossible to do the cleaning with triggers, but it would be nice to have easier code-based solution. Also that would give ability to clean mblur with console command. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Old-school motion blur on Orange box
when i fixed that for an ep1 mod i was working on, it took an entire re-write of the code garry posted. I dont think that would work out of the box for an ep2 mod. I can give it a try. If you don't mind of course. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Old-school motion blur on Orange box
Hey list. I implemented this article http://developer.valvesoftware.com/wiki/Adding_Motion_Blur on HL2:Ep2 code (ok, I know, but I want non-faked motion blur). But I got problems. Plenty of them. 1) VM is motion-blurred wrong. Or (if I alter code) it's not blurred at all. 2) Blurring somehow works wrong when player is close to brushes or props. 3) After I alt-tab'd the game it crashes with memory cannot be read when I try to restore it. I added some pointers checks but that didn't help. 4) Sometimes when I walk across the map and look in diffferent directions motion blur and bloom can suddenly stop working. This is completely unpredictable, but depends on some area (of coordinates and angles), which seems to stay the same between game launches. Also that thing was happening (before motion blur code) with bloom too. Any ideas on that mess? Screenshots http://img221.imageshack.us/img221/3606/screenshot1jt.jpg http://img264.imageshack.us/img264/1607/screenshot2ex.jpg http://img594.imageshack.us/img594/7408/screenshot3pd.jpg http://img408.imageshack.us/img408/1455/screenshot4w.jpg ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Is the list working right, or what.
WHY AM I UNABLE TO POST TO THIS LIST, I’M SO UPSET. ): Be cool instead. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Remember June 2006?
I think main problem is that we have more than one engine branch. As a result we have problems with mods, especially with source code. Sorry if I added nothing new in the discussion. This is my first post here btw. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders