Garry's Mod

Garry's Mod

430 个评价
CalcView Priority System
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: 工具
插件标签: 快乐, 风景
文件大小
发表于
更新日期
6.282 KB
2023 年 1 月 23 日 上午 8:38
2023 年 1 月 23 日 下午 12:01
2 项改动说明 ( 查看 )

订阅以下载
CalcView Priority System

在 8eHg 的 1 个合集中
Mods that use CalcView Priority System
3 件物品
描述
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]

32 条留言
Goatis 5 月 10 日 上午 6:11 
Extended calcview
XxJustPlayxX 4 月 11 日 下午 4:44 
when using this with mwbase it will caused error and mwbase weapon not showing in screen
gordon freeman 4 月 2 日 下午 1:30 
i ♥♥♥♥ you not theres only 2 ♥♥♥♥♥♥♥ ADDONS?
8eHg  [作者] 3 月 18 日 下午 3:41 
it's a dev resource
kabanosik 3 月 18 日 下午 2:19 
how can i use it pls tell bruv <:(
birb 2 月 9 日 上午 11:35 
how to use pls tell me :(
alae angelus 2024 年 9 月 12 日 上午 10:42 
What commands and codes can I use to simulate aiming on a weapon? And how i do that? help please!!!
captain gurt 2024 年 6 月 17 日 下午 3: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  [作者] 2024 年 6 月 17 日 下午 2: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 2024 年 6 月 17 日 下午 2: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