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

[TF2] Increase Demoman Pipe Bomb's Detonation Time?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Splerp
Junior Member
Join Date: May 2013
Old 09-13-2014 , 10:49   [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #1

Hello again,

I'm trying to create a Demoman's pipe bomb for pyros to airblast around. Everything is working fine, but is there a way to change how quickly the grenade explodes? I was hoping to either "reset" the countdown for detonation when it gets airblasted, or just disable detonation until it hits the ground (where it would immediately explode).

Is it also possible to make the grenade "spin" when it gets spawned (Like when the grenade launcher shoots one; see here at 00:30 for what I mean)?

As usual, thanks for any help you can provide.


Spawning method (condensed code, so might not be completely accurate)
Spoiler

Last edited by Splerp; 09-13-2014 at 10:49.
Splerp is offline
floube
SourceMod Donor
Join Date: Jan 2013
Location: Austria
Old 09-13-2014 , 18:17   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #2

Have you tried to set m_flDetonateTime?

I guess, rotation would work by setting the pipes angles every frame probably.
__________________
floube is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-13-2014 , 18:22   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #3

Gross, you could set it's angular rotation...
Probably requires an sdkcall though.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Splerp
Junior Member
Join Date: May 2013
Old 09-13-2014 , 19:58   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #4

Quote:
Originally Posted by floube View Post
Have you tried to set m_flDetonateTime?

I guess, rotation would work by setting the pipes angles every frame probably.
I tried just now and it didn't have any effect. Here's another thread where someone else had the same problem: https://forums.alliedmods.net/showthread.php?t=175889
I might change the angles every frame if I can't find another solution.

Quote:
Originally Posted by friagram View Post
Gross, you could set it's angular rotation...
Probably requires an sdkcall though.
There's a "m_vecAngVelocity" data property for tf_projectile_pipe, but setting it didn't seem to have any effect.

Looking in the datamaps dump file, there's one entry that looks like this:
Code:
- CBaseGrenadeTumbleThink (FunctionTable)(0 Bytes)
Will I need to follow through this process to be able to use it? (Finding Virtual Offsets)

Last edited by Splerp; 09-13-2014 at 19:59. Reason: typo
Splerp is offline
Splerp
Junior Member
Join Date: May 2013
Old 09-21-2014 , 04:09   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #5

Hi everyone,

I've been trying to work out how to increase the pipebomb detonation time but have had no luck so far. I blundered through DHooks, finding offsets, and signature scanning but I'm feeling completely lost. Is anyone able to point me in the right direction?


I used the method outlined here (and here) and found some functions that looked promising:
PHP Code:
CTFWeaponBaseGrenadeProj::SetDetonateTimerLength(float)
CTFWeaponBaseGrenadeProj::ShouldNotDetonate(void)
CTFGrenadeLauncher::ResetDetonateTime(void
But none of them link to a vtable, so normal offsets can't be used? Is there another way I can access them?
Splerp is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 09-21-2014 , 13:31   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #6

Quote:
Originally Posted by Splerp View Post
Hi everyone,

I've been trying to work out how to increase the pipebomb detonation time but have had no luck so far. I blundered through DHooks, finding offsets, and signature scanning but I'm feeling completely lost. Is anyone able to point me in the right direction?


I used the method outlined here (and here) and found some functions that looked promising:
PHP Code:
CTFWeaponBaseGrenadeProj::SetDetonateTimerLength(float)
CTFWeaponBaseGrenadeProj::ShouldNotDetonate(void)
CTFGrenadeLauncher::ResetDetonateTime(void
But none of them link to a vtable, so normal offsets can't be used? Is there another way I can access them?
I think you would need an extension to detour the calls... IDK
__________________
WildCard65 is offline
Splerp
Junior Member
Join Date: May 2013
Old 12-03-2014 , 22:55   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #7

Hi again, sorry for reviving an old thread but since it's related to the same problem I thought I'd bring this one up again.

This past week I've reattempted this and have been trying to create an extension (using Asherkin's Dodgeball extension and cutting it back) which sets the pipebomb detonation time limit using SetDetonateTimerLength(). The problem I think I'm having is finding the correct signature for that function - the part that looks like "\x55\x8B\xEC\x8B\x45\x08\x8D\x50\xFF\x83\xFA \x09". This is the text I have:

PHP Code:
...
"Signatures"
{
    ...
    
"SetDetonateTimerLength"
    
{
        
"library"               "server"
        "windows"               "\x01\x89\xE5\xF3\x0F\x10\x45\x0C\xF3\x0F\x58\x40\x0C\x8B\x45\x08\xF3\x0F\x11\x80\xE0\x04\x00\x00\x4D\xC3"
        "linux"                 "@_ZN24CTFWeaponBaseGrenadeProj22SetDetonateTimerLengthEf"
    
}

When I run the server (on windows), I get this error:
Code:
Sigscan for SetDetonateTimerLength failed - Disabling detour to prevent crashes
Does anyone know how I can get the correct signature for this function, or if that error means I've done something wrong elsewhere? I've tried following this process: https://wiki.alliedmods.net/Signature_scanning but got super lost.

Are there any places I can go for more information about creating extensions in general aside from this page?
Splerp is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 12-04-2014 , 06:37   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #8

Why not just use sticky arm time bonus and make it -1 so it will be longer to arm
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 12-04-2014 , 09:23   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #9

Quote:
Originally Posted by Michalplyoutube View Post
Why not just use sticky arm time bonus and make it -1 so it will be longer to arm
There is: sticky arm time penalty
__________________
WildCard65 is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 12-04-2014 , 10:21   Re: [TF2] Increase Demoman Pipe Bomb's Detonation Time?
Reply With Quote #10

You may want to try something I created for DoD:S.
As far as I know you can prevent grenades from detonating using something like that.
Code:
#include <sdkhooks> public OnEntityCreated(entity, const String:classname[]) {     // When molotov in CS:GO have been thrown     if (StrEqual(classname, "molotov_projectile", false))     {         // You wont deal with molotov projectile after its just created         CreateTimer(0.1, Timer_OnMolotovCreated, EntIndexToEntRef(entity), TIMER_FLAG_NO_MAPCHANGE)     } } public Action:Timer_OnMolotovCreated(Handle:timer, any:ref) {     // Why timer? Because entity may be created but not spawned yet     new molotov  = EntRefToEntIndex(ref)     if (molotov != INVALID_ENT_REFERENCE)     {         // Set think to -1 to prevent molotov from exploding in air         SetEntProp(molotov, Prop_Data, "m_nNextThinkTick", -1)     } } ... public MyFunc() {     // I think setting NextThinkTick wont do anything, but let it be     SetEntProp(molotov, Prop_Data, "m_nNextThinkTick", 1)     // When you 'damage' its projectile, its exploding!     // forums.alliedmods.net/showthread.php?p=1985693#post1985693     SetEntProp(molotov, Prop_Data, "m_takedamage", 2)     SetEntProp(molotov, Prop_Data, "m_iHealth", 1)     SDKHooks_TakeDamage(molotov, 0, 0, 1.0) }
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot

Last edited by Root_; 12-04-2014 at 10:23.
Root_ 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 08:29.


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