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

[TF2] Tele-Trap Prevention


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Boonie
Member
Join Date: Aug 2015
Plugin ID:
4817
Plugin Version:
1.0.7
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevent stacking teleporters & placing teleporters under low brushes to create traps
    Old 09-15-2015 , 05:34   [TF2] Tele-Trap Prevention
    Reply With Quote #1

    This is no longer needed since the 3/28/2018 Update


    Description:
    Prevents players from stacking teleporters on top of each other on inclines.
    Fixes the minimum height and width of the teleporter so you can't build under low brushes to trap players.

    Cvars:
    anti_teletrap_version - Plugin version

    Changelog
    Attached Files
    File Type: sp Get Plugin or Get Source (antiteletrap.sp - 599 views - 3.7 KB)

    Last edited by Boonie; 03-29-2018 at 01:17.
    Boonie is offline
    Stylee32
    AlliedModders Donor
    Join Date: Nov 2014
    Old 09-16-2015 , 18:04   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #2

    Works perfectly, thanks
    Stylee32 is offline
    rengo
    Member
    Join Date: Jun 2015
    Old 09-20-2015 , 10:41   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #3

    Hello:

    Error Log:
    Quote:
    L 09/19/2015 - 197:08: SourceMod error session started
    L 09/19/2015 - 197:08: Info (map "cp_orange_cross") (file "errors_20150919.log")
    L 09/19/2015 - 197:08: [SM] Native "SetEntPropVector" reported: Entity 46 (46) is invalid
    L 09/19/2015 - 197:08: [SM] Displaying call stack trace for plugin "antiteletrap.smx":
    L 09/19/2015 - 197:08: [SM] [0] Line 90, /home/forums/content/files/2/6/2/5/8/5/148221.attach::ChangeVec()
    L 09/19/2015 - 20:13:19: Error log file session closed.
    Tanks
    rengo is offline
    Send a message via AIM to rengo
    Boonie
    Member
    Join Date: Aug 2015
    Old 09-21-2015 , 05:01   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #4

    Updated, should work now.
    Boonie is offline
    Benoist3012
    Veteran Member
    Join Date: Mar 2014
    Location: CWave::ForceFinish()
    Old 09-23-2015 , 09:52   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #5

    Another great plugin nice job!
    __________________
    Benoist3012 is offline
    Stylee32
    AlliedModders Donor
    Join Date: Nov 2014
    Old 10-07-2015 , 17:37   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #6

    Still getting this error
    Code:
    L 10/07/2015 - 19:51:04: Info (map "cp_orange_x3_fix") (file "errors_20151007.log")
    L 10/07/2015 - 19:51:04: [SM] Native "SetEntPropVector" reported: Entity 390 (390) is invalid
    L 10/07/2015 - 19:51:04: [SM] Displaying call stack trace for plugin "antiteletrap.smx":
    L 10/07/2015 - 19:51:04: [SM]   [0]  Line 95, /home/forums/content/files/2/6/2/5/8/5/148303.attach::ChangeVec()
    Stylee32 is offline
    Boonie
    Member
    Join Date: Aug 2015
    Old 10-12-2015 , 09:33   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #7

    I couldn't replicate that error for some reason, but It should be fixed.

    Last edited by Boonie; 10-12-2015 at 10:38.
    Boonie is offline
    Stylee32
    AlliedModders Donor
    Join Date: Nov 2014
    Old 10-16-2015 , 14:07   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #8

    Code:
    L 10/16/2015 - 14:07:19: SourceMod error session started
    L 10/16/2015 - 14:07:19: Info (map "cp_orange_x3_fix") (file "errors_20151016.log")
    L 10/16/2015 - 14:07:19: [SM] Native "GetEntPropEnt" reported: Entity 535 (535) is invalid
    L 10/16/2015 - 14:07:19: [SM] Displaying call stack trace for plugin "antiteletrap.smx":
    L 10/16/2015 - 14:07:19: [SM]   [0]  Line 91, /home/forums/content/files/2/6/2/5/8/5/148793.attach::ChangeVec()
    L 10/16/2015 - 14:24:13: Error log file session closed.
    L 10/16/2015 - 19:36:25: SourceMod error session started
    L 10/16/2015 - 19:36:25: Info (map "cp_orange_x3_fix") (file "errors_20151016.log")
    L 10/16/2015 - 19:36:25: [SM] Native "GetEntPropEnt" reported: Entity 173 (173) is invalid
    L 10/16/2015 - 19:36:25: [SM] Displaying call stack trace for plugin "antiteletrap.smx":
    L 10/16/2015 - 19:36:25: [SM]   [0]  Line 91, /home/forums/content/files/2/6/2/5/8/5/148793.attach::ChangeVec()
    Still getting them, do I have to change the height to fix this?
    Stylee32 is offline
    Chaosxk
    Veteran Member
    Join Date: Aug 2010
    Location: Westeros
    Old 10-16-2015 , 16:57   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #9

    Nice plugin, hope you don't mind but i went ahead to fix the errors for you.

    I used RequestFrame instead of using SDKHook and creating a 0.1 second timer.

    Also when passing in an entity through a asynchronous callback (such as timers, or frames) you will need to use EntIndexToEntRef and EntRefToEntIndex because there is a chance an entity can be destroyed (teleporter getting destroyed once it spawned) before the timer is called and another entity replacing it, thus why people are getting the stack trace errors.

    Also make sure to check IsValidEntity when passing entity reference through a timer.
    Attached Files
    File Type: sp Get Plugin or Get Source (antiteletrap.sp - 671 views - 3.6 KB)
    __________________
    Chaosxk is offline
    Boonie
    Member
    Join Date: Aug 2015
    Old 10-17-2015 , 10:17   Re: [TF2] Tele-Trap Prevention
    Reply With Quote #10

    I don't mind at all, I am still learning SP, so the more errors I make, the more I learn.
    I did not know you could use RequestFrame instead of SDKHook, that will be good to know for later.

    And I hope you don't mind, but I added your fix to OP (and gave credit).

    Quote:
    Originally Posted by Chaosxk View Post
    Nice plugin, hope you don't mind but i went ahead to fix the errors for you.

    I used RequestFrame instead of using SDKHook and creating a 0.1 second timer.

    Also when passing in an entity through a asynchronous callback (such as timers, or frames) you will need to use EntIndexToEntRef and EntRefToEntIndex because there is a chance an entity can be destroyed (teleporter getting destroyed once it spawned) before the timer is called and another entity replacing it, thus why people are getting the stack trace errors.

    Also make sure to check IsValidEntity when passing entity reference through a timer.
    Boonie 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 13:58.


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