Garry's Mod

Garry's Mod

432 hodnocení
CalcView Priority System
   
Ocenit
Přidat do oblíbených
Oblíbeno
Odebrat z oblíbených
Content Type: Addon
Addon Type: Tool
Addon Tags: Fun, Scenic
Velikost souboru
Přidáno
Aktualizováno
6.282 KB
23. led. 2023 v 8.38
23. led. 2023 v 12.01
Poznámky ke změnám (2) – zobrazit

Klikněte na „Odebírat“ pro stažení položky
CalcView Priority System

V 1 kolekci od uživatele 8eHg
Mods that use CalcView Priority System
3 položek
Popis
C.V.P.S.
CVPS is a library/system that allows you to create CalcView hook camera manipulation mods without every camera mod breaking the other one,
while also allowing you to have Layered CalcViews on top of the highest priority "Base" CalcView. (Useful for viewbob, breathing, etc.)



This is achieved by running only the highest priority CalcView hook and then adding to it the returned data from all the "Layered" ones.

The point of this library is to allow devs to create camera mods that do not interfere with each other in jarring ways.

For Developers
The library is contained inside a global table named "CalcViewPS" and runs a hook called "CalcViewPS_Initialized" when it has loaded.

ENUMs CalcViewPS.PerspectiveENUM = { FIRSTPERSON = 1, THIRDPERSON = 2, TOPDOWN = 3, ISOMETRIC = 4, OTHER = 5 } Argument Explanations name - Unique string ID for the hook func - The function to be ran if the hook is of the highest priority, or is a layered hook. Works like normal CalcView, function must return a table like a normal CalcView hook would. In the case of the hook being layered, the hook should not be layering the returned values on top of the provided base position, angles and FOV. The library already takes care of the layering. priority - The priority number the hook should have. The higher it is, the bigger the chance it will be the "camera" that is running. Value is clamped to be between -100000 and 100000 perspective - The perspective ENUM for the hook. Layered hooks will only be applied if they have the same perspective ENUM as the current running Base hook. This can be one of the ENUMs above or a number. Functions CalcViewPS.Add(name, func, priority, perspective) - Adds a "Base" hook to the queue with the specified priority. CalcViewPS.AddToTop(name, func, perspective) - Adds a "Base" hook to the queue above the current highest priority hook. (Priority 9000 if one does not exist.) CalcViewPS.AddToBottom(name, func, perspective) - Adds a "Base" hook to the queue below the current lowest priority hook. (Priority -9000 if one does not exist.) CalcViewPS.AddLayered(name, func, perspective) - Adds a "Layered" hook to the table, which will be layered on top of the current running "Base" hook. CalcViewPS.Remove(name) - Removes "Base" hook with the specified id from the queue CalcViewPS.RemoveLayered(name) - Removes "Layered" hook with the specified id from the layered hooks table. CalcViewPS.GetLowestPriority() - Returns the lowest priority number that is present in the current "Base" hook queue. CalcViewPS.GetLowestPriorityHook() - Returns the table of the lowest priority "Base" hook in the queue. Returns nil if no hooks exist. CalcViewPS.GetHighestPriority() - Returns the highest priority number that is present in the current "Base" hook queue. CalcViewPS.GetLowestPriority() - Returns the table of the highest priority "Base" hook in the queue. Returns nil if no hooks exist.

Support Links
[revolut.me]

Počet komentářů: 32
Goatis 10. kvě. v 6.11 
Extended calcview
XxJustPlayxX 11. dub. v 16.44 
when using this with mwbase it will caused error and mwbase weapon not showing in screen
gordon freeman 2. dub. v 13.30 
i ♥♥♥♥ you not theres only 2 ♥♥♥♥♥♥♥ ADDONS?
8eHg  [autor] 18. bře. v 15.41 
it's a dev resource
kabanosik 18. bře. v 14.19 
how can i use it pls tell bruv <:(
birb 9. úno. v 11.35 
how to use pls tell me :(
empty wishes 12. zář. 2024 v 10.42 
What commands and codes can I use to simulate aiming on a weapon? And how i do that? help please!!!
captain gurt 17. čvn. 2024 v 15.58 
thanks for the quick response. after a little bit of fiddling with possible culprit mods, it seems to have been "Shmovment" that was causing the issue. very unfortunate
8eHg  [autor] 17. čvn. 2024 v 14.43 
I would consider any camera mod that changes "drawviewer" functionality to be an incompatibility.
General rule is this: If it's a camera mod and it's not using this, then it has a 99.9% chance of being incompatible.
captain gurt 17. čvn. 2024 v 14.37 
are there any known compatibility errors? for me, any mods that use this system do work but don't actually have a visible player model during the animations (examples: Animated Ladder Climbing and Hard Landing / Safety Roll). the animations do play in third person, it's just that the player's body is not rendered during animations in first person