Raised This Month: $32 Target: $400
 8% 

[TF2]CTFtweaks


Post New Thread Reply   
 
Thread Tools Display Modes
Author
CrancK
Senior Member
Join Date: Jan 2009
Location: Netherlands
Plugin ID:
872
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Adds several options to the ctf game mode
    Unapprover:
    Reason for Unapproving:
    Dukehacks
    Old 03-29-2009 , 04:26   [TF2]CTFtweaks
    Reply With Quote #1

    With huge thanks going out to MikeJS for finishing and tidying up my code, i present my first plugin:


    CTFtweaks


    Version: 1.1
    Description: Adds several options to the ctf game mode,
    including:

    -throwing the flag
    -return flag on touch
    -option to make the intel only captureable when your own intel is at home
    -variable intel return time
    -(and for a next version, there will be the option to change the model of the intel to a flag)

    Commands:

    throwflag : throws the flag

    CVars:

    ctft_version: shows version
    ctft_enable: enables the plugin (0:1), default: 1
    ctft_touch: enables the return on touch function (0:1), default: 1
    ctft_home: can only cap when home (0:1), default: 0
    ctft_timer: flag return timer (0:##), default: 15
    ctft_throw: enables flagthrow (0:1), default: 1
    ctft_throwspeed: flag throwing speed (0.0:##.#), default: 400.0
    ctft_dist: min distance from ground (0.0:##.#), default: 10.0
    ctft_bounce: does the flag bounce (0:1), default: 0

    Required Extension:

    Dukehacks


    edit:
    Fixed a bug causing ctft_touch not to function properly
    you can turn the cvar to 1 during the game, but if you want to turn it off, turn it to 0 before map change, and nextmap it'll be off..

    edit2: thanks to MikeJS for pointing out, the sound files are now precached (forgot, silly me)

    Update:
    -better code handling thanks to MikeJS
    Attached Files
    File Type: sp Get Plugin or Get Source (CTFtweaks.sp - 548 views - 11.3 KB)
    File Type: smx CTFtweaks.smx (10.5 KB, 528 views)

    Last edited by CrancK; 05-20-2009 at 03:29.
    CrancK is offline
    NeoDement
    Member
    Join Date: Mar 2009
    Old 03-29-2009 , 09:09   Re: [TF2]CTFtweaks
    Reply With Quote #2

    It's good, I'm grabbing it.
    __________________
    I'm not being funny but guys, I'm a bit fit, y'know?
    NeoDement is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 03-29-2009 , 10:24   Re: [TF2]CTFtweaks
    Reply With Quote #3

    Just a suggestion, an admin command to return the intel, regardless if a player is holding it or not, would be a good addition to this plugin.
    __________________
    pheadxdll is offline
    wycs
    Junior Member
    Join Date: Dec 2008
    Old 05-06-2009 , 10:41   Re: [TF2]CTFtweaks
    Reply With Quote #4

    Not sure if this is even possible, however as it is now there is a delay when you can pick up the intel after it's been thrown. Like 2-3 seconds, is it possible to reduce this to an instant pickup ?

    Also the timer doesn't seem to be working, no matter what i change it to it's always 15 seconds. I'd like to be able to set it to 0 so it doesn't return to spawn so it doesn't screw up bball maps.
    wycs is offline
    CrancK
    Senior Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 05-06-2009 , 12:04   Re: [TF2]CTFtweaks
    Reply With Quote #5

    timer doesnt work?, that's strange... it worked for me all the time though, haven't tried the updated version myself yet though, might be a bug that sneaked in, i'll check, thanks for the info on that

    as for the delay on picking up, i'll try and see what i can do about that, though i'm not sure about this being possible...

    edit: at a first glance over the code, i can't find anything that would keep it from using the changed timer, and the delay isn't coded in, as i thought it was, it's merely a by-product of having to drop the flag, just like you normally drop it, you can't instantly pick it up either (though quicker then in this case, i'll admit...), i'll keep looking and see if i can find a way around some of this...

    Last edited by CrancK; 05-06-2009 at 12:13.
    CrancK is offline
    wycs
    Junior Member
    Join Date: Dec 2008
    Old 05-07-2009 , 10:17   Re: [TF2]CTFtweaks
    Reply With Quote #6

    The delay doesn't matter much, I was only testing it by myself when i noticed that. However the delay only applies when you are picking up the intel after you throw it (how it normally works in game), so it's not a big deal.

    However I'm still trying to narrow it down but I'm getting some server crashes when using the plugin in ctf_bball2. The map has one intel that start neutral and both teams can grab it and cap it. The server doesn't crash with the plugin in normal ctf map only the single intel between two teams maps.

    The crash happens after a few minutes of play, seems to happen at random no specific in game action happening to cause it.
    wycs is offline
    CrancK
    Senior Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 05-07-2009 , 10:26   Re: [TF2]CTFtweaks
    Reply With Quote #7

    the thing i thought was the problem on bball (or any map) is if it goes outside the map it crashes :S
    meaning that pro_bball should be safe

    but it should'nt matter wether it's 1 or multiple intels (only if it'd be more then 2, then there'd be a problem )

    if you could give me an error log or something, i might be able to find out what causes it

    Last edited by CrancK; 05-07-2009 at 10:31.
    CrancK is offline
    wycs
    Junior Member
    Join Date: Dec 2008
    Old 05-08-2009 , 06:34   Re: [TF2]CTFtweaks
    Reply With Quote #8

    I'll test some more when I get the chance but I did a fresh install on another server and it still happens on bball.

    Nothing shows in the server logs it just cuts out when it crashes. Every time it happens is when the intel is thrown to a rocket jumping soldier and the server crashes just before it reaches. Will try some other maps later to see if it's just that one map but it's not happening on normal ctf maps.
    wycs is offline
    wycs
    Junior Member
    Join Date: Dec 2008
    Old 05-10-2009 , 09:11   Re: [TF2]CTFtweaks
    Reply With Quote #9

    Defiantly bball thats the problem tried two bball maps and it crashes on the both randomly. It's always just before someone receives the intel from a throw. Doesn't happen on normal ctf maps.

    Is there anything I can do to try find out whats causing it ?

    Server logs are no use as it fully crashes the server and restarts the logs just cut out when it crashes.
    wycs is offline
    CrancK
    Senior Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 05-10-2009 , 09:15   Re: [TF2]CTFtweaks
    Reply With Quote #10

    if only we knew how to reproduce it, then we'd know what's going wrong :S

    the always before someone receives the intel, is that both when a person is on the ground and when a person is in air?

    also, probably need to check wether it might be because the intel has to shift teams... thus maybe its crashing because blu picked it up.... threw it, then red picks it up.. threw it ... crash?

    i'll do some testing, but so far i haven't been able to consistently reproduce it..

    (btw it doesn't crash for you if you throw the intel outside the map?)
    CrancK 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 21:28.


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