Implementing EntityKeyValues
Mostly based on #440 by @Yarukon
Implemented CEntityKeyValues, can be used like:
CDynamicProp? prop = Utilities.CreateEntityByName<CDynamicProp>("prop_dynamic");
if (prop != null)
{
CEntityKeyValues keyValues = new CEntityKeyValues();
keyValues.SetBool("my_bool", true);
keyValues.SetEHandle("player_handle", player.EntityHandle);
keyValues.SetVector("vector", new Vector(15.0f, 250.0f, 300.0f));
prop.DispatchSpawn(keyValues);
}
This is also possible:
CDynamicProp? prop = Utilities.CreateEntityByName<CDynamicProp>("prop_dynamic");
if (prop != null)
{
CEntityKeyValues keyValues = new CEntityKeyValues();
keyValues["my_bool", KeyValuesType.TYPE_BOOL] = true;
prop.DispatchSpawn(keyValues);
}
Also implemented some of the math related classes minimally, however: we need #613 in order to prevent memory leaks related to them. (changes needed later on if this one gets merged earlier, or I can make the adjustments on this if 613 is merged.)
Would be nice to have this released, otherwise prop_ragdoll bugs with velocity without setting pos before dispatchspawn
I have tested this specific PR on Linux and it's working fine.
Any update on this? :)
Is there any update on this? :) would love to have it merged if possible.
Any updates on this PR? Would be great to have this merged.
Please, give any information about it @KillStr3aK
Any update on this? :)
Is there any update on this? :) would love to have it merged if possible.
Please, give any information about it @KillStr3aK
other than the conflicts with the main branch the pr is ready, and it does not depend on #613 , but it would just bring even more leaks to the table. I did not look for a solution since that as I'm busy these days but the main implementation is here if someone finds a solution for the leak issues faster than I do
https://github.com/roflmuffin/CounterStrikeSharp/pull/1090
A variation of this has been merged in #1146 and released in v1.0.351