Re: [hlcoders] Is there an easy way to get an entity list client side?
Thanks - had just found it :^) I'm betting this is the basis for what I want to do - i'll just have to do my own filtering by ent name, distance from query point, etc. C_BaseEntityIterator iterator; C_BaseEntity *pEnt; while ( (pEnt = iterator.Next()) != NULL ) { pEnt-Simulate(); } Quoting Scott Loyd [EMAIL PROTECTED]: -- [ Picked text/plain from multipart/alternative ] ClientEntityList() cliententitylist.cpp/.h On 4/25/06, Tim Holt [EMAIL PROTECTED] wrote: I would like to get an entity list for a client HUD element, ideally calling something like FindEntityByClassnameWithin on the client side. The problem is, this is a server side thingey, so no luck. Any advice on a clean way to do this? The console cl_showents command seems like it would be a good code example/model, but it doesn't seem to be actually implemented anywhere in the SDK (which makes me think it's non-trivial). ___ 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
[hlcoders] Command to Dip Gun
Hi! I am trying to find the correct command to dip the gun, like when you aim at a firendly NPC. The reason is when you sprint, the gun should not be used. I am also looking to try and force holster the gun if the diping wont work. What i have done so far is In basehlcombatweapon_shared.cpp CBaseHLCombatWeapon::WeaponShouldBeLowered i have added the concommand ConVar nd_sprint_gun( nd_sprint_gun, 0, FCVAR_CHEAT ); Over in my sprint function I have done this if( pPlayer-IsSprinting() ) { static bool bNDSprint = false; if( bNDSprint ) { // Show gun // We stoped runing cvar-FindVar(nd_sprint_gun)-SetValue(0); } else { // Hide Gun // Sprint away cvar-FindVar(nd_sprint_gun)-SetValue(1); DevMsg(My gun should be lowered\n); } bNDSprint = !bNDSprint; //check if the gun is down or not if (cvar-FindVar(nd_sprint_gun)-GetInt() == 1);//is it down? else( cvar-FindVar(nd_sprint_gun)-SetValue(0));//well bing it up } Now if i use another command, like mat_fullbright - the convar works - but this convar wont drop my gun - infact i end up crashing in the lower state statment. The guns i'm working with are custom guns, all but the machinegun, that comes from hl2 - do i need to tell the modlers to add an animation event to them for the diping to occur? Any help is much wanted Thanks Adam My Website http://www.ammahls.com Lead Programer NightFall http://www.nightfallmod.net Developer of CST and ZHLT 3.0 http://www.zhlt.info Team Lead - Prime - http://www.nigredostudios.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Command to Dip Gun
-- [ Picked text/plain from multipart/alternative ] I dunno why your using a variable. In your weapon base class just use pPlayer-IsSprinting(). Tell your animators to create a start_sprint, and a idle_sprint animation; setup your code to support this. Disable attacks while sprinting (PrimaryAttack/SecondaryAttack, come to mind). *cough (nasty cold)* //also, probably best to do the following (why waste the cycles?)... ConVar nd_sprint_gun; nd_sprint_gun.GetInt(); //instead of cvar-FindVar(nd_sprint_gun) On 4/26/06, Adam amckern Mckern [EMAIL PROTECTED] wrote: Hi! I am trying to find the correct command to dip the gun, like when you aim at a firendly NPC. The reason is when you sprint, the gun should not be used. I am also looking to try and force holster the gun if the diping wont work. What i have done so far is In basehlcombatweapon_shared.cpp CBaseHLCombatWeapon::WeaponShouldBeLowered i have added the concommand ConVar nd_sprint_gun( nd_sprint_gun, 0, FCVAR_CHEAT ); Over in my sprint function I have done this if( pPlayer-IsSprinting() ) { static bool bNDSprint = false; if( bNDSprint ) { // Show gun // We stoped runing cvar-FindVar(nd_sprint_gun)-SetValue(0); } else { // Hide Gun // Sprint away cvar-FindVar(nd_sprint_gun)-SetValue(1); DevMsg(My gun should be lowered\n); } bNDSprint = !bNDSprint; //check if the gun is down or not if (cvar-FindVar(nd_sprint_gun)-GetInt() == 1);//is it down? else( cvar-FindVar(nd_sprint_gun)-SetValue(0));//well bing it up } Now if i use another command, like mat_fullbright - the convar works - but this convar wont drop my gun - infact i end up crashing in the lower state statment. The guns i'm working with are custom guns, all but the machinegun, that comes from hl2 - do i need to tell the modlers to add an animation event to them for the diping to occur? Any help is much wanted Thanks Adam My Website http://www.ammahls.com Lead Programer NightFall http://www.nightfallmod.net Developer of CST and ZHLT 3.0 http://www.zhlt.info Team Lead - Prime - http://www.nigredostudios.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ 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] Can't move when in spectator move.
-- [ Picked text/plain from multipart/alternative ] When you die you don't become a spectator. That is to say, you don't join the spectator's team. You're just dead. The whole spectator modes/menu stuff only kicks in if you're on TEAM_SPECTATOR. On 4/26/06, Nick [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I still can't understand why spectator isn't fully implimented in the sdk... On 4/25/06, Skillet [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I don't think it's a problem of the dead flags (though I have had issues working with them in the past), but simply that spectator is not fully implemented in the SDK. -- ___ 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] Command to Dip Gun
-- [ Picked text/plain from multipart/alternative ] Yes, each weapon will need the activities ACT_VM_IDLE_TO_LOWERED, ACT_VM_IDLE_LOWERED and ACT_VM_LOWERED_TO_IDLE. On 4/26/06, Scott Loyd [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I dunno why your using a variable. In your weapon base class just use pPlayer-IsSprinting(). Tell your animators to create a start_sprint, and a idle_sprint animation; setup your code to support this. Disable attacks while sprinting (PrimaryAttack/SecondaryAttack, come to mind). *cough (nasty cold)* //also, probably best to do the following (why waste the cycles?)... ConVar nd_sprint_gun; nd_sprint_gun.GetInt(); //instead of cvar-FindVar(nd_sprint_gun) On 4/26/06, Adam amckern Mckern [EMAIL PROTECTED] wrote: Hi! I am trying to find the correct command to dip the gun, like when you aim at a firendly NPC. The reason is when you sprint, the gun should not be used. I am also looking to try and force holster the gun if the diping wont work. What i have done so far is In basehlcombatweapon_shared.cpp CBaseHLCombatWeapon::WeaponShouldBeLowered i have added the concommand ConVar nd_sprint_gun( nd_sprint_gun, 0, FCVAR_CHEAT ); Over in my sprint function I have done this if( pPlayer-IsSprinting() ) { static bool bNDSprint = false; if( bNDSprint ) { // Show gun // We stoped runing cvar-FindVar(nd_sprint_gun)-SetValue(0); } else { // Hide Gun // Sprint away cvar-FindVar(nd_sprint_gun)-SetValue(1); DevMsg(My gun should be lowered\n); } bNDSprint = !bNDSprint; //check if the gun is down or not if (cvar-FindVar(nd_sprint_gun)-GetInt() == 1);//is it down? else( cvar-FindVar(nd_sprint_gun)-SetValue(0));//well bing it up } Now if i use another command, like mat_fullbright - the convar works - but this convar wont drop my gun - infact i end up crashing in the lower state statment. The guns i'm working with are custom guns, all but the machinegun, that comes from hl2 - do i need to tell the modlers to add an animation event to them for the diping to occur? Any help is much wanted Thanks Adam My Website http://www.ammahls.com Lead Programer NightFall http://www.nightfallmod.net Developer of CST and ZHLT 3.0 http://www.zhlt.info Team Lead - Prime - http://www.nigredostudios.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ 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 -- Programmer for RnL www.resistanceandliberation.com -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] engine-ClientCommand() Usage?
-- [ Picked text/plain from multipart/alternative ] I have an Item_Barrel, that when the Player uses it, I want it to toggle my Barrel Panel via a consol command ToggleBarrelPanel. What i want to know, is howdo I use engine-ClientCommand(); It asks for an edict_t which I do not know what that is. I tried creating my own function in CBasePlayer called GetEdict() but it didn't work, kicked me out of the game saying NUM_BAD_EDICT. Any help would be good. Thanks -Kramer -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] [OT] GameExpertMaster
I don't wish to start a flame war of any kind. This has just been bugging me for quite a while, and I'm not sure whether to laugh or cry about it. rant Please. If you're a gameexpertmaster, stop with the nub questions! In all honesty, I don't mind the questions, just the mindset that goes with that e-mail address. Hell, _I_ ask dumb questions all the time. /rant Thanks. John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Crash in release mode only AND Changing the viewports
On 4/26/06, ChromeAngel [EMAIL PROTECTED] wrote: Subject: Re: [hlcoders] Crash in release mode only AND Changing the viewports scheme Reply-To: hlcoders@list.valvesoftware.com ChromeAngel wrote: 2 Issues, I doubt they are related : Issue 1) I've got my HL2DM mod running sweet and lovely and i'm about ready to send it out to my testers, so I compiled in in release mode, only to find it causes a crash in HL2.exe when I spawn on my listen server. How should I go about finding the cause of this crash? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/vcrefgz(catchrelease-builderrorsindebugbuild).asp -- Jorge Vino Rodrigue Issue 1) Cheers for the URL Vino. By adding the /GZ parameter to my debug compile I did manage to catch and fix a bug that was not otherwise happening in debug builds. However, it still does not reproduce the crash bug I get in release mode, even after full rebuilds. Any more suggestions? Try this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_turn_on_generation_of_debug_information_for_the_release_build.asp -- Jeff Fearn Postmodernism: Once more without feeling. -- Geoffrey Nunberg ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
-- [ Picked text/plain from multipart/alternative ] H Where in (GameExpertMaster) did you get Master of the Source SDK? Who the hell cares if I ask Nub Questions? I ask things of which I do not know. I help others if I know the question just as I should. Im sorry if I wasn't born with a perfect knowledge of the SDK like yourself. I have no mindset, I know im not an amazing coder, I am good, but not all to familiar with the Source SDK, just because you know the answer to the question, and may have learned it along time ago, doesn't mean it is a NUB question. You answer the question, and get on with your life. Hell, you shouldn't care if I asked what an SDK was. You should just answer politely, thats what I would do. I can ask all the nub questions I want, the point of the coders list is to help people with CODING WITH THE SDK. I looked up and down the Valve Developer Page for an answer to my questions before I even post here. If I don't find it there, I email the HlCodersList, I don't just email every random noob question. -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
-- [ Picked text/plain from multipart/alternative ] I agree. If someone has a question, they have the right to ask it no matter how nub it sounds. Everyone started somewhere. Whats in an email address anyway? On 4/26/06, Michael Kramer [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] H Where in (GameExpertMaster) did you get Master of the Source SDK? Who the hell cares if I ask Nub Questions? I ask things of which I do not know. I help others if I know the question just as I should. Im sorry if I wasn't born with a perfect knowledge of the SDK like yourself. I have no mindset, I know im not an amazing coder, I am good, but not all to familiar with the Source SDK, just because you know the answer to the question, and may have learned it along time ago, doesn't mean it is a NUB question. You answer the question, and get on with your life. Hell, you shouldn't care if I asked what an SDK was. You should just answer politely, thats what I would do. I can ask all the nub questions I want, the point of the coders list is to help people with CODING WITH THE SDK. I looked up and down the Valve Developer Page for an answer to my questions before I even post here. If I don't find it there, I email the HlCodersList, I don't just email every random noob question. -- ___ 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] [OT] GameExpertMaster
-- [ Picked text/plain from multipart/alternative ] Yeah, I feel like I have asked some dumb questions here. I am under no illusions that I am some master coder here, I feel most of the people who work with the SDK are either college students or University students just starting to get their degrees. I feel my asking questions will also help future people who have troubles with the same things I do when they search this archive for an answer, and the question probably gets people thinking aswell. (and Alfred is sometimes so horrified with how I coded something he will write out a best use guideline ;)) have a little patientce with us, we do try and find stuff and work it out for ourselves, and when we fail we ask you guys. Heck maybe the next batch of people working on the SDK that need help maybe I'll be able to answer their question with the knowledge gained from you guys helping us out. On 4/27/06, Nick [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I agree. If someone has a question, they have the right to ask it no matter how nub it sounds. Everyone started somewhere. Whats in an email address anyway? On 4/26/06, Michael Kramer [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] H Where in (GameExpertMaster) did you get Master of the Source SDK? Who the hell cares if I ask Nub Questions? I ask things of which I do not know. I help others if I know the question just as I should. Im sorry if I wasn't born with a perfect knowledge of the SDK like yourself. I have no mindset, I know im not an amazing coder, I am good, but not all to familiar with the Source SDK, just because you know the answer to the question, and may have learned it along time ago, doesn't mean it is a NUB question. You answer the question, and get on with your life. Hell, you shouldn't care if I asked what an SDK was. You should just answer politely, thats what I would do. I can ask all the nub questions I want, the point of the coders list is to help people with CODING WITH THE SDK. I looked up and down the Valve Developer Page for an answer to my questions before I even post here. If I don't find it there, I email the HlCodersList, I don't just email every random noob question. -- ___ 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 -- - Benjamin Davison -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
Whomever started to flame this guy for his email is a complete tool, how do you draw the conclusion that his email relates directly to the source sdk, what if it means pong? _ Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
-- [ Picked text/plain from multipart/alternative ] It was in no way a flame attempt...he just wanted to get out what he thought You can leave this topic alone now -- ts2do -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
Out of all the offtopic things coming to my inbox, some guy hassling someone else about his email is the last thing I want from hlcoders, I think he should have kept that noise to himself, or emails the guy personally, there's no reason to have posted it here unless he was trying to make the guy feel uncomfortable which in my books is flaming. But anyway, You can leave this topic alone now. From: Aaron Schiff [EMAIL PROTECTED] Reply-To: hlcoders@list.valvesoftware.com To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] [OT] GameExpertMaster Date: Wed, 26 Apr 2006 21:17:50 -0500 -- [ Picked text/plain from multipart/alternative ] It was in no way a flame attempt...he just wanted to get out what he thought You can leave this topic alone now -- ts2do -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _ Take advantage of powerful junk e-mail filters built on patented Microsoft® SmartScreen Technology. http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] [OT] GameExpertMaster
I thought it was rather ironic that gameexpertmaster was asking these kinds of questions; that is all. /me sighs In any case, I realize that my response was inappropriate and I will apologize for it. I'll keep it to myself next time. John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] engine-ClientCommand() Usage?
You'll notice from public/edict.h that the edict_t is the engine's internal representation of an entity. Basically, the ClientCommand() call is asking for which entity to masquerade the command has having come from. dlls/point_devshot_camera.cpp:113 has a very clear example of this command's usage: engine-ClientCommand( pPlayer-edict(), developer 0 ); ** On a related note, it would be good to search the source yourself for examples of how to use commands like this before asking. (That's how I came up with this particular example.) You'll always run the risk of dredging up those SOBs that don't like answering nub questions if you don't. John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
RE: [hlcoders] Crash in release mode only AND Changing the viewports
The most common cause of crashes in release mode but not in debug are due to variable initializations. In debug mode all variables are initialized to '0', while in release mode they do not have a default initialization value. The most common cause of these crashes is failing to properly initialize variables. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Fearn Sent: Wednesday, April 26, 2006 7:09 PM To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Crash in release mode only AND Changing the viewports On 4/26/06, ChromeAngel [EMAIL PROTECTED] wrote: Subject: Re: [hlcoders] Crash in release mode only AND Changing the viewports scheme Reply-To: hlcoders@list.valvesoftware.com ChromeAngel wrote: 2 Issues, I doubt they are related : Issue 1) I've got my HL2DM mod running sweet and lovely and i'm about ready to send it out to my testers, so I compiled in in release mode, only to find it causes a crash in HL2.exe when I spawn on my listen server. How should I go about finding the cause of this crash? http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/ht ml/vcrefgz(catchrelease-builderrorsindebugbuild).asp -- Jorge Vino Rodrigue Issue 1) Cheers for the URL Vino. By adding the /GZ parameter to my debug compile I did manage to catch and fix a bug that was not otherwise happening in debug builds. However, it still does not reproduce the crash bug I get in release mode, even after full rebuilds. Any more suggestions? Try this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html /_core_turn_on_generation_of_debug_information_for_the_release_build.asp -- Jeff Fearn Postmodernism: Once more without feeling. -- Geoffrey Nunberg ___ 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