[hlcoders] HalfLifeTwoDev Update
To those (few) with websites linking to some of our articles. We upgraded to TikiWiki, so your URLs will need to be changed. PhpWiki was just too buggy. Just a heads up to prevent E404s. They always look bad. -- Roy Kylratix Laurie http://www.hl2-dev.com/ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] HalfLifeTwoDev Update
CNN told us it was too hot for TV, unfortunately. On 19 Mar 2005 at 22:41, Adam amckern Mckern wrote: Thanks for the update, i hope you will do a media blitz as well Adam --- Roy Laurie [EMAIL PROTECTED] wrote: To those (few) with websites linking to some of our articles. We upgraded to TikiWiki, so your URLs will need to be changed. PhpWiki was just too buggy. Just a heads up to prevent E404s. They always look bad. -- Roy Kylratix Laurie http://www.hl2-dev.com/ ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders http://ammahls.com __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ ___ 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] BUG? Server Plugins = FireGameEvent = hostage_rescued
-- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Excellent. Thank you. Hopefully it will be the former, if not just for posterity. That and the workaround is somewhat resource intensive compared to the alternative. On a similar topic, there is the a lack of a bomb_begin_plant and a hostage_stops_following. These events are, again, a matter of posterity. Current events include bomb explosion, bomb beginning defuse (which is nice), and abortion of defuse. The defusing events are excellent and I'd like to see its likeness for the Terrorist act of planting. hostage_follows makes a lot of interesting things possible on cs_ maps. Unfortunately, unless the hostage dies or is rescued, the plugin has no efficient means of learning if the hostage stopped following for some other reason. This negates the usefulness of hostage_follows, since we can not truly tell if it's following at any given time or not without an extensive and heavily resource intensive workaround, which I have not been able to devise at the moment. Thanks again, Alfred. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 0:40, Alfred Reynolds wrote: The code doesn't set anything but the userid parameter to a useful value right now. I have passed on the problem and they will look into either updating the code or amending the description. - Alfred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roy Laurie Sent: Sunday, March 13, 2005 11:07 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostageshort// hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ 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] BUG? Server Plugins = FireGameEvent = hostage_rescued
Ronny, Have you tried (from gameevents.res) round_start? -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 18:14, Ronny Schedel wrote: Some more events would be nice for CS:S: round restart game commencing Greets Ronny -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Excellent. Thank you. Hopefully it will be the former, if not just for posterity. That and the workaround is somewhat resource intensive compared to the alternative. On a similar topic, there is the a lack of a bomb_begin_plant and a hostage_stops_following. These events are, again, a matter of posterity. Current events include bomb explosion, bomb beginning defuse (which is nice), and abortion of defuse. The defusing events are excellent and I'd like to see its likeness for the Terrorist act of planting. hostage_follows makes a lot of interesting things possible on cs_ maps. Unfortunately, unless the hostage dies or is rescued, the plugin has no efficient means of learning if the hostage stopped following for some other reason. This negates the usefulness of hostage_follows, since we can not truly tell if it's following at any given time or not without an extensive and heavily resource intensive workaround, which I have not been able to devise at the moment. Thanks again, Alfred. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 0:40, Alfred Reynolds wrote: The code doesn't set anything but the userid parameter to a useful value right now. I have passed on the problem and they will look into either updating the code or amending the description. - Alfred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roy Laurie Sent: Sunday, March 13, 2005 11:07 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostage short // hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ 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 ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued
-- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body The code to figure out whether it's a game commence round or not isn't that resource intensive. A bit flag set in LevelInit and reset depending on number of players (by cycling though edicts at max of globals-maxClients) on round_start is all you need. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 20:58, Ronny Schedel wrote: round_start is every round, pretty useless. Greets Ronny Ronny, Have you tried (from gameevents.res) round_start? -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 18:14, Ronny Schedel wrote: Some more events would be nice for CS:S: round restart game commencing Greets Ronny -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Excellent. Thank you. Hopefully it will be the former, if not just for posterity. That and the workaround is somewhat resource intensive compared to the alternative. On a similar topic, there is the a lack of a bomb_begin_plant and a hostage_stops_following. These events are, again, a matter of posterity. Current events include bomb explosion, bomb beginning defuse (which is nice), and abortion of defuse. The defusing events are excellent and I'd like to see its likeness for the Terrorist act of planting. hostage_follows makes a lot of interesting things possible on cs_ maps. Unfortunately, unless the hostage dies or is rescued, the plugin has no efficient means of learning if the hostage stopped following for some other reason. This negates the usefulness of hostage_follows, since we can not truly tell if it's following at any given time or not without an extensive and heavily resource intensive workaround, which I have not been able to devise at the moment. Thanks again, Alfred. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 0:40, Alfred Reynolds wrote: The code doesn't set anything but the userid parameter to a useful value right now. I have passed on the problem and they will look into either updating the code or amending the description. - Alfred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roy Laurie Sent: Sunday, March 13, 2005 11:07 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostage short // hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ 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 ___ 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] BUG? Server Plugins = FireGameEvent = hostage_rescued
I would think that the game event system is to prevent massive wear on system resources by providing information that would have to be otherwise re-digested by writing one's own GameFrame code. The event system is certainly easier, but I think the main focus is the fact that using game events allows several plugins to be loaded simultaneously and use the same resources as maybe one plugin without such a system. While the event system is certainly easier to use, I think that it's existance is tailored more towards efficiency of server plugins overall. That being said, there are obviously many needs from the plugin development community as far as events go. The most important events needed being those which have some general use to the community --and-- would require intensive computation to find the information otherwise. For example, whatever the usefuleness, I can say that it would be extremely taxing on the server to extract player_footsteps from anywhere other than the main dll. On the other hand, while game_commence might make life easier, it doesn't significantly change the workload on the server to include such. Valve obviously being pressed, as time is money goes, I would prefer to only ask for events that are useful for whatever situation -and- cannot be handled efficiently. The likeliness of them including such over events more related to creature-comfort is obviously higher. On top of that, bogging a developer down with less demanding requests, as I have experienced many a time, tends to cause everything to get tossed up in the wind. I certainly don't want that. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com) On 14 Mar 2005 at 23:44, Ronny Schedel wrote: Come on, how is the game event system for? There are very helpful player_footsteps, but not round_restart and game_commencing. We had these events in 1.6. I dont need any workaround ideas, I need the events. Greets Ronny -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body The code to figure out whether it's a game commence round or not isn't that resource intensive. A bit flag set in LevelInit and reset depending on number of players (by cycling though edicts at max of globals-maxClients) on round_start is all you need. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 20:58, Ronny Schedel wrote: round_start is every round, pretty useless. Greets Ronny Ronny, Have you tried (from gameevents.res) round_start? -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 18:14, Ronny Schedel wrote: Some more events would be nice for CS:S: round restart game commencing Greets Ronny -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Excellent. Thank you. Hopefully it will be the former, if not just for posterity. That and the workaround is somewhat resource intensive compared to the alternative. On a similar topic, there is the a lack of a bomb_begin_plant and a hostage_stops_following. These events are, again, a matter of posterity. Current events include bomb explosion, bomb beginning defuse (which is nice), and abortion of defuse. The defusing events are excellent and I'd like to see its likeness for the Terrorist act of planting. hostage_follows makes a lot of interesting things possible on cs_ maps. Unfortunately, unless the hostage dies or is rescued, the plugin has no efficient means of learning if the hostage stopped following for some other reason. This negates the usefulness of hostage_follows, since we can not truly tell if it's following at any given time or not without an extensive and heavily resource intensive workaround, which I have not been able to devise at the moment. Thanks again, Alfred. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 14 Mar 2005 at 0:40, Alfred Reynolds wrote: The code doesn't set anything but the userid parameter to a useful value right now. I have passed on the problem and they will look into either updating the code or amending the description. - Alfred -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roy Laurie Sent: Sunday, March 13, 2005 11:07 AM To: hlcoders@list.valvesoftware.com Subject: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued -- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostage
[hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued
-- [ Picked text/plain from multipart/alternative ] Content-description: Mail message body Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostage short// hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] BUG? Server Plugins = FireGameEvent = hostage_rescued
In fact, the only value of the three that -can- be pulled from the KeyEvent is userid. The rescue site index returns 0 no matter what site it is as well. I'm developing a workaround at the moment... -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 13 Mar 2005 at 11:06, Roy Laurie wrote: Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostageshort// hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ 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] BUG? Server Plugins = FireGameEvent = hostage_rescued
Currently, I have a useable workaround. Here's my way: Dynamic array of hostages and associated interacting players (those who enact hostage_follow). Load a dynamic array of edict_t* pointing to rescue points, found by iterating the entity list at ServerActivate and looking for pEntity-GetClassName() of func_hostage_rescue. I also have an associated integer quantity of rescue points available in the map (trying to stay flexible, just in case). The same is done with the dynamic array of hostages. At LevelShutdown, I delete both arrays. At FireGameEvent for event hostage_rescue: A double for loop. First loop cycles through saved hostage entities by index, skipping to the next iteration for various reasons, including the interacting player not being the same that is rescuing, the hostage being dead or rescued already, etc. Second loop calls CalcNearestPoint (ripped from main dll source and slighly hacked to accept a parameter of ICollideable) to calculate the distance betweent he hostie and the given rescue point. The first hostie to have a 0 distance wins! There's probably a for more easy workaround, knowing my luck. However, this method seems to work perfectly. The actual source code should be released in a day or two when I release the next version of TerraStats on SourceForge. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 13 Mar 2005 at 12:06, Roy Laurie wrote: In fact, the only value of the three that -can- be pulled from the KeyEvent is userid. The rescue site index returns 0 no matter what site it is as well. I'm developing a workaround at the moment... -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) On 13 Mar 2005 at 11:06, Roy Laurie wrote: Snippet from my SRCDS's modevent.res for CS:S: hostage_rescued { userid short // player who rescued the hostage hostage short// hostage entity index siteshort // rescue site index } My plugin has been showing, to my dismay, that the hostage index constantly returns as 0. Not very helpful at all. It does work, however, with hostage_killed. -- Roy Kylratix Laurie HalfLifeTwoDev (http://www.hl2dev.com/) Sincerely, Roy Laurie -- ___ 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] BUG: plugin_pause
Operating with two plugins loaded in srcds, pause is always sent to the 0 index plugin, no matter the parameter. Can anyone verify this? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Plugin API: NetworkIDString returns UNKNOWN
Any time I call PlayerInfoManager::GetNetworkIDString() or IVEngineInterface::GetPlayerNetwordIDString(edict_t*) from ClientActivate(), I get a string with UNKOWN. This occurs not only while debugging locally, but also on my public server. The SteamID should be available in ClientActivate, no? I checked it against BeetleFart's current code and they seemed to be doing the same, but with proper results. Ideas? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Coding Guidelines
I'm putting together a general set of guidelines for mod coding. There are a few things I picked up from Quake-source coding that I think are, in any type of mod for any game, important to follow. http://hl2-dev.com/wiki/index.php?pagename=SdkCodingGuidelines If anyone would like to add to it, feel free. It's a wiki. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] Haven't recieved any emails from this list
Only 2 and 3/4ths here. =P -- Roy On 23 Dec 2004 at 14:35, Charkrid Pornpitackchaikul wrote: I recived on 3 emails..today.. From: Hasan Aljudy [EMAIL PROTECTED] Reply-To: hlcoders@list.valvesoftware.com To: hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] Haven't recieved any emails from this list Date: Wed, 22 Dec 2004 18:28:12 -0700 I recieved atleast four emails today .. I think On Wed, 22 Dec 2004 20:17:20 -0500, r00t 3:16 [EMAIL PROTECTED] wrote: I haven't recieved any emails from this list today, just want to see if spamassassin is tagging this group. r00t 3:16 CQC Gaming www.cqc-gaming.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 ___ 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] Half-Life 2 has hosed itself!
Steam puts it there durring a non-attached debug. Not sure about attached. On 21 Dec 2004 at 12:25, Maarten van der Zwaart wrote: On Mon, Dec 20, 2004 at 07:09:18PM -0800, Roy Laurie wrote: Completely shooting off of the hip, here. Try renaming or deleting your clientregistry.blob file in your hl2 directory (where hl2.exe resides). That file should not exist in the hl2 directory at all. Maarten -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? ___ 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] Finding the entity based on the userid
I'm putting together a Type Conversions list for such. Everyone's welcome to add / edit. http://hl2-dev.com/wiki/index.php?pagename=SdkTypeConversions -- Roy Kylratix Laurie On 20 Dec 2004 at 18:20, Ronny Schedel wrote: The UserID can be accessed through the IPlayerInfo and the IPlayerInfoManager interfaces. Greets Ronny This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I was just wondering how I can get an entity or an index of the entity that is fired. Meaning the player_hurt event is fired and I get a userid of 2. Will this is different than the IndexOfEdict function in engine. How can I determine the IndexOfEdict or get the pointer to the entity of a userid? Thanks, Josh -- ___ 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] Finding the entity based on the userid
In the end, I think it comes down to a simple profiling decision. The question being: Which method is more economical? If you're handling an event that happens often...like player_death, my guess is the extra 64 bits (depending on the compiler) per player might be worth the amount of function calls if you're doing it often. It'll certainly prevent sudden choppiness; replacing it with negligible(?) sluggishness. Of course, I base this on absolutely nothing as I haven't profiled the difference. -- Roy Kylratix Laurie On 20 Dec 2004 at 18:51, Marcelo Bezerra wrote: You can code the loop so it looks up both pEntities on a single pass. (You will be special casing this one to speed things up). Copy and paste from my plugin: --- for(i=1;i=maxplayers (!pVictim || !pAttacker;i++)) { edict_t *pEntity = engine-PEntityOfEntIndex(i); if(!pEntity || pEntity-IsFree()) { continue; } int this_uid = engine-GetPlayerUserId(pEntity); if(this_uid=0) { if(uid == this_uid) { pVictim = pEntity; } if(attacker == this_uid) { pAttacker = pEntity; } } } --- I am generating an attacked logline to be used on my tk prevention system :) (It runs remotely, parsing log from multiple servers) Josh wrote: Yea that's what I was thinking :( I was really hoping to not do that, as a LOT of functions will need to call that function. (I'm working on a war3 mod for CSS, just building the groundwork). So every time someone is shot / died that will be called twice. Doesn't that seem intensive? Do you think valve could create an easier way? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 2:46 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid for(int i=1;i=maxplayers;i++) { edict_t *pEntity = engine-PEntityOfEntIndex(i); if(!pEntity || pEntity-IsFree()) { continue; } int uid = engine-GetPlayerUserId(pEntity); } Josh wrote: OK all I have is the playerid (userid). How do I get a pointer to the entity having this userid? And I CANNOT use IndexOfEdict b/c that is a different number. For example, I join a game then I call the iplayerinfo on myself and find out that my userid is 2. But IndexOfEdict is 1. They are different. Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid You can look from 1 to maxplayers, get the pEntity and use: engine-GetPlayerUserId(pEntity); Loop from Josh wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I was just wondering how I can get an entity or an index of the entity that is fired. Meaning the player_hurt event is fired and I get a userid of 2. Will this is different than the IndexOfEdict function in engine. How can I determine the IndexOfEdict or get the pointer to the entity of a userid? Thanks, Josh -- ___ 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 ___ 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] This is how you get the player's origin/velocity/money/health/clip/armor using a server-plugin (Windows only)
How filthy and volatile. I love it. Thanks -- Roy Kylratix Laurie On 20 Dec 2004 at 20:36, Josh wrote: These offsets can change with steam updates. Thanks to Damaged Soul for leading me in the right direction and for money offsets :P I would imagine these offsets would be 5 off for a unix machine. I haven't gotten a compile for unix so I haven't tested it. #define OFFSET_ORIGIN_X 812 // Player Origin in X Axis #define OFFSET_ORIGIN_Y 813 // Player Origin in Y Axis #define OFFSET_ORIGIN_Z 814 // Player Origin in Z Axis #define OFFSET_VELOCITY_X 648 #define OFFSET_VELOCITY_Y 649 #define OFFSET_VELOCITY_Z 650 Vector get_user_origin(edict_t pEnt) { float fX = *((float *)pEnt-GetUnknown() + OFFSET_ORIGIN_X); float fY = *((float *)pEnt-GetUnknown() + OFFSET_ORIGIN_Y); float fZ = *((float *)pEnt-GetUnknown() + OFFSET_ORIGIN_Z); return Vector( fX, fY, fZ ); } And no you can't change the origin, well you can, but it won't register it with the engine so it will just be overwritten again. Have fun, similar function to get the velocity. Other offsets you might want to play with: (beware of setting health to 1024, weird things happen) define OFFSET_HEALTH 39 #define OFFSET_CLIP 402 #define OFFSET_ARMOR 749 // This will change the armor value on the player's screen #define OFFSET_ARMOR2 739 // This will change another offset associated with armor #define OFFSET_MONEY 863 ___ 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] Half-Life 2 has hosed itself!
Completely shooting off of the hip, here. Try renaming or deleting your clientregistry.blob file in your hl2 directory (where hl2.exe resides). -- Roy Kylratix Laurie On 20 Dec 2004 at 21:56, Skyler York wrote: As the subject suggests, this latest update really hosed over my Half-Life 2 installation. After starting Steam and receiving the new update, here's what happened: 1) Steam updates and the Play Games window opens. 2) I double-click on the Half-Life 2 icon in the Steam menu. 3) Preparing to play dialog pops up, then disappears. Cursor turns to busy hourglass. 4) A few seconds later is when Half-Life 2 *usually* starts up. However it doesn't now. Instead, the cursor just turns back into normal and nothing happens. 5) I check the process window, and there is indeed a hl2.exe running the background taking up a mere 4 kb of memory. 6) I attempt to load the Source SDK app (with hl2.exe still in the background) and get this intimidating messagebox: SteamStartup() failed: SteamStartup(0xf,0x12f69c) failed with error 1 : failed to take master pipe connection lock, Win32 Error 2 The system cannot find the file specified. 7) So I shutdown the hl2.exe process and try again. However the error persists. 8) At this point, Steam won't close normally and I have to end that process too. Shutting down Steam resets everything back to it's original state where I can reproduce the above procedure again and again, and receive the same errors. If I go to Source SDK before attempting to run HL2, then it works without problem and Steam shutdowns normally. I get the same error with HL2DM and starting up HL2 with my mod in the -game path. In other words, the problems only start if HL2 is invoked in some way. Restarting the computer didn't help. I thought it was something I did with the SDK, so I re-downloaded that, refreshed everything etc., and the error persisted. I've done everything short of re-downloading Half-Life 2. I'm thinking that somewhere along the line my Filesystem_Steam.dll or Steam.dll got messed up. Between this update and the last update, I *did* copy Filesystem_Steam.dll from half-life 2/bin to sourcesdk/bin because Hammer was complaining about not being able to find it. But that's the only subversive change I've made. All these problems seem to relate to the system, and I know that this last update changed the directory structure a bit. If you need any more information I'd be happy to provide you with it. In the meantime I will give in and re-download Half-Life 2 (all 838 megs, jeez) and see if that helps. Thank God for fast university internet connections... ___ 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] (from Plugin) Retrieving a edict_t* from UserID
I had assumed that IVGameEngine::PEntFromIndex(int) would do the trick. However, when debugging, even as the userid is currently valid, the formentioned function returns what would seem a blank entity. So two questions arise... 1) Are not the userid and engine entity index the same? 2) Most importantly, what other options are there for retrieving the associated edict_t* - without- doing the obvious and storing it for later use from whichever function might provide it. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders