Raised This Month: $51 Target: $400
 12% 

TF2: Change maxium range of a sentry gun


Post New Thread Reply   
 
Thread Tools Display Modes
petomatick
Member
Join Date: Sep 2010
Old 10-16-2010 , 07:05   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #11

Quote:
Originally Posted by pheadxdll View Post
It's a hard coded value of 1100.0.
? Explain what u meant please
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-16-2010 , 08:10   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #12

Like
PHP Code:
#define TF_MAX_SENTRY_RANGE 1100 
But I think it's 1024...
__________________
FaTony is offline
petomatick
Member
Join Date: Sep 2010
Old 10-16-2010 , 08:39   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #13

and how do you change that?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
petomatick
Member
Join Date: Sep 2010
Old 10-16-2010 , 15:14   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #14

No answer?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-17-2010 , 05:58   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #15

It would need some actually coding besides a couple commands after its built, more like Get the nearest player and force it to shoot, even doing that recoil might be bad.
Mitchell is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-18-2010 , 10:39   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #16

I think you can patch a memory address.
__________________
FaTony is offline
petomatick
Member
Join Date: Sep 2010
Old 10-18-2010 , 11:49   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #17

And that you do by doing?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-18-2010 , 12:13   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #18

From a former project I was in team:
PHP Code:
    // Unprotect image - make .text and .rdata section writeable
    
BYTE pImageBase reinterpret_cast<BYTE *>(dwLoadOffset 0x400000); 
    
PIMAGE_DOS_HEADER   pDosHeader reinterpret_cast<PIMAGE_DOS_HEADER> (dwLoadOffset 0x400000);
    
PIMAGE_NT_HEADERS   pNtHeader  reinterpret_cast<PIMAGE_NT_HEADERS> (pImageBase+pDosHeader->e_lfanew);
    
PIMAGE_SECTION_HEADER pSection IMAGE_FIRST_SECTION(pNtHeader);
    
// trace ("[EXE] NtHeader contains %d sections\n", pNtHeaders->FileHeader.NumberOfSections);

    
for (int iSection 0iSection pNtHeader->FileHeader.NumberOfSections; ++iSection, ++pSection) {
        
char pszSectionName reinterpret_cast<char *>(pSection->Name);
        if (!
strcmp (pszSectionName".text") || !strcmp (pszSectionName".rdata")) {
            
DWORD dwPhysSize = (pSection->Misc.VirtualSize 4095) & ~4095;    
            
Log::Debug (L"[EXE] unprotecting section '%s': addr = 0x%08x, size = 0x%08x\n"pSection->NamepSection->VirtualAddressdwPhysSize);

            
DWORD oldProtect;
            
DWORD newProtect = (pSection->Characteristics IMAGE_SCN_MEM_EXECUTE) ? PAGE_EXECUTE_READWRITE PAGE_READWRITE;
            if (!
VirtualProtect (reinterpret_cast <VOID *>(dwLoadOffset+0x400000+pSection->VirtualAddress), dwPhysSizenewProtect, &oldProtect)) {
                
Log::Debug (L"[EXE] Virtual protect error\n");
                
ExitProcess (0);
            }
        }
    } 
That's for Windows and not written by me.

And them you look through IDA and try to find memory address you need, then do something like:
PHP Code:
DWORD SENTRY_RANGE_ADDRESS 0xDEADBEEF;
*(*
DWORD)SENTRY_RANGE_ADDRESS 10000
__________________

Last edited by FaTony; 10-18-2010 at 12:18.
FaTony is offline
petomatick
Member
Join Date: Sep 2010
Old 10-18-2010 , 12:31   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #19

WOW, ive never felt as stupid as now. I cant seem to understand a single row of that PHP Code you just posted.
What to do with it? :S
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-18-2010 , 12:37   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #20

It's C++. What you do is to learn C++, x86 assembly, NT .exe file format, IDA...
__________________
FaTony is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode