[hlcoders] PostMessage()
Having some issues with PostMessage(). Application crashes with complaint about calling a pure virtual function; I think it's localized to the message system because (1) the crash does not occur when the PostMessage(...) call is commented, and (2) a breakpoint set on the recipient function never triggers. Relevant code: * The PostMessage(...) call: (yeah, I know, it's ugly) PostMessage( (Panel *)(gViewPortInterface-FindPanelByName( PANEL_BASE )), new KeyValues( SetShowPanel, panel, PANEL_CLASS ) ); * The message handler declared: (in the header file of recipient object) MESSAGE_FUNC_CHARPTR( SetShowPanel, SetShowPanel, panel ); * A section of relevant code from the implementation: static char *m_szPanelNames[] = { PANEL_CLASS }; void CBaseMenu::SetShowPanel( const char *panel ) { for ( int i = 0; i sizeof( m_szPanelNames ); i++ ) { if ( Q_strcmp( panel, m_szPanelNames[i] ) ) // No match PostMessage( (Panel *)(gViewPortInterface-FindPanelByName (m_szPanelNames[i] )), new KeyValues( SetShade, state, 0 ) ); else PostMessage( (Panel *) (gViewPortInterface-FindPanelByName( m_szPanelNames[i] )), new KeyValues ( SetShade, state, 1 ) ); } } --- Please excuse the poor formatting. Any obvious problems with the code? Thanks. -- I think poem that never as a I shall see a lovely as binary tree ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Creating a sprite on the client
I tried asking this on the collective forums, with no luck so far, so I thought I would try here to :) I am trying to create a sprite, in a client entity class, and it's not going to well. In the class declaration I have this C_Sprite m_GlowSprite; In the constructor this m_GlowSprite.Clear(); and in Spawn() this m_GlowSprite.SetScale(100.0f); m_GlowSprite.SetModel( ORB_GLOW_SPRITE ); m_GlowSprite.SetAbsOrigin( GetAbsOrigin() ); m_GlowSprite.SetRenderMode( kRenderTransAdd ); m_GlowSprite.m_nRenderFX= kRenderFxNone; m_GlowSprite.SetRenderColor( 255, 255, 255, 255 ); m_GlowSprite.SetBrightness( 255 ); m_GlowSprite.TurnOn(); Does'nt seem to be showing anything, can anyone see if I am doing anything blatantly wrong from this code? The only thing near to an example I found was in c_plasma.cpp. cheers! Ian Warwick Software Engineer Tel: 023 8062 6555 Fax: 023 8062 6556 Web: http://www.fusionpeople.com This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error you are on notice of its status. Please notify us immediately by return email if you are not the intended recipient and delete this message. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of FusionPeople Ltd. FusionPeople Ltd may monitor outgoing and incoming emails and other telecommunications on its email and telecommunication systems. === This message has been checked for all known viruses by MessageLabs, The service does not scan any password protected or encrypted attachments. FusionPeople Ltd accepts no liability for any damage caused by any virus transmitted by this email. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
He meant GCC, not your entire distro. On 7/13/05, Nick [EMAIL PROTECTED] wrote: On 7/13/05, Alfred Reynolds [EMAIL PROTECTED] wrote: 4.0 has not been tested, you should use the 3.4.x series. - Alfred - i will try to install fedora core 3 tonight and see how that works ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- I am at the point where coffee just makes my teeth vibrate. - Tycho, Penny-Arcade.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
er...I realized you probably realized that. Don't mind me, I'm really tired. On 7/14/05, Zach Brockway [EMAIL PROTECTED] wrote: He meant GCC, not your entire distro. On 7/13/05, Nick [EMAIL PROTECTED] wrote: On 7/13/05, Alfred Reynolds [EMAIL PROTECTED] wrote: 4.0 has not been tested, you should use the 3.4.x series. - Alfred - i will try to install fedora core 3 tonight and see how that works ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- I am at the point where coffee just makes my teeth vibrate. - Tycho, Penny-Arcade.com -- I am at the point where coffee just makes my teeth vibrate. - Tycho, Penny-Arcade.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
Zack: In order to get the right version of GCC as well as everything it depends upon, it's easier for him to just install an older Fedora Core. I'm pretty sure he set up Fedora Core 4 just for building Source on Linux, so it's not like he's going to lose anything but a little time. At 02:23 AM 7/14/2005, you wrote: He meant GCC, not your entire distro. On 7/13/05, Nick [EMAIL PROTECTED] wrote: On 7/13/05, Alfred Reynolds [EMAIL PROTECTED] wrote: 4.0 has not been tested, you should use the 3.4.x series. - Alfred - i will try to install fedora core 3 tonight and see how that works Michael A. Hobson email: [EMAIL PROTECTED] (310) 344-3585 (cell) ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
-- [ Picked text/plain from multipart/alternative ] I wish there was an easy way to install that XML parser, I'm a god damn linux nub. Does anybody know another distrubution that dosent need 4 discs to install, which can build source? On 7/14/05, Michael A. Hobson [EMAIL PROTECTED] wrote: Zack: In order to get the right version of GCC as well as everything it depends upon, it's easier for him to just install an older Fedora Core. I'm pretty sure he set up Fedora Core 4 just for building Source on Linux, so it's not like he's going to lose anything but a little time. At 02:23 AM 7/14/2005, you wrote: He meant GCC, not your entire distro. On 7/13/05, Nick [EMAIL PROTECTED] wrote: On 7/13/05, Alfred Reynolds [EMAIL PROTECTED] wrote: 4.0 has not been tested, you should use the 3.4.x series. - Alfred - i will try to install fedora core 3 tonight and see how that works Michael A. Hobson email: [EMAIL PROTECTED] (310) 344-3585 (cell) ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- - Ben Davison - http://www.shadow-phoenix.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
On 7/14/05, Ben Davison [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I wish there was an easy way to install that XML parser, I'm a god damn linux nub. I'm loosing track of who is who here ... are you using Fedora? Googling for 'XML Parser rpm' first link http://dag.wieers.com/packages/perl-XML-Parser/ Follow the instructions on the link below to add that repo to your yum config so you can use yum to get any deps for you. That is, after follwing those instructions 'yum install perl-XML-Parser' will install the parser and any dependencies. http://dag.wieers.com/home-made/apt/FAQ.php#B Jeff ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
-- [ Picked text/plain from multipart/alternative ] If I could kiss you I would ;) On 7/14/05, Jeff Fearn [EMAIL PROTECTED] wrote: On 7/14/05, Ben Davison [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I wish there was an easy way to install that XML parser, I'm a god damn linux nub. I'm loosing track of who is who here ... are you using Fedora? Googling for 'XML Parser rpm' first link http://dag.wieers.com/packages/perl-XML-Parser/ Follow the instructions on the link below to add that repo to your yum config so you can use yum to get any deps for you. That is, after follwing those instructions 'yum install perl-XML-Parser' will install the parser and any dependencies. http://dag.wieers.com/home-made/apt/FAQ.php#B Jeff ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- - Ben Davison - http://www.shadow-phoenix.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] UserMessages
I'm having some trouble passing an integer to my user message function. Right before the map loads, it gives an Assert Failed and then crashes. int i = 6; CSingleUserRecipientFilter user( this ); user.MakeReliable(); UserMessageBegin( user, TestMessage ); WRITE_BYTE( i ); MessageEnd(); Which is in the CHL2_Player::UpdateClientData function, right under where it sends the Damage message. In hl2_usermessages.cpp: usermessages-Register( TestMessage, -1); And in my HUDHealth: DECLARE_HUD_MESSAGE(CHudHealth, TestMessage); void CHudHealth::MsgFunc_TestMessage( bf_read msg ) { Msg(TestMessage was given to HudHealth); } -- Kamran A Get Firefox! Safer, Faster, Better. http://www.spreadfirefox.com/?q=affiliatesid=0t=85 Down with Internet Explorer! Say NO! to Spyware! Use Firefox ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] UserMessages
Disregard... you have to make sure to: HOOK_HUD_MESSAGE(CHudHealth, TestMessage) In the Init() function. :) Kamran wrote: I'm having some trouble passing an integer to my user message function. Right before the map loads, it gives an Assert Failed and then crashes. int i = 6; CSingleUserRecipientFilter user( this ); user.MakeReliable(); UserMessageBegin( user, TestMessage ); WRITE_BYTE( i ); MessageEnd(); Which is in the CHL2_Player::UpdateClientData function, right under where it sends the Damage message. In hl2_usermessages.cpp: usermessages-Register( TestMessage, -1); And in my HUDHealth: DECLARE_HUD_MESSAGE(CHudHealth, TestMessage); void CHudHealth::MsgFunc_TestMessage( bf_read msg ) { Msg(TestMessage was given to HudHealth); } -- Kamran A Get Firefox! Safer, Faster, Better. http://www.spreadfirefox.com/?q=affiliatesid=0t=85 Down with Internet Explorer! Say NO! to Spyware! Use Firefox ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders -- Kamran A Get Firefox! Safer, Faster, Better. http://www.spreadfirefox.com/?q=affiliatesid=0t=85 Down with Internet Explorer! Say NO! to Spyware! Use Firefox ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Re: [hlcoders] help with ../dlls/./entityoutpu t.h:126: error: ‘Vector’ is not a template type
I don't know how to fix this, but I would recommend you using Fedora Core 3 (or a 3.4.x version of gcc), which works fine for me. On 7/13/05, Nick [EMAIL PROTECTED] wrote: $ make if [ -z /usr/bin/gcc ]; then echo Compiler not defined.; exit; fi if [ ! -d . ];then mkdir .;fi cd . if [ ! -f tier0_i486.so ]; then ln -s /home/nick/valve/hl2mp/bin/tier0_i486.so .; fi if [ ! -f vstdlib_i486.so ]; then ln -s /home/nick/valve/hl2mp/bin/vstdlib_i486.so .; fi ./vcpm ../dlls/hl_sdk.vcproj Valve Software - vcprojtomake.exe (Jul 12 2005) Memory leak: mempool blocks left in memory: 469 make -f Makefile.mod CC=/usr/bin/gcc CPLUS=/usr/bin/g++ CPP_LIB=/usr/lib/gcc/i386-redhat-linux/4.0.0/libstdc++.a /usr/lib/gcc/i386-redhat-linux/4.0.0/libgcc_eh.a BUILD_DIR=. BUILD_OBJ_DIR=./obj SOURCE_DIR=.. SHLIBLDFLAGS=-shared -Wl,-Map,mod_map.txt -Wl SHLIBEXT=so CLINK=/usr/bin/gcc CFLAGS=-rpath-link /home/nick/valve/hl2mp/bin/tier0_i486.so -fpermissive -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -UPROTECTED_THINGS_ENABLE LDFLAGS=-lm -ldl /home/nick/valve/hl2mp/bin/tier0_i486.so /home/nick/valve/hl2mp/bin/vstdlib_i486.so ARCH=i486 GAME_DIR=/home/nick/valve/hl2mp MOD_CONFIG=hl_ReleaseSDKWin32 NAME=sourceforts151 XERCES_INC_DIR=/home/nick/xerces-c_2_6_0-redhat_80-gcc_32/include XERCES_LIB_DIR=/home/nick/xerces-c_2_6_0-redhat_80-gcc_32/lib make[1]: Entering directory `/home/nick/src/src/linux_sdk' mkdir -p obj/sourceforts151/dlls/game_shared mkdir -p obj/sourceforts151/dlls mkdir -p obj/sourceforts151/dlls/tier1 mkdir -p obj/sourceforts151/dlls/public mkdir -p obj/sourceforts151/dlls/hl2_dll mkdir -p obj/sourceforts151/dlls/public/keyframe mkdir -p obj/sourceforts151/dlls/public/tier0 mkdir -p obj/sourceforts151/dlls/common mkdir -p obj/sourceforts151/dlls/game_shared/hl2 mkdir -p obj/sourceforts151/dlls/hl2mp_dll mkdir -p obj/sourceforts151/dlls/game_shared/hl2mp /usr/bin/g++ -w -I../dlls/../game_shared/hl2 -I../dlls/. -I../dlls/../public -I../dlls/../public/tier1 -I../dlls/../game_shared -I../dlls/../utils/common -I../dlls/../dlls -I../dlls/../../dlls -I../dlls/../dlls/hl2_dll -I../dlls/../dlls/hl2mp_dll -I../dlls/../game_shared/hl2mp -DHL2MP -DHL2_DLL -DUSES_SAVERESTORE -DNDEBUG -DGAME_DLL -Dsprintf=use_Q_snprintf_instead_of_sprintf -DVECTOR -Dstrncpy=use_Q_strncpy_instead -D_snprintf=use_Q_snprintf_instead -DPROTECTED_THINGS_ENABLE -rpath-link /home/nick/valve/hl2mp/bin/tier0_i486.so -fpermissive -D_LINUX -DNDEBUG -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Usprintf=use_Q_snprintf_instead_of_sprintf -Ustrncpy=use_Q_strncpy_instead -UPROTECTED_THINGS_ENABLE -o obj/sourceforts151/dlls/game_shared/activitylist.o -c ../dlls/../game_shared/activitylist.cpp g++: unrecognized option '-rpath-link' ../dlls/./entityoutput.h:148: error: 'Vector' is not a template type make[1]: *** [obj/sourceforts151/dlls/game_shared/activitylist.o] Error 1 make[1]: Leaving directory `/home/nick/src/src/linux_sdk' make: *** [mod] Error 2 Can anyone help me on this?? I'm using fedora core 4, gcc 4.0, and xerces-c 2.60 binaries ___ 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
[hlcoders] Steam__106712__2005_2_20T21_6_13C79068234.mdmp
Hey guys and girls. I keep having crashing issues with my server. It creates these crash files but nothing can read them. What or how can I read what they have in them? Belcherman[BTC] Founder of the Belching Toad Clan in July of 1997 Website = www.BelchingToadClan.com Email = [EMAIL PROTECTED] Aim = Belcherman Game Servers: ArtOfWar - CounterStrike Source - 205.234.166.61:27015 NEW: CounterStrike Source [Dawn of the ZOMBIES]- 64.144.107.22 UnrealTournament 2004 [ZOMBIES walk the earth] - 64.144.107.22 Battlefield 2 - 64.144.107.22 Quake2 BTCWARS MOD - 64.144.107.22 DONATE TO THE TOADS! ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Re: [hlcoders] Steam__106712__2005_2_20T21_6_13C79068234.mdmp
Belcherman[BTC] wrote: Hey guys and girls. I keep having crashing issues with my server. It creates these crash files but nothing can read them. What or how can I read what they have in them? They are Windows minidump files. They won't help you much without the source code. http://support.microsoft.com/?kbid=315263 http://www.codeproject.com/debug/postmortemdebug_standalone1.asp -- Jeffrey botman Broome ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Killing citizens
I've created a citizen on my map, Harold. Now, I want to be able to shoot and hurt Harold if I want to... how can I do that? Do I need to create my own entity and derive it from npc_citizen or how does that work? -- Kamran A Get Firefox! Safer, Faster, Better. http://www.spreadfirefox.com/?q=affiliatesid=0t=85 Down with Internet Explorer! Say NO! to Spyware! Use Firefox ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] help with ../dlls/./entityoutput.h:126: error: 'Vector' is not a template type
On 7/14/05, Ben Davison [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] If I could kiss you I would ;) Ben had better be short for Benita! ;) Jeff ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] PostMessage()
sizeof( m_szPanelNames ) will be 4 (it's the size of a char * pointer), not 1. Try the ARRAY_SIZE() macro instead :) - Alfred Original Message From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Sheu Sent: Wednesday, July 13, 2005 11:04 PM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] PostMessage() Having some issues with PostMessage(). Application crashes with complaint about calling a pure virtual function; I think it's localized to the message system because (1) the crash does not occur when the PostMessage(...) call is commented, and (2) a breakpoint set on the recipient function never triggers. Relevant code: * The PostMessage(...) call: (yeah, I know, it's ugly) PostMessage( (Panel *)(gViewPortInterface-FindPanelByName( PANEL_BASE )), new KeyValues( SetShowPanel, panel, PANEL_CLASS ) ); * The message handler declared: (in the header file of recipient object) MESSAGE_FUNC_CHARPTR( SetShowPanel, SetShowPanel, panel ); * A section of relevant code from the implementation: static char *m_szPanelNames[] = { PANEL_CLASS }; void CBaseMenu::SetShowPanel( const char *panel ) { for ( int i = 0; i sizeof( m_szPanelNames ); i++ ) { if ( Q_strcmp( panel, m_szPanelNames[i] ) ) // No match PostMessage( (Panel *)(gViewPortInterface-FindPanelByName (m_szPanelNames[i] )), new KeyValues( SetShade, state, 0 ) ); else PostMessage( (Panel *) (gViewPortInterface-FindPanelByName( m_szPanelNames[i] )), new KeyValues ( SetShade, state, 1 ) ); } } --- Please excuse the poor formatting. Any obvious problems with the code? Thanks. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] PostMessage() - FIXED
Thanks for the reply. I've found the solution on my own. sizeof( m_szPanelNames ) will be 4 (it's the size of a char * pointer), not 1. Try the ARRAY_SIZE() macro instead :) - Alfred Yeah, I wrote a countof macro to fix this. I'll use ARRAY_SIZE() then. :) The real problem, though, was with the convoluted casting: PostMessage( (Panel *)(gViewPortInterface-FindPanelByName( PANEL_BASE )), new KeyValues( SetShowPanel, panel, PANEL_CLASS ) With a bit more wringing of hands, I found that the pointer returned by casting gViewPortInterface-FindPanelByName() into a *Panel had a different value than the viewport panel itself. So instead, I call: PostMessage( gViewPortInterface-FindPanelByName(...)-GetVPanel(), ... ) and everything's fine and dandy. Thanks anyways. -John Sheu -- I think poem that never as a I shall see a lovely as binary tree ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders