• Next Update v4 - March 2016 Update is out!
    1,930 replies, posted
[QUOTE=>>oubliette<<;50118729]Did something change to how entities are loaded? I loaded up a project I was working on before updates and files aren't loading how they did before. structure: [code] entities/entities/myentity/cl_init.lua entities/entities/myentity/shared.lua entities/entities/myentity/init.lua [/code] Before [I]cl_init[/I] and [I]init[/I] would be ran on the server and client automatically and now [I]shared[/I] and [I]init[/I] are ran automatically. Usually shared would by the two other files. What's weird is that one time I launched garrysmod and I was offline or something (my steamid was STEAM_0:0:0, happens sometimes) and it worked then but never before or after when my steamid was my steamid. Any ideas?[/QUOTE] shared.lua will only automatically load if cl_init.lua or init.lua (depending on the state) don't exist. That'll take AddCSLuaFile'd files in to account clientside, so make sure you're not missing anything.
[QUOTE=>>oubliette<<;50118729]Did something change to how entities are loaded? I loaded up a project I was working on before updates and files aren't loading how they did before. structure: [code] entities/entities/myentity/cl_init.lua entities/entities/myentity/shared.lua entities/entities/myentity/init.lua [/code] Before [I]cl_init[/I] and [I]init[/I] would be ran on the server and client automatically and now [I]shared[/I] and [I]init[/I] are ran automatically. Usually shared would by the two other files. What's weird is that one time I launched garrysmod and I was offline or something (my steamid was STEAM_0:0:0, happens sometimes) and it worked then but never before or after when my steamid was my steamid. Any ideas?[/QUOTE] I'd suggest you just switch to entities/entities/myentity.lua ( will act like shared.lua ) Most of the time one or two of those files are just (near-)empty.
[QUOTE=Willox;50118775]shared.lua will only automatically load if cl_init.lua or init.lua (depending on the state) don't exist. That'll take AddCSLuaFile'd files in to account clientside, so make sure you're not missing anything.[/QUOTE] I guess something confused it into thinking one of those didn't exist. I tried recreating it with another entity in a fresh directory and the bug didn't occur, it also didn't occur in my original directory when that one was there so I deleted the new directory and the old one works again. Pretty damn confused but it's not worth investigating.
[QUOTE=Robotboy655;50118806]I'd suggest you just switch to entities/entities/myentity.lua ( will act like shared.lua ) Most of the time one or two of those files are just (near-)empty.[/QUOTE] But using init.lua in entity will prevent this being sent to client?
How is prerelease any different than dev the few days before a release? I don't really see this new branch changing much. Im still backing my idea of rolling updates for stuff that doesn't require server restarts. Maybe even get auto updates working much like sourcemod does.
[QUOTE=YourStalker;50120186]How is prerelease any different than dev the few days before a release? I don't really see this new branch changing much. Im still backing my idea of rolling updates for stuff that doesn't require server restarts. Maybe even get auto updates working much like sourcemod does.[/QUOTE] Pre-release branch does not include all the changes Dev branch has. [QUOTE=gonzalolog;50119220]But using init.lua in entity will prevent this being sent to client?[/QUOTE] That is true, however it will still be sending cl_init.lua and or shared.lua.
Can pre-release be made another game? I'd actually use it if I could just leave my dev server on that branch and not have to download it every time I want to switch.
[QUOTE=StonedPenguin;50120925]Can pre-release be made another game? I'd actually use it if I could just leave my dev server on that branch and not have to download it every time I want to switch.[/QUOTE] I don't get your logic, what stops you from just having a server on another branch? You are not forced to switch it back and forth at all.
[QUOTE=Robotboy655;50120940]I don't get your logic, what stops you from just having a server on another branch? You are not forced to switch it back and forth at all.[/QUOTE] People prob want the ability to run both dev version gmod and regular at the same time, or it could just be the fact they don't wanna change their client constantly ?
[QUOTE=BigBadWilly;50121048]People prob want the ability to run both dev version gmod and regular at the same time, or it could just be the fact they don't wanna [B]change their client constantly[/B] ?[/QUOTE] How often do you think you need to change it?
[QUOTE=highvoltage;50121078]How often do you think you need to change it?[/QUOTE] Personally I would think once and awhile but I assume others might feel they need to change it more often or wish to do testing easier
[QUOTE=StonedPenguin;50120925]Can pre-release be made another game? I'd actually use it if I could just leave my dev server on that branch and not have to download it every time I want to switch.[/QUOTE] [QUOTE=xaviergmail;50040819] It's as simple as [code] steamcmd +login username password +force_install_dir "C:\Program Files (x86)\Steam\steamapps\common\GarrysMod_Dev" +app_update 4000 -beta dev validate +quit [/code] Besides, nowadays I find switching back and forth between the dev/main branch to not take any longer than a minute. Y'all should try it again. Once you have the beta downloaded, it appears you don't have to re-download it until another change is pushed. [/QUOTE]
Could there be done something with the fact that when you join a server that has workshop downloads, you will have those addons in your game?
[QUOTE=Author.;50126514]Could there be done something with the fact that when you join a server that has workshop downloads, you will have those addons in your game?[/QUOTE] If I remember correctly this was fixed in the dev branch
I was taking a look to garrys Twitter account and I've seen he's following @GModOfficial Twitter account. Can't we use it for any sort of gmod related announcement as development of the game or important updates?
[QUOTE=Robotboy655;50118626][url]http://steamcommunity.com/games/garrysmod/announcements/detail/888708186352713337[/url][/QUOTE] Jesus fuckin christ the comments on this are just cancer
[code] Windows no longer tries to load non-ttf fonts and crash NPCs play default footsteps menu_cleanupgmas no longer crashes with -noworkshop Weapon.GetPrintName is now shared RenderGroup of SENTs and SWEPs is now defaulted to engine default unless overridden ( instead of defaulting to RG_OPAQUE ) Added IMaterial:GetKeyValues Added Player:GetHull() Added Player:GetHullDuck() Added Entity:GetChildren() Added PANEL:OnKeyCodeReleased hook Added CRecepientFilter support for net.Send Fixed performance bottlenecks when mounting GMAs Fixed certain fonts causing game to hang when loaded Fixed PlayerButtonDown/PlayerButtonUp hooks only monitoring one key clientside Fixed timer library in menu state temporarily ceasing to work after starting a new map[/code] This is the changelist from prerelease to dev. Some of those changes are not on Dev yet, because guess what happened, OSX build server is acting up again.
When you get fonts loading from the workshop, I'll sacrifice my first-born.
[QUOTE=Britain;50139777]When you get fonts loading from the workshop, I'll sacrifice my first-born.[/QUOTE] It was already fixed. [editline]16th April 2016[/editline] In the next update. Please read the changelist before asking for things to get fixed. [url]http://wiki.garrysmod.com/changelist/prerelease/[/url]
[QUOTE=Robotboy655;50139802]It was already fixed. [editline]16th April 2016[/editline] In the next update. Please read the changelist before asking for things to get fixed. [url]http://wiki.garrysmod.com/changelist/prerelease/[/url][/QUOTE] I hope someone has a firstborn going spare cuz I sure as shit don't.
[QUOTE=Britain;50139857]I hope someone has a firstborn going spare cuz I sure as shit don't.[/QUOTE] Then don't make promises you can't keep.
I had a funny idea about adding net.WritePlayer, because when we should write player entity, we send 2 byte unsigned interger, but limit of players is 128, that's mean, that Entity(1)-Entity(129) is players, so we can send player EntIndex by using 1 byte unsigned integer.
[QUOTE=Britain;50139857]I hope someone has a firstborn going spare cuz I sure as shit don't.[/QUOTE] I know a guy who can find one for you.
[QUOTE=UnkN;50140511]I had a funny idea about adding net.WritePlayer, because when we should write player entity, we send 2 byte unsigned interger, but limit of players is 128, that's mean, that Entity(1)-Entity(129) is players, so we can send player EntIndex by using 1 byte unsigned integer.[/QUOTE] [url]https://github.com/garrynewman/garrysmod/pull/1106[/url]
[QUOTE=code_gs;50140520][URL]https://github.com/garrynewman/garrysmod/pull/1106[/URL][/QUOTE] As it seems, it isn't really liked.
I don't see why not though, it doesn't really hurt anyone. Although it really doesn't need to check that the player is a player. In fact, I don't think it should check that it's valid (and neither should WriteEntity but it's too late for that). WriteColor throws an error if it's not given a color, so I don't see why WriteEntity is allowed to silently fail.
[QUOTE=geferon;50094140]Can't be there any sort of console command to reload all the addons folders, beacouse it's annoying to create new files and restart the server for it to load, and if the server is slow it's a pain in the ass.[/QUOTE] Will this become true anyday?
[QUOTE=geferon;50141997]Will this become true anyday?[/QUOTE] Isn't it possible to refresh scripts by doing lua_openscript? Shame that's a blocked command you can't use in a Lua script [editline]16th April 2016[/editline] I guess since you said the entire addons folder you meant the models, sounds and all that as well
[QUOTE=Robotboy655;50139981]Then don't make promises you can't keep.[/QUOTE] Make firstborns instead.
[QUOTE=UnkN;50140511]I had a funny idea about adding net.WritePlayer, because when we should write player entity, we send 2 byte unsigned interger, but limit of players is 128, that's mean, that Entity(1)-Entity(129) is players, so we can send player EntIndex by using 1 byte unsigned integer.[/QUOTE] here. [lua] local max = game.MaxPlayers() local bits = max == 1 and 1 or math.ceil( math.log( max, 2 ) ) function net.WritePlayer(ply) assert(ply:IsPlayer(), "Invalid argument #1 to WritePlayer (Player expected, got "..type(ply)..".)") net.WriteUInt(ply:EntIndex()-1,bits) end function net.ReadPlayer() return Entity(net.ReadUInt(bits)+1) end [/lua] [url]https://dl.dropboxusercontent.com/u/104427432/Scripts/netPlayer.lua[/url]
Sorry, you need to Log In to post a reply to this thread.