AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Homing Rocket v2.4.0.9 (13.12.12) (https://forums.alliedmods.net/showthread.php?t=129816)

Leonardo 06-17-2010 05:55

[TF2] Homing Rocket v2.4.0.9 (13.12.12)
 
4 Attachment(s)
WARNING!
This plugin could change
THE RULES

What is it?
Point your rockets to the point you are aiming at.
How it looks like?

http://files.xpenia.org/sourcemod/tf2hr/screenshot1.jpg
Required:
SDKHooks 1.3+
How to use?
Just click Attack2 button while holding rocket launcher
or click Reload key while holding wrangler
or type !togglehoming in chat / sm_togglehoming in console!
CVars & CMDs:
PHP Code:

sm_hr_enable 1 // Enable (1) or Disable (0) Plugin
sm_hr_debug 0 // Enable (1) or Disable (0) Debug Mode
sm_hr_accuracy 1 // Homing accuracy (0-10)
sm_hr_adminflag "" // Admins Flag for access; make it empty to turn off.
sm_hr_forcehoming 1 // Force homing on (2) or not (0). 1 allows players to choose.
sm_hr_showaim 1 // Show (1) dot on aim or not (0).
sm_hr_launchers "" // allow specific launchers. definition ID's.
sm_hr_lifetime 10 // Rockets' life time. 0 or less - unlimited/disabled.
sm_hr_lifetimemode 1 // Lifetime limit for 1 - homing rockets, 0 - all rockets.
// sentry update
sm_hr_sshowaim 1
sm_hr_saccuracy 3
sm_hr_sforcehoming 1  
// Force homing on (1) or not (0).
sm_hr_mode 3 // Homing for rockets only (1); for sentry rockets only (2); both (3); noone (0);
sm_hr_mvm_disabler 1 // Disable plugin for BLU team (MvM mode)
// commands
sm_togglehoming // toggle personal homing status (no args) 

Credits:
Original plugin by RIKUSYO.
Links:
Changelog: http://files.xpenia.org/sourcemod/tf2hr/

j0sh77 06-17-2010 12:03

Re: [TF2] Homing Rocket
 
I don't get exactly what it does... Do you select a target and shoot? Or does it follow the cross like in HL2?

Leonardo 06-17-2010 13:25

Re: [TF2] Homing Rocket
 
it follow the cross like in HL2

Afronanny 06-17-2010 15:44

Re: [TF2] Homing Rocket
 
Fun idea, but a better way to code this would be with the Think hook with SDKHooks rather than doing all this expensive code in OnGameFrame. SDKHooks would be much quicker and would use far less resources (you don't need all these timers and an array of tries for each player). I've done homing rockets in SourcePawn using SDKHooks, it works wonders. The reason I suggest that you use SDKHooks is because tries have excellent lookup times, but can become sluggish when adding more keys to them.

If you want an example of decent tracking code, take a look at TFDodgeball's tracking code. The only thing you'll have to compensate for is the CBaseEntity::FVisible function, because there's no way to pass a NULL double pointer CBaseEntity into a SDKCall from sourcepawn as of now, but a TraceRay can be used to make up for that (I think KAC has some decent visibility-checking code in the anti-wallhack module :D)

Also, instead of setting the angles and velocity with SetEntPropVector, take a look at TeleportEntity


That is all.

Sam-1-14 06-17-2010 17:01

Re: [TF2] Homing Rocket
 
if someone makes a gunship, I will be very very happy!!!!!

j0sh77 06-17-2010 18:09

Re: [TF2] Homing Rocket
 
For future updates, could you add an admin flag for this? So only admins can do it?

retsam 06-18-2010 00:11

Re: [TF2] Homing Rocket
 
Im not sure how well this works but, there have been private plugins that do this for a while using that sidewinder extension. :p As Afronanny said, using ongameframe for something like this is expensive.

Just a thought for you. Nice job though.

Leonardo 06-18-2010 01:43

Re: [TF2] Homing Rocket
 
it works? it works. so, all good :D

ps: cvar adminOnly added.

pps: hmm. gunship? O.o

ppps: video added

shustas 06-18-2010 17:44

Re: [TF2] Homing Rocket
 
a chance it works on css too?

msleeper 06-18-2010 18:50

Re: [TF2] Homing Rocket
 
Quote:

Originally Posted by shustas (Post 1212854)
a chance it works on css too?

I didn't realize they added a rocket launcher to CS:S.


All times are GMT -4. The time now is 15:20.

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