Results 1 to 8 of 8

Thread: Ladder Swap Teams , Player forces Usekey after

  1. #1
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default Ladder Swap Teams , Player forces Usekey after

    I came across a rather weird but funny bug when just mucking around on my server

    It happens because of the ladder fix or fixes with the reborn patch, doesnt happen on stock server, also tried on both linux and windows and it affects both.
    Only occurs on reborns mike_torso.st with the ladder fixes

    How to replicate this , easy

    Join any team
    Attach yourself on ladder,
    Join opposite team

    Thats it, aslong as you dont die or round ends, your player will auto open any door
    like his USE key is forced on.

    Now i tested it further , it doesnt seem to hold it on, just keeps toggleing it , i have a mod that if you hold it down it swaps snipers, but this didnt get triggered, so i assume its not continusly holding USE down, but if you walk to any door ( or any trigger_use ) it will activate it,
    even with locked doors , it will make the sound continuosly but that only happens when the player toggles USE, and not if held down, so further proof it doesnt hold USE down , just toggles it , but continues to toggle it until player is respawned.
    Try it , locked doors only make the noise once, until triggered again , and not if held down.

    Now i know its not really an abusive bug , more a weird and wonderful one. Strange but not really harmful

    EDIT:: Meh , found the cause, its just too late here and i need sleep
    its in the reborn shipped check_team_swap.scr
    the line
    self usestuff
    if you comment it out its fine, so guys , what is the point of having it in there?? , anyway disregard the above then , lol found the cause
    Last edited by Purple Elephant1au; August 4th, 2013 at 08:22 AM.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Haha, nice job man!! Perhaps Sor or someone may know why it's in there better than I... BTW, where has Elg been and other devs??? Anyone talk to Leyok or Elg?

  3. #3
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    UPDATE:::

    Guys we might have another issue, i think the ladder fix needs a looking into , The spawn event is not being triggered after a player is on a ladder.

    To replicate

    Join Team,
    Attach Ladder
    Join Spec
    Join SAME team
    When you spawn , NO spawn event.

    and since my weapon limiter uses spawn event, it kinda sucks, means they can choose any weapon..

    EDIT::

    Guys i have managed to fix both problems i stated above, by editing the global/check_team_swap.scr

    You can use this one instead , but ill wait for someone who made it , to comment on why it was made that way lmao but anyway here
    Parts in BOLD are where i added changes

    Code:
    main local.hva:
    
        if(local.hva=="end")
        {
            self.tss = 0
            end
        }
        
        local.team = self.dmteam
        self.tss = 1
    
        while(isalive self && self.tss == 1)
        {
            waitframe
            
            if(self.dmteam != "spectator" && self.dmteam != local.team)
            {
                self usestuff
                self unattachfromladder
                self.tss = 0 /// This stops doors opening after, my guess is that they forgot to end the loop , so usestuff was still being applied. 
            }
            
    /// This is for the spawn event not triggering, 
            if(self.dmteam == "spectator")
            {
            self usestuff
            self unattachfromladder
            self.tss = 0 
            }
        }
    end
    Last edited by Purple Elephant1au; August 6th, 2013 at 03:56 AM.

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4

    Default

    Hi Purple,

    a while ago there was some confusing about landsharking from the top of a ladder.
    Elgan and Armageddon wrote a fix (statefile edit) for it to stop it.
    I've been using this fix ever since and was unable to reproduce the 'magicaly opening of doors' you
    described.
    But there is definitely some weirdness going on with the spawnevent.

    This is the thread about the shark-from-top-of-ladder fix:

    http://www.x-null.net/forums/showthr...rk!!!!!!/page7

    So that fix might also have something to do with it.

    But yes, you are right. The maker of the check_team_swap should take a look at it.
    Who made that fix anyway?
    -=With One Well Placed Blow Thorin Cleaves Your Skull=-

    http://www.twinbee.org/hob/play.php?snap=hobbit


    <KILL THORIN>
    You attack Thorin.
    But the effort is wasted. His defense is
    too strong.
    Thorin attacks -you- !!!
    With one well placed blow Thorin cleaves
    your skull.
    You are dead.
    You have mastered 0.0% of this adventure.

  5. #5
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    well the opening doors came from the check_team_swap.scr , the self usestuff was still applied in a loop and kept going until the player would respawn. ie it forgot to end the loop when fix was applied.

    Strange you cant replicate it , ill have alook at that state file fix,but since it didnt touch the check_team_swap.scr it shouldnt of changed the problem . Unless it added a end to the loop somewhere else in the statefile.
    Either way ,hopefully the changes i made above, will not affect the actual ladder fix ,but it shouldnt , and thr check_team_swap.scr is not a fix for landsharking is it? just thought it was the ladder team swap teleport glitch and/or crash. so the fix for landsharking shouldnt affect it

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  6. #6
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    Quote Originally Posted by Midnight1138 View Post
    Hi Purple,

    a while ago there was some confusing about landsharking from the top of a ladder.
    Elgan and Armageddon wrote a fix (statefile edit) for it to stop it.
    I've been using this fix ever since and was unable to reproduce the 'magicaly opening of doors' you
    described.
    But there is definitely some weirdness going on with the spawnevent.

    This is the thread about the shark-from-top-of-ladder fix:

    http://www.x-null.net/forums/showthr...rk!!!!!!/page7

    So that fix might also have something to do with it.

    But yes, you are right. The maker of the check_team_swap should take a look at it.
    Who made that fix anyway?
    I made it; More info: http://mods-r-us.net/help/Team%20swa...x%20script.htm

    The usestuff is to help detatch him from an MG42.

    The point is, if you change teams while on a ladder/ gun etc, You remain in that spot, if you remove him, he will respawn.
    A nicer/easier way to do it would be to replace this:

    Code:
    main local.hva:
    
        if(local.hva=="end")
        {
            self.tss = 0
            end
        }
        
        local.team = self.dmteam
        self.tss = 1
    
        while(isalive self && self.tss == 1)
        {
            waitframe
            
            if(self.dmteam != "spectator" && self.dmteam != local.team)
            {
                self usestuff
                self unattachfromladder 
                //self kill
            }
        }
    end
    with this:


    Code:
    main local.hva:
    
        if(local.hva=="end")
        {
            self.tss = 0
            end
        }
        
        local.team = self.dmteam
        self.tss = 1
    
        while(isalive self && self.tss == 1)
        {
            waitframe
            
            if(self.dmteam != "spectator" && self.dmteam != local.team)
            {
                self respawn
            }
        }
    end
    however, if they detatched successfully, it might make them respawn twice in succession. hence I used the usestuff , which removes them from the mg and respawns them.



    A good way to do it would be to usestuff twice, or reset state.


    oh and ive been at work, (4 weeks residentials teaching teambuilding)

  7. #7
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    The loop local.tss is probably not being executed and turned off.

    This makes me wonder...It must be thatt he reborn state files are not setup correctly, meaning that team check script is never executed to turn off the loop (which should happen on respawn etc) - check the docs..

    This is because I never had exitcommands, they don't work.
    A respawn event could be used, or can we get the actual state of the player in script now I forgot?

  8. #8
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    I see ,so maybe we should add the
    check_team_swap.scr "end"
    to the raise weapon state?

    Why didnt the loop end when the fix was applied? incase of incase it lagged and didnt apply??
    or maybe just add a check to the loop to see if the person is running or walking to end the loop.

    What about the spawn event trigger problem ,my above way seemed to fix that issue, any other way ?

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •