-
Notifications
You must be signed in to change notification settings - Fork 1
Changelog April 21st 2023
Vuthakral edited this page Apr 21, 2023
·
1 revision
- Internal: Wrote an internal table for reference on weapon animations & holdtypes to reference instead of defining them every time a related function is called, saving on a bit of processing time.
- Internal: ^ Indexed all hardcoded weaponry Garry's Mod has & what holdtype they pull from, including weapons missed previously.
-
Internal: New lua function
DRC:GetHoldTypeAnim(lowercase holdtype, slot, isnpc)
, usage example:DRC:GetHoldTypeAnim("pistol", "attack", false)
-- Returns the appropriate activity for the context requested from a given holdtype. Slots are as follows:idle
,cidle
,walk
,cwalk
,run
,attack
,reload
,jump
, anddeploy
. Useful for systems which can just feed this info to the function instead of needing to define or dynamically pull this information. If the argisnpc
is set to true, it will instead pull the ACT for the context of a combine/rebel soldier, which only supports attack & reload. Anything undefined will return ACT_RESET, which effectively does nothing but tell the engine that an ACT was run & finished. Slots for NPCs that do not traditionally exist for the given holdype instead pull the ACT of the player-relative animation. -
Internal: Changed
DRC:CallGesture()
to use SendPVS instead of Broadcast. - Internal: Removed redundant call for weapon swapping animation leftover from old code.
- Internal: Rewrote how weapon swapping animation code runs, greatly reducing the processing cost.
- Internal: Reworked how player turning animations are calculated, reducing the processing cost & fixing consistency of turn the direction being picked.
- Internal: Stopped using WriteTable in a lot of places after being informed just how drastic of a network space waste they are.
-
Internal:
DRC:GetBaseName()
now supports/returnsarc9
. -
Internal:
DRC:Interact()
arguments changed & updated, the function is nowDRC:Interact(<player ent>, <interacted ent>, <bool> prevent movement, <bool> prevent mouse input)
. -
Internal:
DRC:Interact()
now supports preventing mouse input. -
Internal: New clientside lua function
DRC:GetCalcViewShake()
-- returns three values:shake x
,shake y
,shake roll
. Used to emulate util.ScreenShake on custom CalcView hooks. -
Internal: New lua function
DRC:DebugModeAllowed()
-- returns true/false if sv_drc_allowdebug is set to 1/0 -
Internal: New clientside lua function
DRC:DebugModeEnabled()
-- returns true/false if cl_drc_debugmode is above 0 & serverside debug is allowed. -
Internal: New clientside lua function
DRC:CubemapCheck()
-- returns true/false if the currently loaded map has any environment maps. -
Internal: New lua function
DRC:GetDRCMaterial(entity, <optional bone ID>)
-- Used to return a table of strings of generic surface material types for the kinds of materials something is made up of. Useful for creating generalized material responses without needing to define every single surface property.
- Can currently return: stone, rubble, dust, dirt, wood, snow, shards, glass, tile, flesh, synth, paint, liquid, metal, metaldrum, metalhollow, plastic, cardboard, and computer.
-
Internal: Added a check for weapon swapping animations on the gun being swapped to for
NoReadyAnimation = true/false
to allow content developers to prevent their weapons from having a swap animation play should they need it. i.e.SWEP.NoReadyAnimation = true
-
Internal
DRC:TraceDir(origin, dir, dist)
now supports a fourth arg,entity
entitytolookfor, will force the trace to collide with the given entity. -
Internal:
DRC:TraceDir(origin, dir, dist, entitytolookfor)
now uses EyePos when originating from a character entity,origin
can still be a vector. -
Internal:
DRC:EnvelopTrace(ent1, ent2)
now performs a third trace if the originating entity has aneyes
attachment. - Internal: Added a validity check to the stock crosshair replica for the DRC ToScreen value, preventing it from creating errors if CalcView is being disallowed by others addons (why would you do this to everyone else).
- Internal/Debug: New debug setting: "Cubemap fallbacks" -- Forces the Draconic Base to act as if the currently loaded map has no envmaps, forcing fallbacks & their settings to load.
- Internal: holdtype-relative camera systems in Draconic now fall back to another holdtype if the weapon the player is using is using a custom-scripted holdtype.
- Internal/Debug/Menu: When the cog menu is toggled in the playermodel preview of the Draconic Menu, a new button for "Enable Debug" has been added. This renders the model's skeleton, attachments, and hitboxes.
- Internal/Menu: Fixed "apply changes" button on servers/gamemodes where player representation was set to tweak-only or disabled entirely.
- Internal/Menu: Fixed an exploit which players found & were abusing to change their model to ones they shouldn't have access to on roleplay servers.
-
Internal/Menu: Changed how tweak-only mode works; it is no longer default on any gamemode. Setting now has functionality when set to 1, 2, or 3.
sv_drc_playerrep_tweakonly 1
allows access to update colours & bodygroups,2
allows access to only colours, and3
allows access to only bodygroups. Setsv_drc_playerrep_disallow
to1
if you want to prevent players from being able to live-update their player representation. - Menu: Updated the "Debug Information" subtab to list off a lot of common settings for both confirmation when troubleshooting with end-users, as well as providing helpful information about the related settings & recommended values.
- Menu: Condensed the credits page to be less of an eyesore, updated credits.
-
Menu/Playermodel Extensions: Added a customizable
DefaultCam
value to the playermodel preview window extension settings, enabling playermodel authors to set a custom default position/angle value for their preview. The wiki has been updated with this new setting. If unset, it will use the default preview pos/ang. - Experimental First Person: Fixed Draconic SWEP swaying.
- Experimental First Person: Added support for ARC9 weaponry.
- Experimental First Person: Made the first person body derender when the view is near centered, preventing it from being in the way of the flashlight in most scenarios.
- Experimental First Person: Made the clientside shadow entities derender when the flashlight is active to prevent them from getting in the way.
- Experimental First Person/Menu: Added a "torso depth" scale option to the client settings menu, as some playermodels look goofy while others are annoyingly in the way; so I've opted to just let players customize this.
-
Weapon Base: Changed internal functionality, Heat instead uses a variable within the weapon now. Older content which pulled this value may break and require updating. Please just use
weapon:GetHeat()
to return 0-100 like you would previously, as this will always return the information you need no matter what I change or update from here on out. -
Weapon Base: Changed internal functionality, Charge no longer uses a NWInt to save on network traffic, instead using a variable within the weapon now. Older content which pulled this value may break and require updating. Please just use
weapon:GetCharge()
to return 0-100 like you would previously. -
Weapon Base: Added
SWEP:EffectChain(<table>)
-- Usage example:
local tbl = {
["attachmentname"] = {"effectname", timedelay},
}
self:EffectChain(tbl)
-
Weapon Base: Added support to set up alternate firing animations for ADS primary attacks. Simply have an animation on your viewmodel with the activity
ACT_VM_DEPLOYED_IRON_FIRE
. -
Weapon Base: Added
SWEP.NearWallPower = 1
-- Multiplier for strength of the "near wall" viewmodel offset (0-1) -
Weapon Base: Added
SWEP.RollingPower = 1
-- Multiplier for strength of viewmodel rolling effect. (0-inf) -
Weapon Base: Added
SWEP.PerspectivePower = 1
-- Multiplier for strength of the "perspective change" viewmodel offset. (i.e. looking up & down) (0-1) -
Weapon Base: Added
SWEP:GetLoadedAmmo()
-- Returns the weapon's current ammo as an integer value. Falls back on SWEP:Clip1() if it fails to get this information. -
Weapon Base: Added optional setting
SWEP.OverheatScripted
-- Nil by default. When set to true, prevents standard overheat functionality, expecting the developer of the weapon to code their own triggers for it. -
Weapon Base: Added optional setting
SWEP.OverheatAnimations
-- Nil by default. When set to true, prevents players from showing overheat/vent holdtypes, and prevents the Extended Player Animations overheat animation from triggering. -
Weapon Base: Added internal variable
SWEP.PrimaryStats.OriginalAmmo
-- Used for reference of internal systems & for custom code. It is the ammo type the primary is assigned at creation time. -
Weapon Base: Fixed
SWEP.Secondary.UsesCharge
. - Weapon Base: Fixed oddities with VJ NPCs using Draconic weapons, everything should be normal now.
- Weapon Base: Fixed/Updated ArmourPerShot to utilize the GetMaxArmor function (it didn't exist back then).
-
Weapon Base: Tweaked how charging sounds are done. They can now be called within custom lua by pulling
self.ChargingSound
, allowing you to alter their volume, pitch, etc. -
Weapon Base: Rewrote/reworked how ammo regeneration works entirely. The new system is backwards compatible with any pre-existing setups, but may not function the exact same. The settings are now
SWEP.RegenAmmo = true/false
,SWEP.RegenAmmo_Delay = 1
,SWEP.RegenAmmo_Amount = 1
, andSWEP.RegenAmmo_Interval = 0.5
. (Default settings). Ammo regeneration will regenerate up to the maximum Clip1 size. - Weapon Base: Rewrote / Optimized the bloom aka spread system.
- Weapon Base: Removed some old code/settings that held no use.
-
Weapon Base: Added string variable
SWEP.ModifyText
-- Appears on the player's screen similar to interaction text when they are able to modify their weapon via the inspection menu, i.e. "Press to " - Attachment Base/Weapon Base: Implemented a usable UI in the inspect menu.
-
Attachment Base/Internal: New serverside convar:
sv_drc_attachments_disallowmodification
(1 or 0, default 0) -- When set to 1, prevents players from being able to modify their weapon attachments. -
Attachment Base/Internal: New serverside convar:
sv_drc_attachments_autounlock
(1 or 0, default 1) -- Whether weapon attachments should be freely-accessible (1), or be picked up / given to the player to be usable (0). -
Attachment Base/Internal: New serverside lua function:
DRC:GiveAttachment(ply, <attachment class or table of attachment classes>)
-- Use to give players specific attachments. -
Attachment Base/Internal: New serverside lua function:
DRC:HasAttachment(ply, <attachment class>)
-- Returns true/false if a player currently has a given attachment. - Attachment Base: Is now actually usable for what it was supposed to be. This currently only supports BProfiles as I want to bugtest and get feedback from other developers before going forward & implementing a whole suite.
- Attachment Base: Is now a spawnable entity, when +used by a player it will be picked up & added to their attachment inventory for that life.
- Attachment Base: Removed ENT.AttachmentType.
- Attachment Base: Added ENT.Model -- Used for attachment menu SpawnIcon previews, this allows you to simply have your attachment appear as a spawnicon, or manually overwrite/include a custom spawnicon for it.
-
Attachment Base: Added
Callback
to the bullet profile attachment type. Passes a table into its function which gives in order: the weapon, bullet traceresult, and the takedamageinfo from the shot fired. This allows developers to pass any custom lua into source bullet impacts. -
Attachment Base: Added
ProjectileOverride
to the bullet profile attachment type. If defined, will make weapons fire the specified entity when it is not the default ammunition bprofile of a weapon (picked from the attachment menu). -
Attachment Base: Added
ProjectileSpeed
, works in tandem withProjectileOverride
. -
Attachment Base:
drc_att_bprofile_generic
,_buckshot
, and_explosive
entities are now respectivelydrc_abp_generic
/etc. The base has code to auto-convert the previous spelling, but this is a bandaid. You should update any weapons you have which reference these as there is no guarantee it will work forever. -
Material Proxies: Defined one single local variable for
LocalPlayer()
to cut down on the countless times it was called / defined previously, saving a very tiny amount of performance. -
Material Proxies: New material proxy
drc_FakePSX
. Provides a fake PSX-esque polygonal distortion effect utilizing treesway parameters, the proxy is utilized so that the effect diminishes on non-character objects when they or the local player are not moving, and scales the effect by distance as to help remain semi-accurate to the Playstation 1. Parameters are as follows:
-
psx_mul
: Inaccuracy Multiplier -
psx_speed
: Speed multiplier -
psx_world
: 0 by default, only set to 1 if being used for thick prop-bsp which does not move. Mimics slow, high-intensity distortion of the world, and will look nearly as properl on dynamic (moving) objects.
-
Material Proxies: New (optional) setting for all
ReflectionTint
proxies,$cubemaplightingsaturation
; WOO RESTORING STUFF OLD SOURCE COULD DO THAT NEW SOURCE NORMALLY CAN'T. No minimum or maximum value. Intended range is from 0 to 1. Defaults to 1 if undefined. - Material Proxies: Another minor (painful) rewrite to how ReflectionTint is calculated. Light checks now only update every 1/5th of a second, with a small variable of randomness on the interval so that updates become spread out over a number of frames rather than all on the same frame. Added checks for when below 40fps & below 20fps to decrease the update time even further & increase random variance intervals as well. Cubemaps still interpolate smoothly with no noticeable visual difference at the benefit of a MASSIVE performance increase. This change also fixes cross-material parameter overwriting for models with multiple materials utilizing the same proxy channel.
- Material Proxies: Reflection tint proxies now use the bounding-box center for lighting samples on entities instead of their origin. First person arms & viewmodels use the player's eye position.
-
Material Proxies: Applied the same optimizations from
ReflectionTint
toScalingRimLight
. -
VoiceSets: Added a
FriendlyFire
subcall to the "Reactions" category. No guarantee it will even work to be completely honest. Currently should trigger if damaged by another player on the same team as you, or an NPC which is friendly/neutral towards you. - Shields: Fixed an oversight which was causing damage to fully bleed through a shield if it was broken, rather than subtracting the remainder shield hp from the damage.
- Extensions: Fixed error for InfMap water level check if loading an InfMap with no water.
-
Dummy Entity: Added
ENT.DrawMirror = true/false
, defaulted true. Set to false to prevent this entity from being rendered in any RT contexts. - Unarmed SWEP: Added ability to kick open unlocked doors with the kicking attack.