AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Baselines (https://forums.alliedmods.net/showthread.php?t=253071)

NiHiLaNTh 12-14-2014 17:34

Baselines
 
Well, maybe its not the proper forum, since I am not asking how to something, but more for some explanation - what are the baselines. Looking in HLSDK I found this (client.cpp):

Spoiler


Moving forward there can found this (it's better commented, so at least something can be understood):
Spoiler


I was searching on the Internets and found one topic on some russian forums about instanced baselines and the only useful info was, that they are supposed to optimize network traffic for the entities that are created often (rockets, grenades, weaponboxes and stuff like that in HLDM (and CS)). So is this true?

and here comes another question: whats the difference between "normal" baselines and instanced baselines?

fysiks 12-14-2014 18:23

Re: Baselines
 
The answer should be in the code that you removed. I'm guessing it essentially creating the necessary resources for things (players, objects, etc) before they are used. Equivalent to pre-allocating memory.

The difference between them should also be in the code.

NiHiLaNTh 12-15-2014 09:56

Re: Baselines
 
Quote:

Originally Posted by fysiks (Post 2235404)
The answer should be in the code that you removed. I'm guessing it essentially creating the necessary resources for things (players, objects, etc) before they are used. Equivalent to pre-allocating memory.

The difference between them should also be in the code.

Well I hooked those 2 forwards, and dumped everything and it seems that InstancedBaselines are not used at all. As for baselines itself - they are called once per entity (in my situation it printed data for func_buyzone, func_illusionary and info_player_ entities.
As for the code, InstancedBaselines have almost no code in HLSDK, so the purpose of them is still not 100% clear.

Spoiler


CreateBaseline
Spoiler


All times are GMT -4. The time now is 15:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.