Skip to content
This repository has been archived by the owner on Sep 22, 2021. It is now read-only.

m_Collision.m_vecMins gets incorrect values for func_hostage_rescue entities #163

Open
JimmyWoodhouse opened this issue Apr 19, 2020 · 2 comments

Comments

@JimmyWoodhouse
Copy link

Inside of DemoParser.cs:

SendTableParser.FindByName("CCSPlayerResource").OnNewEntity += (s1, newResource) => {
        newResource.Entity.FindProperty("m_hostageRescueX.000").DataRecivedDontUse += (s1, center) => ...

seems to get the X value for the center point of func_hostage_rescue entities correctly (same for Y and Z).

However,

SendTableParser.FindByName("CBaseTrigger").OnNewEntity += (s1, newResource) => {
        newResource.Entity.FindProperty("m_Collision.m_vecMins").VectorRecived += (s2, vector) => {
		trigger.Min = vector.Value;
	};

seems to provide incorrect location values in vector.Value that do not match the entity's values and they do not even seem to correspond to other entities, moreso just a random place in the void.

This seems to work perfectly fine for func_bomb_target entities, and only seems to be an issue for func_hostage_rescue entities.

Could you advise? Thanks

@JimmyWoodhouse
Copy link
Author

I have also seen that DataRecivedDontUse is obsolete, however this seems to be the only one that does not throw an error and actually provides data for m_hostageRescueX.000, m_hostageRescueY_000 and so on

@JimmyWoodhouse
Copy link
Author

JimmyWoodhouse commented Apr 20, 2020

It seems that m_Collision.m_vecMins and Maxs get Vertex values relative to the entity's origin, rather than world origin like it seems to get for bombsite entities. I've added a workaround for just using the relative coordinates to work the bounding box out from the entity's origin, but it isn't ideal

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant