How to find signatures ?

Please post any questions about developing your plugin here. Please use the search function before posting!
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

How to find signatures ?

Postby Tuck » Sun Dec 16, 2012 5:06 pm

how would i find the signature to execute this function:

from: "sdks\hl2sdk-csgo\game\server\client.cpp"

Code: Select all

//------------------------------------------------------------------------------
// Searches along the direction ray in steps of "step" to see if
// the entity position is passible.
// Used for putting the player in valid space when toggling off noclip mode.
//------------------------------------------------------------------------------
static int FindPassableSpace( CBaseEntity *pEntity, unsigned int mask, const Vector& direction, float step, Vector& oldorigin )
{
   int i;
   for ( i = 0; i < 100; i++ )
   {
      Vector origin = pEntity->GetAbsOrigin();
      VectorMA( origin, step, direction, origin );
      pEntity->SetAbsOrigin( origin );
      if ( TestEntityPosition( pEntity, mask ) )
      {
         VectorCopy( pEntity->GetAbsOrigin(), oldorigin );
         return 1;
      }
   }
   return 0;
}
-Tuck
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sun Dec 16, 2012 11:36 pm

Hey Tuck,

You can't get a signature of a client side method.

EDIT: Oh well, I guess I'm tired, saw client.cpp and thought it was game/client/ → :rolleyes:

I will see if I can grab it for you but actually, I'm fairly sure you can do everything it does in background using IEngineTrace.

L'In20Cible
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Mon Dec 17, 2012 3:27 am

L'In20Cible wrote:Hey Tuck,

You can't get a signature of a client side method.

EDIT: Oh well, I guess I'm tired, saw client.cpp and thought it was game/client/ → :rolleyes:

I will see if I can grab it for you but actually, I'm fairly sure you can do everything it does in background using IEngineTrace.

L'In20Cible


If you think you can make a method that does the same using IEngineTrace, i would appriciate it but i already tried and walls for some reason are returned as worldspawn and all has the location 0, 0, 0, i then though doing tracerays (alot of them) since i have no idea how to check if player is stuck or not but then i found the engine had this function and would rather use it :)
-Tuck
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Mon Dec 17, 2012 3:42 am

basicly it could be done if i knew how to do something like this:


"sdks\hl2sdk-csgo\game\server\physics_main.cpp"

Code: Select all

bool CBaseEntity::PhysicsTestEntityPosition( CBaseEntity **ppEntity /*=NULL*/ )
{
   VPROF("CBaseEntity::PhysicsTestEntityPosition");

   trace_t   trace;
   
   unsigned int mask = PhysicsSolidMaskForEntity();

   Physics_TraceEntity( this, GetAbsOrigin(), GetAbsOrigin(), mask, &trace );
   
   if ( trace.startsolid )
   {
      if ( ppEntity )
      {
         *ppEntity = trace.m_pEnt;
      }
      return true;
   }
      
   return false;
}
-Tuck
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Mon Dec 17, 2012 3:45 am

Second question though, how would i look up signatures?
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Mon Dec 17, 2012 6:11 am

Here are some threads with info on just that subject:
http://forums.eventscripts.com/viewtopic.php?p=376443#p376443
http://forums.eventscripts.com/viewtopic.php?f=125&t=45240

There are more, but I don't have time to keep searching at the moment. There are also more complex ways to look up signatures when the above methods will not work, but those get very complicated and I have only done it once with the help of ynh.

Satoon
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue Dec 18, 2012 7:00 pm

question:

"csgo\bin\server.so" i got this error:

"This file contains a non standard usage of relocations
Please send the file the input file to <support@hex-rays.com>"

I'm running a 64 bit system should i use "server_i486.so" instead ?
-Tuck
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Tue Dec 18, 2012 7:15 pm

@L'In20Cible if you could find this specfic one for me i would greatly appriciate it because i need it in a "hury" and rushing to learn, how to find signatures would be a bad idea and i would probably end up with more questions than answers

Thanks in advance
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Dec 18, 2012 10:48 pm

Can you hit OK when that error pops up? I think that is a normal error, but cannot remember. And no, you do not want to use the server_i486.so.

Satoon
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Postby Tuck » Wed Dec 19, 2012 3:42 am

satoon101 wrote:Can you hit OK when that error pops up? I think that is a normal error, but cannot remember. And no, you do not want to use the server_i486.so.

Satoon


i can do that without a problem just though that type of error where bad :)
-Tuck

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 31 guests