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-18-2010 , 14:06   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #21

Wait, there is this one mod named Repair Node. And i just edited it to have something like 5000000000 range. Isnt it possible to make like a sentry to replace the orginal sentry with?
The mod is like you write !nodeon and the next dispenser you build will be a node repairing your other buildings instead of yourself. Then you should be able to make it build a sentry with modified range when you type !example?

EDIT: And its possible to force the players to use the mod by some simple command already so actually the !example command wont be needed.
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 10-18-2010 , 15:35   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #22

The range is plugin based for repair node. For sentrys it's a hardcoded value of 1100.0 in server.dll/.so. Look at CObjectSentrygun::Range and you'll see it. At windows you can look for "dd 1100.0" and you'll find it.
Code:
.text:00905BE2                 fld     ds:(flt_B6DF00 - 0DDBFF4h)[ebx]
Code:
.rodata:00B6DF00 flt_B6DF00      dd 1100.0               ;


NOTE:
This range is also used by bots.
It's also used to award an achievement at CObjectSentrygun::Killed.


So the a good way to increase the range of a sentry is detouring CObjectSentrygun::Range.

Last edited by Sammy-ROCK!; 10-18-2010 at 15:41.
Sammy-ROCK! is offline
petomatick
Member
Join Date: Sep 2010
Old 10-18-2010 , 17:00   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #23

Quote:
Originally Posted by Sammy-ROCK! View Post
The range is plugin based for repair node. For sentrys it's a hardcoded value of 1100.0 in server.dll/.so. Look at CObjectSentrygun::Range and you'll see it. At windows you can look for "dd 1100.0" and you'll find it.
Code:
.text:00905BE2                 fld     ds:(flt_B6DF00 - 0DDBFF4h)[ebx]
Code:
.rodata:00B6DF00 flt_B6DF00      dd 1100.0               ;


NOTE:
This range is also used by bots.
It's also used to award an achievement at CObjectSentrygun::Killed.


So the a good way to increase the range of a sentry is detouring CObjectSentrygun::Range.
Well i tried to deassamble the .dll file but the program failed.
Could anyone that knows this stuff just open the file, search the command, edit the range to 99999999999999 and make it a .dll file again please?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 10-18-2010 , 23:29   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #24

Look for hex editors. Also you gotta find the address in the dll to edit it :-) The addresses I posted are on server.so (linux).
Sammy-ROCK! is offline
petomatick
Member
Join Date: Sep 2010
Old 10-20-2010 , 16:47   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #25

Quote:
Originally Posted by Sammy-ROCK! View Post
Look for hex editors. Also you gotta find the address in the dll to edit it :-) The addresses I posted are on server.so (linux).
XVI32 just showed alot of numbers. But no code. What to do?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
FaTony
Veteran Member
Join Date: Aug 2008
Old 10-20-2010 , 21:20   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #26

Sammy gave you a Linux address, I guess.
__________________
FaTony is offline
petomatick
Member
Join Date: Sep 2010
Old 10-21-2010 , 01:49   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #27

Yeah, but the file should atleast have a alphabetical letter? Its just about a million rows of numbers. I have a strong feeling of that i did something wrong.
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
petomatick
Member
Join Date: Sep 2010
Old 10-27-2010 , 16:20   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #28

Anyone?
__________________
Your destiny lies within the true power of pancakes.
petomatick is offline
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 10-27-2010 , 21:11   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #29

That function is not a Virtual Function so it's not listed in CTFPlayer functions. It also has no strings in the function so it's harder to track. Your best shot is finding a function linked to that one somehow which there's a string or it's a virtual function or track down the 1100.0 float in windows which when I tried had confusing results.
Sammy-ROCK! is offline
petomatick
Member
Join Date: Sep 2010
Old 10-31-2010 , 19:51   Re: TF2: Change maxium range of a sentry gun
Reply With Quote #30

Saw a crappy-server that gave sentries double range (forgot the server name though). So it shouldnt be too hard.
__________________
Your destiny lies within the true power of pancakes.
petomatick 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 12:58.


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