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 > > "site" "short" // 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

