Skip to content

Changelog June 28th 2023

Vuthakral edited this page Jun 28, 2023 · 1 revision

The weapon base in this update has undergone some major changes and optimizations, all content is backwards-compatible but please expect & report issues to me.

  • Everywhere: Cleanup of old code.
  • Internal: DRC:EmitSound()'s final argument of listener has finally been implemented, allowing serversided lua to play sounds on only a specific player's game.
  • Internal: DRC:EmitSound() now supports using a vector position as a source instead of requiring an entity.
  • Internal: Made the mimicry hl2 crosshair disable when crosshair console command is set to 0, like the base-game one does.
  • Internal: Made the mimicry hl2 crosshair auto-center when within 10 pixels of the center of the screen, preventing any jank motion when looking along angled surfaces.
  • Internal: New function DRC:GetEnvmap(source <position or entity>). Spits out the envmap material closest to a desired position or entity. -- This function is expensive on maps with a lot of envmaps and should not be called per-frame, cache the result. (I will be thinking on better, more performant ways to make this function work but for now this is all I've got.)
  • Internal/Debug: Traceline debug will now tell you the material of the brush you are looking at in place of a model directory when looking at the map.
  • Debug/Menu: Added "Number of Envmaps" to the Map Information of the Debug Information subtab.
  • Debug/Menu: Added "Tickrate" to the Session Information of the Debug Information subtab, since quite a lot servers employ scripts to hide net_graph explicitly to keep players from seeing what their servers tickrates are set to in an attempt to lie to them.
  • Debug/Menu: Updated the help text for r_lod, after learning it functions differently in Garry's Mod.
  • Player Extensions: Added "RequiredModel" as an optional field for the function DRC:RegisterPlayerModel() function. This will allow a model to not register if a required model (intention: animation model) is not present in the game.
  • Attachment Base: Added ENT.AttachSound. This is a sound that will play on the client when the attachment is applied. If left undefined, it will fall back on the current inspection theme's default "Select" sound.
  • Attachment Base: Added ENT.PickupSound. Self explanatory. If left undefined it will still use the same pickup sound as before.
  • Attachment Base - Bullet Profiles: After realizing an oversight in how the muzzle flash brightness was calculated which effectively inverted the intended behaviour, it has been fixed. This will likely result in your muzzle flashes appearing blindingly bright on dark maps, and you might need to update existing bullet profile light values.
  • Attachment Base - Bullet Profiles: Added SplashDoBlast = true/false, will launch entities within the splash radius, relative to damage as a force.
  • Attachment Base - Bullet Profiles: Added TracerOverride, will allow the TracerEffect of a weapon to be overridden by this given effect so long as it is not the default bprofile of a weapon. If left undefined it will still just use the weapon's default TracerEffect.
  • Weapon Base/Internal: Fixed dynamic camera offset strength values failing to update downward in singleplayer.
  • Weapon Base: Made it so external attachments can be safely listed in weapons, allowing extra attachments to be defined by/for external addons.
  • Weapon Base: Made some internal code utilize DRC:GetHoldTypeAnim() to help simplify the processing time on weapon initialization.
  • Weapon Base: Completely rewrote the PrimaryAttack function, shaving off a lot of unneeded processing waste.
  • Weapon Base: A lot of prediction updates/fixes across the board. Prepare for Unforseen Consequences.
  • Weapon Base: Fixed soundtable error on weapons which could occur when switching to burst fire with only semiauto sounds defined, semi/auto sounds are now used as a fallback if burst sounds are not defined.
  • Weapon Base: Fixed melee attacks applying much more force than they were supposed to be.
  • Weapon Base: Fixed SWEP:DoCustomFireMode(mode) failing to pass the mode string to the function.
  • Weapon Base: New function SWEP:GetFireMode(), will return 1, 2, or 3 for Semi, Auto, and Burst modes respectively, instead of relying on/comparing a full string like previously.
  • Weapon Base: Any calls for the old FireMode string (that I could find/remember) have been replaced with GetFireMode, saving on a small bit of performance overall. The previous method of the self:GetNWString("FireMode") has not been removed, as it would make a lot of older existing custom-weapons people have made break. I highly recommend however that people update their custom code to utilize this instead, as it is infinitely faster to process a single number than it is an entire string, something I can't believe I didn't think about when I wrote this originally nor in the years between then and now.
  • Weapon Base: SWEP:EffectChain(table) is now SWEP:EffectChain(table, effectdata). effectdata is optional, and just allows developers to use their own EffectData input.
  • Weapon Base: SWEP:GetWeaponAttachment(attachment name) will now automatically return a position slightly lower & behind the player camera when the weapon is aiming down sights on a scoped weapon, when the requested attachment is "muzzle".
  • Weapon Base: Added "NearMiss" to the Sound Table system.
  • Weapon Base: Made fired projectiles orient towards the player's hitpos initially, fixing a very long-standing nuisance of most players where they had to aim off-center for projectiles to hit.
  • Weapon Base: Multi-shot weapons now deal extra damage per bullet for NPCs, as to keep in-line with Half-Life 2 behaviour. The bonus damage is relative to the total number of projectiles, which keeps it somewhat consistent for a shotgun-standard. I suspect Valve's reasoning for this in Half-Life 2 goes something along the lines of "The NPCs kept engaging with shotguns from too long a distance and weren't actually that dangerous due to the RNG spread even up close".
  • Weapon Base: Made manual reload weapons display a hint warning if someone is too stupid to figure out they have to hold the reload key & continues to enter & exit reloads three times in a row.
  • Weapon Base - Melee: Made melee weapons have a weaker default inspect pos/ang, and made them play their inspect animation when entering inspect mode (User request).
  • Projectile Base: Moved code relating to ENT.Effect to the client realm, fixing a long-standing bug that idle effects would only be called every few server ticks.
  • Projectile Base: New setting ENT.EffectTickRate, allows developers to change how many ticks (frames really, since it's clientside) per second the ENT.Effect should trigger at.
  • Projectile Base: Added NWBool "Stuck", which can be called for whatever but is mainly aimed at effects.
  • Experimental First Person: Added even more layers to the head-hiding code to scale down as many child bones as possible for playermodels with tons of extra bones on the heads.
  • Material Proxies: Added $psx_fps to the drc_FakePSX material proxy, which defaults to 24 if left undefined. This limits the animation update rate for the entity. This currently does not support gesture animations, but will in a future update if I can figure out how to make that work. Gestures will play normally. (If your model has multiple uses of this matproxy and you want to change it, you will need to set it for all materials.)
  • Material Proxies: Colour-pulling functions & related proxies now default to the LocalPlayer if the desired entity is invalid, allowing their use for UI related vmt elements.
  • Material Proxies: Added bool $rimlightdotint to drc_ScalingRimLight{}. This will allow the rimlight to be linearly tinted based on the entity's $color2 value, helping to prevent overbright rimlighting on dynamically coloured entities which can become very dark or black entirely. As this runs per-entity-material, which makes it is natively compatible with Draconic's extended colours, or any other addon's custom scripting.
  • Material Proxies: Fixed envmap fallback HDR/LDR multipliers.
  • Material Proxies: drc_EnvmapFallback{} is now redundant, as the code has been moved into ReflectionTint's shared code itself.
  • Material Proxies: Proxies now look for a shorthand version of all previous parameters as to help reduce both the time it takes to compute the length of the string, as well as the eyesore & finger-sore of editing VMTs that the previous implementation created. The old parameters still work, however they are secondary and using them still will make the code have to take an extra step to find them. It is highly recommended you adapt to the new system, but your old content will still work. The new versions are as follows:
    -- cubemaptint -> cmtint
    -- cubemappower -> cmpower
    -- cubemapmin -> cmmin
    -- cubemapmax -> cmmax
    -- cubemapHDRMul -> cmhdr
    -- cubemapLDRMul -> cmldr
    -- cubemaptintfallback -> cmtint_fb
    -- cubemappowerfallback -> cmpower_fb
    -- cubemapminfallback -> cmmin_fb
    -- cubemapmaxfallback -> cmmax_fb
    -- cubemapHDRMulfallback -> cmhdr_fb
    -- cubemapLDRMulfallback -> cmldr_fb
  • Material Proxies/Internal: The drc_refreshcsents command will now sift through all entities in the game and nullify any Draconic-related material proxy code for ReflectionTint, making the base be forced to recalculate them. Useful for debugging when modifying VMT files and something becomes stuck.
  • Unarmed SWEP: Added HL2 hands animation as a pose animation.
Clone this wiki locally