PDA

View Full Version : Code Alternative to SoundESP



P47R!CK
01-08-2010, 03:53 AM
/*
Game-Deception Property License 1.0
2005-2008 Game-Deception( www.gamedeception.net )

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR Copyright HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN REGARD TO THE SOFTWARE.

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge and publish copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.

The Software must be redistributed free of charge to third parties.
*/

void UpdateRadar(bf_read &msg)
{
if ( msg.GetNumBytesLeft() == 0 )
return;

// int iCount = 0;

do
{
int Index = msg.ReadByte();

float flCoordX = ( float ) msg.ReadSBitLong( 13 ) * 4;
float flCoordY = ( float ) msg.ReadSBitLong( 13 ) * 4;
float flCoordZ = ( float ) msg.ReadSBitLong( 13 ) * 4;
float flAngle = ( float ) msg.ReadBitAngle( 9 ); // ReadSBitLong just yaw
Update( Index, Vector( flCoordX, flCoordY, flCoordZ ), flAngle );
} while ( msg.IsOverflowed() == false );
}


Advantages over Sound ESP:
Good Range
Frequently updated
offers an angle for better prediction

K@N@VEL
01-08-2010, 03:56 AM
Nice job, I just started messing with this engine, And the sdk is so damn big been working on getting it too actually work :mad2:

mencore
01-08-2010, 05:01 AM
aVitamin used radar for FAAAAAAAAAAAAAAAAAAAAAAAAAR ESP long time ago but this is even simplier method, good job! :biggrin:

Incase you're interested, his was like this:
http://forum.mp-hacks.de/counter-strike-source-snippets-f129/cs-s-cradarplayer-t7337/

s0beit
01-08-2010, 05:22 AM
neato

K0t
01-08-2010, 09:28 AM
so you put your sound_esp into a radar? =0

P47R!CK
01-08-2010, 09:59 AM
so you put your sound_esp into a radar? =0

there are so called usermessages in the source engine which deliver information from the server to the client. this one sends info about the players location on the map.


@mencore
I've used this for while too, even before valve did the radar update. the difference between his and my method is that engine disregards some of the updates so you might get a better result from my method. His method is easier to use though, I give him that.

mencore
01-08-2010, 10:43 AM
there are so called usermessages in the source engine which deliver information from the server to the client. this one sends info about the players location on the map.


@mencore
I've used this for while too, even before valve did the radar update. the difference between his and my method is that engine disregards some of the updates so you might get a better result from my method. His method is easier to use though, I give him that.

Yeah didnt mean to" put your code down" anyway or anything, i just wanted to share that since it's related to topic :p

Hmm, with the other way i've noticed that when you're flashed, the information is not sent anymore so your ESP "timeouts" until the flash effect disappears. I assume this same thing happens your way too? I mean sending information about player origins to radar when you *shouldnt* see anything seems kinda pointless :D

Zaltekk
01-08-2010, 11:12 AM
These coordinates are sent even for players far enough away that they aren't drawn(and possibly their sounds aren't played)? Looks like a good idea.

P47R!CK
01-08-2010, 11:24 AM
Hmm, with the other way i've noticed that when you're flashed, the information is not sent anymore so your ESP "timeouts" until the flash effect disappears.

doesn't happen.

P47R!CK
01-08-2010, 11:26 AM
These coordinates are sent even for players far enough away that they aren't drawn(and possibly their sounds aren't played)? Looks like a good idea.

yeah they are. i used them in combination with sounds though to get the best result.

Zaltekk
01-08-2010, 11:38 AM
yeah they are. i used them in combination with sounds though to get the best result.

Meaning you draw both the coordinates received for the players and the coordinates from the sounds?

Casual_Hacker
01-08-2010, 11:43 AM
Meaning you draw both the coordinates received for the players and the coordinates from the sounds?

Meaning 'IF player is not dormant get coordinates from entity ELSE use less accurate sound coordinates'.
At least that's what I assume it would do.

P47R!CK
01-08-2010, 11:44 AM
Meaning you draw both the coordinates received for the players and the coordinates from the sounds?

nope I calculate an origin from the input I get.

v = s / t
meaning
velocity = distance / time.

using the velocity and delta time offset from the last update allows a very accurate prediction of the origin.

last_known_origin += ( velocity * currentime - timeoflastorigincaptured );

Zaltekk
01-08-2010, 11:48 AM
I was asking more along the lines of what Casual_Hacker was saying. I wanted to know why/how you use both the sound origins and the message origins.