mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
Use correct bounding box for CS:S. (#424)
This commit is contained in:
parent
085e57a067
commit
9c697ecdae
@ -2165,16 +2165,18 @@ public void CreateZoneEntities()
|
|||||||
float distance_y = Abs(gV_MapZones[i][0][1] - gV_MapZones[i][7][1]);
|
float distance_y = Abs(gV_MapZones[i][0][1] - gV_MapZones[i][7][1]);
|
||||||
float distance_z = Abs(gV_MapZones[i][0][2] - gV_MapZones[i][7][2]);
|
float distance_z = Abs(gV_MapZones[i][0][2] - gV_MapZones[i][7][2]);
|
||||||
|
|
||||||
|
float height = ((gEV_Type == Engine_CSS)? 62.0:72.0) / 2;
|
||||||
|
|
||||||
float min[3];
|
float min[3];
|
||||||
min[0] = -(distance_x / 2) + 16.0;
|
min[0] = -(distance_x / 2) + 16.0;
|
||||||
min[1] = -(distance_y / 2) + 16.0;
|
min[1] = -(distance_y / 2) + 16.0;
|
||||||
min[2] = -(distance_z / 2) + 36.0;
|
min[2] = -(distance_z / 2) + height;
|
||||||
SetEntPropVector(entity, Prop_Send, "m_vecMins", min);
|
SetEntPropVector(entity, Prop_Send, "m_vecMins", min);
|
||||||
|
|
||||||
float max[3];
|
float max[3];
|
||||||
max[0] = (distance_x / 2) - 16.0;
|
max[0] = (distance_x / 2) - 16.0;
|
||||||
max[1] = (distance_y / 2) - 16.0;
|
max[1] = (distance_y / 2) - 16.0;
|
||||||
max[2] = (distance_z / 2) - 36.0;
|
max[2] = (distance_z / 2) - height;
|
||||||
SetEntPropVector(entity, Prop_Send, "m_vecMaxs", max);
|
SetEntPropVector(entity, Prop_Send, "m_vecMaxs", max);
|
||||||
|
|
||||||
SetEntProp(entity, Prop_Send, "m_nSolidType", 2);
|
SetEntProp(entity, Prop_Send, "m_nSolidType", 2);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user