[TUT] Usage EngFunc_EntitiesInPVS
This is my first tutorial.
After interpreting trigger.cpp (from HLDS), I decided to make this tutorial. EngFunc_EntitiesInPVS (maybe the same for EngFunc_FindClientInPVS) It returns an entity in PVS (potential visible set) of a player. It never returns worldspawn. In that entity returned, you have a set of chained entities using pev_chain. Example Code:
So this function iterates over and over every entity until pev_chain is NULL. |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Good job! This will be useful for some tests.
It would have been better if you have added it here-> http://forums.alliedmods.net/showthread.php?t=93229 Also it would be a good idea to tell people how PVS works (not as function) as a system. If you are interested I can give you some info about it. Edit: Tested and it works! :wink: |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
Quote:
Found entity in player (1) PVS: ent(5) class(player) Found entity in player (1) PVS: ent(3) class(player) Found entity in player (1) PVS: ent(1) class(player) |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
I haven't done any tests relating but since this function already does its job properly we don't really need EngFunc_FindClientInPVS. |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
I use your tutorial a couple of times. |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Ok.
After I do some tests. |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
I thought PVS was just what you can see (visual area) but it's like what you could see in a 360* fashion from the point where you are. And, during my tests, I saw that the walls were ignored... |
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
Quote:
|
Re: [TUT] Usage EngFunc_EntitiesInPVS
Quote:
|
All times are GMT -4. The time now is 09:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.