The Chromium branch has changed language.Add to require non-nil arguments for the 2nd parameter. I can't find related documentation in the change logs to explain why, since the main branch currently lets nil arguments go in and silently be ignored without error.
According to DBugR, switching the eye trace with the stacker tool check reduces the hook runtime from ~5 m/s to ~1.3 m/s. We don't need to perform eye traces when the player doesn't even have the tool selected.
I've also switched the same logic inside of the PreDrawHalos hook, though the performance difference seems to be neglible or nonexistent, but better safe than sorry.
Sometime within the last year, ents.CrateClientProp was updated to include physics and other properties. It was making the ghost stack entities bounce around and jiggle, which made it hard to precisely stack props. Using ClientsideModel restores the previous correct behavior.
Old behavior: tool always showed up as "Stacker - Improved"
New behavior: tool uses the translated tool name corresponding to the user's selected gmod_language/localify_language setting
Due to the way I had implemented ApplyNoCollide, a large number of
constraints were being created that didn't really need to be. The change
reduces the number of nocollide constraints created from a geometric
series (almost) to just N-1.
Additionally, if clients have both weld and nocollide selected, only a
single weld constraint is created because I'm now utilizing the
nocollide parameter of the weld constraint.
The reason any of this matters is that there is a limit to the number of
constraints that can be out on the server at any given moment. Once it's
hit, any further constraints will break until existings ones are removed
to free up more constraint slots. So, this change reduces the number of
constraints created and helps slow down how quickly the limit is
reached.
* Adding Bulgarian language support (start)
* Adding more translations
* Translated all the phrases into Bulgarian
* Fixing language binding and formatting
For example, with the new behavior a positive pitch will ALWAYS mean an UPWARD angle RELATIVE to the new direction. Basically, instead of rotation based on the prop's fixed directions, we rotate on the new angle depending on the user's selection. E.g., selecting "Behind" means we want to stack as if the prop's true "Behind" (i.e. -ent:Forward()) is actually it's "Front". Stacking "Up" means the prop's "Up" angle becomes it's new "Front" angle, etc.
StackerMaxPerStack has been added to allow servers to control the
maximum number of props a player can stack (independent from the
improved_stacker_max_per_stack cvar). This allows you to write your own
logic for stack sizes (e.g., you can make it team based or job based).
hook.Add( "StackerMaxPerStack", "Test", function( ply, count,
isRightClick )
-- returning a number here will determine the maximum amount of props a
player can used per stack
-- for example, to allow players in the Admin usergroup to spawn to an
infinite amount, return -1
if ( ply:IsAdmin() ) then return -1 end
end )
StackerMaxPerPlayer has been added to allow servers to control the
maximum number of Stacker entities a player can have spawned out at any
given time (independent from the improved_stacker_max_per_player cvar).
This allows you to write your own logic.
hook.Add( "StackerMaxPerPlayer", "Test", function( ply, numSpawned )
-- returning a number here will determine the total number of Stacker
entities a player can have spawned out at any given time
-- for example, this will allow players in the Admin usergroup to spawn
an infinite amount of Stacker entities, while making everyone else use
the server's improved_stacker_max_per_player setting
return ply:IsAdmin() and -1 or nil
end )
Preemptively adding FCVAR_ARCHIVE for future backward-compatibility with
the upcoming update. Archive the server settings so that when we switch
over to the new stacker_improved cvars, they will properly carry over.
Resolves the following issue when trying to save stacked entities with
the Duplicator tool:
[ERROR]
gamemodes/sandbox/entities/weapons/gmod_tool/stools/duplicator/icon.lua:182:
attempt to perform arithmetic on field 'r' (a nil value)
1. v -
gamemodes/sandbox/entities/weapons/gmod_tool/stools/duplicator/icon.lua:182
2. unknown - lua/includes/modules/hook.lua:84
Without realizing it, the name change would cause all stacker_* related cvars to be named improvedstacker_*. This probably wouldn't be a very pleasant change for users that have modified the default stacker_* cvars, since all of sudden they would lose their settings.
This commit undoes the file renamed + translation string changes.