more control fixes

This commit is contained in:
onezplpl 2024-07-19 14:05:26 -04:00
parent 1939e2dff5
commit 2ce46f188b
No known key found for this signature in database
GPG key ID: 7EC026A136F9EEC3
4 changed files with 23 additions and 14 deletions

View file

@ -18,7 +18,7 @@ int collision(struct chunk chunk, vec3 pos, vec3 dir_temp, int col, int n) {
return 1;
}
if (yd < 0 && n == 1) {
dir_temp[1] = 0;
dir_temp[1] = 0.015;
pos[1] = closestVert[1];
return 1;
}
@ -66,9 +66,9 @@ struct v3f control_handler(double cx, double cy, vec3 pos, vec3 dir_temp,
for (int a = -2; a < 0; a++) {
off[1] = a;
for (int b = -1; b < 1; b++) {
off[0] = b + 0.5;
off[0] = (b + 0.5)*0.95;
for (int c = -1; c < 1; c++) {
off[2] = c + 0.5;
off[2] = (c + 0.5)*0.95;
col = col || gen_cube(pos[0] + off[0], pos[1] + off[1], pos[2] + off[2],
chunk, 0, -1);
}
@ -82,9 +82,9 @@ struct v3f control_handler(double cx, double cy, vec3 pos, vec3 dir_temp,
off[1] = -2;
for (int b = -1; b < 1; b++) {
off[0] = b + 0.5;
off[0] = (b + 0.5)*0.95;
for (int c = -1; c < 1; c++) {
off[2] = c + 0.5;
off[2] = (c + 0.5)*0.95;
col = col || gen_cube(pos[0] + off[0], pos[1] + off[1], pos[2] + off[2],
chunk, 0, -1);
}