Cube  Diff

Differences From Artifact [498044e3ca]:

To Artifact [5a011dd2ea]:


96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
collide(DynamicEntity *d, bool spawn, float drop, float rise)
{
	// figure out integer cube rectangle this entity covers in map
	const float fx1 = d.origin.x - d.radius;
	const float fy1 = d.origin.y - d.radius;
	const float fx2 = d.origin.x + d.radius;
	const float fy2 = d.origin.y + d.radius;
	const int x1 = fast_f2nat(fx1);
	const int y1 = fast_f2nat(fy1);
	const int x2 = fast_f2nat(fx2);
	const int y2 = fast_f2nat(fy2);
	float hi = 127, lo = -128;
	// big monsters are afraid of heights, unless angry :)
	float minfloor =
	    ([d isKindOfClass:Monster.class] && !spawn && d.health > 100
	            ? d.origin.z - d.eyeHeight - 4.5f
	            : -1000.0f);








|
|
|
|







96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
collide(DynamicEntity *d, bool spawn, float drop, float rise)
{
	// figure out integer cube rectangle this entity covers in map
	const float fx1 = d.origin.x - d.radius;
	const float fy1 = d.origin.y - d.radius;
	const float fx2 = d.origin.x + d.radius;
	const float fy2 = d.origin.y + d.radius;
	const int x1 = fx1;
	const int y1 = fy1;
	const int x2 = fx2;
	const int y2 = fy2;
	float hi = 127, lo = -128;
	// big monsters are afraid of heights, unless angry :)
	float minfloor =
	    ([d isKindOfClass:Monster.class] && !spawn && d.health > 100
	            ? d.origin.z - d.eyeHeight - 4.5f
	            : -1000.0f);