HolyLib Wiki

pvs

pvs

This library is exposed by the pvs module and provides PVS related functions

Methods

pvs.AddEntityToTransmit( Entity entity, boolean always = false )
Adds the given Entity to be transmitted. Only use this function inside the HolyLib:PreCheckTransmit or HolyLib:PostCheckTransmit hook! Verify that the always works as intented.
pvs.AddEntityToPVS( Entity entity )
Adds the given entity to the PVS You should only use this inside the SetupPlayerVisibility hook.
Adds the given Origin to the PVS.
Works like GMod's AddOriginToPVS function.
Returns whether or not the given areas are connected.
Direct bind to IVEngineServer::CheckAreasConnected We don't validate if you pass valid areas!
boolean pvs.CheckBoxInPVS( Vector mins, Vector maxs )
Returns whether or not the given box is inside the PVS.
Checks if the given position is inside the current PVS.
table pvs.FindInPVS( Vector position )
Returns a sequential table containing all entities in the PVS.
The Entity will always be networked and ignore the PVS.
Used by pvs.OverrideStateFlags, pvs.GetStateFlags and pvs.SetStateFlags.
The Entity won't be networked.
Used by pvs.OverrideStateFlags, pvs.GetStateFlags and pvs.SetStateFlags.
Calls the Entity's ShouldTransmit function to receive a new FL_EDICT flag for networking.
Used by pvs.OverrideStateFlags, pvs.GetStateFlags and pvs.SetStateFlags.
The Entity will be networked when inside the pvs.
Used by pvs.OverrideStateFlags, pvs.GetStateFlags and pvs.SetStateFlags.
Forces a full update for the specific client.
number pvs.GetArea( Vector pos )
Returns the number of clusters that exist.
Direct bind to IVEngineServer::GetArea
Returns the number of clusters that exist.
Direct bind to IVEngineServer::GetClusterCount
Returns the number of clusters that exist.
Direct bind to IVEngineServer::GetClusterForOrigin
Returns a table containing all entities that will be transmitted. Only use this function inside the HolyLib:PreCheckTransmit or HolyLib:PostCheckTransmit hook!
pvs.GetPVSForCluster( number cluster )
Sets the current PVS to that of the given cluster. We don't validate if you pass valid clusters!
number pvs.GetStateFlags( Entity entity, boolean engine = false )
Returns the state flags for the given entity. Only use the engine argument if you know what your doing
Returns true if the baseline is empty. Only use this function inside the HolyLib:PreCheckTransmit or HolyLib:PostCheckTransmit hook! This function was removed since I can't get it to work / It would be a bit more complicated than first anticipated.
pvs.OverrideStateFlags( Entity entity, number flag, boolean engine = false )
Overrides the State flag for this Snapshot. You should only use this inside the SetupPlayerVisibility hook.
Should be used inside the HolyLib:PreCheckTransmit or SetupPlayerVisibility hook as else it will affect the next transmit of any player! Only use the engine argument if you know what your doing
Removes all Entities from being transmitted. Only use this function inside the HolyLib:PreCheckTransmit or HolyLib:PostCheckTransmit hook!
Removes the given entity from being transmitted. Only use this function inside the HolyLib:PreCheckTransmit or HolyLib:PostCheckTransmit hook!
pvs.ResetPVS()
Resets the current PVS.
pvs.SetPreventTransmitBulk( table ents, table plys, boolean notransmit = false )
Adds the given Entity to be transmitted. Only use this function inside the HolyLib:PreCheckTransmit hook!
pvs.SetStateFlags( Entity entity, number flag, boolean engine = false )
Sets the State flag for this entity. Unlike pvs.OverrideStateFlags, this won't be reset after the snapshot. Only use the engine argument if you know what your doing.
boolean pvs.TestPVS( Vector pasPosition, Vector hearPosition )
Tests if the give origin position is inside the given pvs.