1. This forum is ARCHIVED! Visit the new Cloud Sixteen forums, codename Eden, at https://eden.cloudsixteen.com. These forums will remain archived for a few months before being closed down, so try to encourage plugin developers to begin moving their content across to the new forums.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

Autorefresh Support Plugin

Discussion in 'Plugins' started by Mr. Meow, Sep 1, 2016.

  1. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    Hi, I made a thing.

    Download: https://www.dropbox.com/s/fj7sacpejqm6605/magic.zip?dl=0

    This plugin is designed for developers only.
    This plugin basically detours some functions that are defined in CAX externals and makes them autorefresh-friendly. It makes CW sort-of autorefreshable.
    No decrypted code was released, you may relax, Conna.

    Installation:
    Drop the plugin in ../gamemodes/clockwork/plugins NOT schema plugins.
    You may want to restart your server once after the initial setup of the plugin.

    Bugs (that only occur AFTER Auto-Reload):
    Character creation breaks after refresh
    New clients don't seem to be able to initialize. Doesn't affect already connected ones.
     
    • Like Like x 8
    • Winner Winner x 2
    Last edited: Sep 8, 2016
  2. Zig

    Zig Guest

    niiiiiicccee
     
  3. this is amazing
     
  4. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    Glad you like it. It took me 15 minutes to write, test and ship this plugin.

    But I had sort of a head start because I knew what to do.
     
  5. This plugin seems to break a convar used by the third person plugin for me... not really sure why. It just happens when I use it.

    [​IMG]

    Code:
    gamemodes/clockwork/plugins/thirdperson/plugin/cl_hooks.lua:25: attempt to index global 'CW_CONVAR_CHASECAM_SMOOTH' (a nil value)
    Unfortunate.

    EDIT: I believe it breaks all convars.

    PHP:
    -- Called when the client initializes.
    function 
    cwThirdPerson:Initialize()
        
    CW_CONVAR_THIRDPERSON Clockwork.kernel:CreateClientConVar("cwThirdPerson"0falsetrue);
        
    CW_CONVAR_CHASECAM_BOB Clockwork.kernel:CreateClientConVar("cwChaseCamBob"1truefalse);
        
    CW_CONVAR_CHASECAM_BOBSCALE Clockwork.kernel:CreateClientConVar("cwChaseCamBobScale"0.5truefalse);
        
    CW_CONVAR_CHASECAM_BACK Clockwork.kernel:CreateClientConVar("cwChaseCamBack"75truefalse);
        
    CW_CONVAR_CHASECAM_RIGHT Clockwork.kernel:CreateClientConVar("cwChaseCamRight"20truefalse);
        
    CW_CONVAR_CHASECAM_UP Clockwork.kernel:CreateClientConVar("cwChaseCamUp"5truefalse);
        
    CW_CONVAR_CHASECAM_SMOOTH Clockwork.kernel:CreateClientConVar("cwChaseCamSmooth"1truefalse);
        
    CW_CONVAR_CHASECAM_SMOOTHSCALE Clockwork.kernel:CreateClientConVar("cwChaseCamSmoothScale"0.2truefalse);
    end;
    [​IMG]

    cwThirdPerson is the only one that exists.

    EDIT2: Yeah, removing your plugin fixed the problem. If you need any more info just ask me.
     
    Last edited: Sep 2, 2016
  6. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    Well thats unfortunate.
    It didn't seem to break anything on my machine though. I ran 0.96.2 complete vanilla.
    I'll investigate.
     
  7. I was also testing it on 0.96.2
     
  8. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    Oh btw does this only occur after refresh or just like that?
     
  9. Both before and after I restarted after installing the plugin.
     
  10. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    I just tested it on my local machine and everything worked just fine. Must be something on your end.
    [​IMG]

    I've added you on steam, if you're willing - please add me so that I can help you sort this problem.
     
  11. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    I just updated the file on dropbox to fix some errors that occured with MySQL after refreshing.
    There is a bug due to CloudNet system where all of SharedVars will reset after refresh and the entire system will break. New clients will be stuck at loading screen and some variables will be reset for old clients. While I could try and detour cloudnet system, I won't, because quite honestly I don't have time or motivation to mess around with it. So you just have to work without reconnecting, and if you really need to reconnect it's better to just restart the server.
     
    • Like Like x 1
  12. Could someone explain auto-refresh to me like I'm a five year old? It sounds interesting.
     
  13. If you don't know what it is, this plugin isn't for you. It's to assist developers.
     
    • Agree Agree x 4
  14. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    While Trudeau made a very good point that if you don't know what autorefresh is then you shouldn't be using this plugin, I will explain it anyway.
    Autorefresh is basically Gmod's thing. It automatically reloads your script whenever you make changes so that you can develop and see what you made live without needing to restart your server or reconnecting.
    This plugin fixes it for Clockwork, because CloudAuthX loads some code over the air that is not written with Autorefresh in mind.
     
  15. Makes sense, also I have just only started developing with CW so maybe once I actually start making scripts this would be helpful!
     
  16. Looks like plugins re-add their settings every refresh. Not too big of a deal.

    [​IMG]
     
    • Winner Winner x 3
    • Funny Funny x 1
  17. Self explanatory?

    [​IMG]
     
  18. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    These are autorefresh bugs. Sadly I can't do anything about them without modifying the framework itself.
     
  19. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    I just released an update (main file download has been updated).
    What's new:
    - Fixed SharedVars resetting on refresh
    - Prevented CAX Externals from being reloaded on refresh (seriously, they take ridiculous time to reload sometimes).
    - Removed Herobrine

    Bugs:
    - New client are -still- unable to initialize after a refresh
    - Character creation is broken after a refresh
     
    • Funny Funny x 1
    Last edited: Sep 8, 2016
  20. Mr. Meow

    Mr. Meow will code for food Clockwork Customer

    Main download has been updated, because silly me forgot to remove an extra file that was left in after some failed experiments with netvars.
     
    • Funny Funny x 1

Previous Readers (Total: 0)