diff --git a/bin/back b/bin/back index 4606abe..8858bcc 100755 Binary files a/bin/back and b/bin/back differ diff --git a/obj/entities.o b/obj/entities.o index aac3501..fccdfcb 100644 Binary files a/obj/entities.o and b/obj/entities.o differ diff --git a/obj/move.o b/obj/move.o index da3dab1..a1ada0b 100644 Binary files a/obj/move.o and b/obj/move.o differ diff --git a/src/base.c b/src/base.c index 63abf14..224922a 100644 --- a/src/base.c +++ b/src/base.c @@ -90,7 +90,7 @@ int convex_seg(int x1, int x2, double theta) { } double convex_pt(double a, double b, double theta) { - return (a+(b-a)*theta) ; + return (a+(b-a)*theta); } double convex_tri(double a, double tha, double b, double thb, double c, double thc) { @@ -119,33 +119,33 @@ bool is_an_integer(char c) { pt_2d vect_diff(pt_2d p1, pt_2d p2) { pt_2d res; - res.x = p2.x - p1.x ; - res.y = p2.y - p1.y ; - res.z = p2.z - p1.z ; + res.x = p2.x - p1.x; + res.y = p2.y - p1.y; + res.z = p2.z - p1.z; return res; } double dot2D(pt_2d p1, pt_2d p2) { - return p1.x * p2.x + p1.y * p2.y ; + return p1.x * p2.x + p1.y * p2.y; } double dot3D(pt_2d p1, pt_2d p2) { - return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z ; + return p1.x * p2.x + p1.y * p2.y + p1.z * p2.z; } double to_double(int n) { - return (double)n ; + return (double)n; } int to_int(double n) { - return (int)n ; + return (int)n; } int line_count(char* filename) { FILE* ptr = fopen(filename, "r"); char c = 'd'; - int n = 0 ; + int n = 0; while(c != EOF) { if(c == '\n') { n += 1; @@ -157,11 +157,11 @@ int line_count(char* filename) { } int str_to_int(char* s) { - int res = 0 ; - int i = 0 ; + int res = 0; + int i = 0; while(s[i] != '\0' && is_an_integer(s[i])) { - res *= 10 ; - res += (int)s[i] - 48 ; + res *= 10; + res += (int)s[i] - 48; i++; }; return res; @@ -177,57 +177,57 @@ bool str_equal(char* s1, char* s2) { // ------------------------------------------------------------------------------------------------ // cube_0* create_cube_0(double x, double y, double z, double w, double h, double d, double hz_a, double vt_a, int r, int g, int b) { - cube_0* cb = malloc(sizeof(cube_0)) ; - cb->red = r ; - cb->green = g ; - cb->blue = b ; - cb->x = x ; - cb->y = y ; - cb->z = z ; - cb->w = w ; - cb->h = h ; - cb->d = d ; - cb->hz_angle = hz_a ; - cb->vt_angle = vt_a ; - return cb ; + cube_0* cb = malloc(sizeof(cube_0)); + cb->red = r; + cb->green = g; + cb->blue = b; + cb->x = x; + cb->y = y; + cb->z = z; + cb->w = w; + cb->h = h; + cb->d = d; + cb->hz_angle = hz_a; + cb->vt_angle = vt_a; + return cb; } void fill_cube_0(cube_0* cb, double x, double y, double z, double w, double h, double d, double hz_a, double vt_a, int r, int g, int b) { - cb->red = r ; - cb->green = g ; - cb->blue = b ; - cb->x = x ; - cb->y = y ; - cb->z = z ; - cb->w = w ; - cb->h = h ; - cb->d = d ; - cb->hz_angle = hz_a ; - cb->vt_angle = vt_a ; + cb->red = r; + cb->green = g; + cb->blue = b; + cb->x = x; + cb->y = y; + cb->z = z; + cb->w = w; + cb->h = h; + cb->d = d; + cb->hz_angle = hz_a; + cb->vt_angle = vt_a; } cube create_cube(double x, double y, double z, double w, double h, double d, double hz_a, double vt_a, int r, int g, int b) { cube cb = malloc(sizeof(cube_0)); - cb = create_cube_0(x, y, z, w, h, d, hz_a, vt_a, r, g, b) ; + cb = create_cube_0(x, y, z, w, h, d, hz_a, vt_a, r, g, b); return cb; } void free_cube(cube c) { - free(c) ; + free(c); } teleporter* create_teleporter( double x, double y, double z, double w, double h, double d, double hz_a, double vt_a, int r, int g, int b, int chx_dest, int chy_dest, double x_dest, double y_dest, double z_dest ) { - teleporter* tp = malloc(sizeof(teleporter)) ; - tp->dest_chx = chx_dest ; - tp->dest_chy = chy_dest ; - tp->dest_x = x_dest ; - tp->dest_y = y_dest ; - tp->dest_z = z_dest ; + teleporter* tp = malloc(sizeof(teleporter)); + tp->dest_chx = chx_dest; + tp->dest_chy = chy_dest; + tp->dest_x = x_dest; + tp->dest_y = y_dest; + tp->dest_z = z_dest; tp->hitbox = create_cube_0(x, y, z, w, h, d, hz_a, vt_a, r, g, b); - return tp ; + return tp; } void copy_cube(cube_0* src, cube_0* dest) { @@ -264,91 +264,91 @@ double distance_pt_seg_3d(double x, double y, double z, double sx, double sy, do ((ex - sx) * (ex - sx) + (ey - sy) * (ey - sy) + (ez - sz) * (ez - sz)) ); if(theta >= 0.0 && theta <= 1.0) { - return (distance_pt_pt_3d(x, y, z, convex_pt(sx, ex, theta), convex_pt(sy, ey, theta), convex_pt(sz, ez, theta))) ; + return (distance_pt_pt_3d(x, y, z, convex_pt(sx, ex, theta), convex_pt(sy, ey, theta), convex_pt(sz, ez, theta))); } else if (theta < 0.0) { - return (distance_pt_pt_3d(x, y, z, sx, sy, sz)) ; + return (distance_pt_pt_3d(x, y, z, sx, sy, sz)); } else { - return (distance_pt_pt_3d(x, y, z, ex, ey, ez)) ; + return (distance_pt_pt_3d(x, y, z, ex, ey, ez)); } } double distance_pt_cube_axis(double coord, double begin, double end) { if(coord < begin) { - return (begin-coord) ; + return (begin-coord); } else if(coord > end) { - return (coord-end) ; + return (coord-end); } else { - return 0.0 ; + return 0.0; } } double distance_pt_cube_axis_max(double coord, double begin, double end) { if(coord < (begin+end)/2) { - return absf(end-coord) ; + return absf(end-coord); } else { - return absf(begin-coord) ; + return absf(begin-coord); } } double distance_pt_cube_aligned_3d(double x0, double y0, double z0, double cx, double cy, double cz, double cw, double ch, double cd) { - return (distance_pt_cube_axis(x0, cx, cx+cw)+distance_pt_cube_axis(y0, cy, cy+ch)+distance_pt_cube_axis(z0, cz, cz+cd)) ; + return (distance_pt_cube_axis(x0, cx, cx+cw)+distance_pt_cube_axis(y0, cy, cy+ch)+distance_pt_cube_axis(z0, cz, cz+cd)); } double distance_pt_cube_aligned_3d_max(double x0, double y0, double z0, double cx, double cy, double cz, double cw, double ch, double cd) { - return (distance_pt_cube_axis_max(x0, cx, cx+cw)+distance_pt_cube_axis_max(y0, cy, cy+ch)+distance_pt_cube_axis_max(z0, cz, cz+cd)) ; + return (distance_pt_cube_axis_max(x0, cx, cx+cw)+distance_pt_cube_axis_max(y0, cy, cy+ch)+distance_pt_cube_axis_max(z0, cz, cz+cd)); } double distance_pt_cube_0_3d(double x0, double y0, double z0, cube_0* c) { // places the origin at the center of the cube - double x = x0 - (c->x + c->w/2.0) ; - double y = y0 - (c->y + c->h/2.0) ; - double z = z0 - (c->z + c->d/2.0) ; + double x = x0 - (c->x + c->w/2.0); + double y = y0 - (c->y + c->h/2.0); + double z = z0 - (c->z + c->d/2.0); // rotate the point : y then x - double xry = x*cos(c->hz_angle) + z*sin(c->hz_angle) ; - double yry = y ; - double zry = z*cos(c->hz_angle) - x*sin(c->hz_angle) ; + double xry = x*cos(c->hz_angle) + z*sin(c->hz_angle); + double yry = y; + double zry = z*cos(c->hz_angle) - x*sin(c->hz_angle); - double xrx = xry ; - double yrx = yry*cos(c->vt_angle) - zry*sin(c->vt_angle) ; - double zrx = zry*cos(c->vt_angle) + yry*sin(c->vt_angle) ; + double xrx = xry; + double yrx = yry*cos(c->vt_angle) - zry*sin(c->vt_angle); + double zrx = zry*cos(c->vt_angle) + yry*sin(c->vt_angle); // now the cube and pt are aligned, and (0, 0, 0) is at the cube's (bary)center - return distance_pt_cube_aligned_3d(xrx, yrx, zrx, -c->w/2.0, -c->h/2.0, -c->d/2.0, c->w, c->h, c->d) ; + return distance_pt_cube_aligned_3d(xrx, yrx, zrx, -c->w/2.0, -c->h/2.0, -c->d/2.0, c->w, c->h, c->d); } // ------------------------------------------------------------------------------------------------ // void project_to_camera(double x0, double y0, double z0, double* rx, double* ry, double* rz) { // align pt to (0, 0, 0) - double x = x0 - camx ; - double y = y0 - camy ; - double z = z0 - camz ; + double x = x0 - camx; + double y = y0 - camy; + double z = z0 - camz; // rotate (y) - double xry = x*cos(rot_hz) - z*sin(rot_hz) ; - double yry = y ; - double zry = z*cos(rot_hz) + x*sin(rot_hz) ; + double xry = x*cos(rot_hz) - z*sin(rot_hz); + double yry = y; + double zry = z*cos(rot_hz) + x*sin(rot_hz); // rotate (x) - if(rx != NULL) {*rx = xry ;} - if(ry != NULL) {*ry = yry*cos(rot_vt) + zry*sin(rot_vt) ;} - if(rz != NULL) {*rz = zry*cos(rot_vt) - yry*sin(rot_vt) ;} + if(rx != NULL) {*rx = xry;} + if(ry != NULL) {*ry = yry*cos(rot_vt) + zry*sin(rot_vt);} + if(rz != NULL) {*rz = zry*cos(rot_vt) - yry*sin(rot_vt);} } void project_to_cube(double x0, double y0, double z0, double* rx, double* ry, double* rz, cube_0* c) { // align pt to (0, 0, 0) - double x = x0 - (c->x + c->w/2.0) ; - double y = y0 - (c->y + c->h/2.0) ; - double z = z0 - (c->z + c->d/2.0) ; + double x = x0 - (c->x + c->w/2.0); + double y = y0 - (c->y + c->h/2.0); + double z = z0 - (c->z + c->d/2.0); // rotate (y) - double xry = x*cos(c->hz_angle) + z*sin(c->hz_angle) ; - double yry = y ; - double zry = z*cos(c->hz_angle) - x*sin(c->hz_angle) ; + double xry = x*cos(c->hz_angle) + z*sin(c->hz_angle); + double yry = y; + double zry = z*cos(c->hz_angle) - x*sin(c->hz_angle); // rotate (x) - if(rx != NULL) {*rx = c->x + c->w/2.0 + xry ;} + if(rx != NULL) {*rx = c->x + c->w/2.0 + xry;} if(ry != NULL) {*ry = c->y + c->h/2.0 + yry*cos(c->vt_angle) - zry*sin(c->vt_angle);} if(rz != NULL) {*rz = c->z + c->d/2.0 + zry*cos(c->vt_angle) + yry*sin(c->vt_angle);} } @@ -369,14 +369,14 @@ void add_entity(entity** arr, int* memlen, int* len, entity* ent) { entity** newarr = malloc(sizeof(entity*)*2*(*memlen)); for(int k = 0; k < *len; k++) { newarr[k] = malloc(sizeof(entity)); - newarr[k] = arr[k] ; + newarr[k] = arr[k]; free(arr[k]); } free(*arr); - arr = newarr ; + arr = newarr; *memlen *= 2; } free(arr[*len]); - arr[*len] = ent ; + arr[*len] = ent; *len += 1; } \ No newline at end of file diff --git a/src/entities.c b/src/entities.c index cde08bc..7ed766a 100644 --- a/src/entities.c +++ b/src/entities.c @@ -57,25 +57,25 @@ void update_entities(float dtime) { // ------------------------------------------------------------------------------------------------------------------------------------------------ // void speen(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { - ret->hz_angle += ((double)dtime)*15.0; + ret->hz_angle += ((double)dtime)*1.5; } void speen2(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { - ret->hz_angle += ((double)dtime)*22.5; + ret->hz_angle += ((double)dtime)*2.5; if((int)(5.0*ret->hz_angle) != (int)(5.0*(ret->hz_angle - ((double)dtime)*22.5))) { double dx = (x+w/2 - camx); double dy = (y+h/2 - camy); double dz = (z+d/2 - camz); double total = sqrt(dx*dx + dy*dy + dz*dz); - dx = 170.0*dx/total; - dy = 170.0*dy/total; - dz = 170.0*dz/total; + dx = 17.0*dx/total; + dy = 17.0*dy/total; + dz = 17.0*dz/total; appendProj(x+w/2, y+h/2, z+d/2, 0.1, 0.1, 0.1, -dx, -dy, -dz, 0.0, 0.0, 0.0, 255, 0, 0, 10, 3.0); } } void speen3(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { - ret->vt_angle += ((double)dtime)*22.5; + ret->vt_angle += ((double)dtime)*2.5; } // metad{1,2,3} = og pos @@ -105,31 +105,12 @@ void detectHit(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret) { } void translatePlayer(float dtime, int* hp, int* dmg, entity* ent, cube_0* ret) { - double vx = ent->metad4*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); - double vy = ent->metad5*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); - double vz = ent->metad6*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); - //printf("(%lf %lf) (%lf %lf) (%lf %lf)\n", vx, camvx, vy, camvy, vz, camvz); - if(true) { - double oldvx = camvx; - camvx = vx/dtime; - camx -= oldvx*dtime; - camx += camvx*dtime; - noResetSpeed = true; - } - if(true) { - double oldvy = camvy; - camvy += vy/dtime; - camy -= oldvy*dtime; - camy += camvy*dtime; - } - if(true) { - double oldvz = camvz; - camvz = vz/dtime; - camz -= oldvz*dtime; - camz += camvz*dtime; - noResetSpeed = true; - } - noFriction = true; + double dx = ent->metad4*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + double dy = ent->metad5*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + double dz = ent->metad6*(cos((double)(ent->metai1*(sim_time+(double)dtime)/ent->metai2 + ent->metai3*3.14159/180.0))-cos((double)(ent->metai1*sim_time/ent->metai2 + ent->metai3*3.14159/180.0))); + fx += dx/(dtime*dtime); + fy += dy/(dtime*dtime); + fz += dz/(dtime*dtime); } void go_to_player(double x, double y, double z, double w, double h, double d, double hz_angle, double vt_angle, float dtime, entity* ent, cube_0* ret) { diff --git a/src/move.c b/src/move.c index 56e6747..5779918 100644 --- a/src/move.c +++ b/src/move.c @@ -24,10 +24,13 @@ double vtmult = 1.5; double min_dist = 0.7; double friction = 0.8; double gravity_factor = 9.8; -bool noResetSpeed = false; -bool noFriction = false; // ---------------------------------------------------------------------------------------------------- // +double fx; +double fy; +double fz; +bool updateForces = false; + int player_hp; bool stop_evetything; @@ -48,6 +51,7 @@ int draw_type; int fade_dmg; bool has_changed; +int collisionVal = 0; double room_width; double room_depth; @@ -83,16 +87,94 @@ void set_player_coords(int old_chx, int old_chy) { } } +pt_2d surface[3]; +pt_2d directors[2]; +pt_2d normal; +double p1, p2, p3; +void getSF(cube_0* cb, int sf) { + if(sf == 0 || sf == 1) { + project_to_cube(cb->x + (sf==0)*cb->w, cb->y , cb->z , &p1, &p2, &p3, cb); + surface[0] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x + (sf==0)*cb->w, cb->y + cb->h, cb->z , &p1, &p2, &p3, cb); + surface[1] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x + (sf==0)*cb->w, cb->y , cb->z + cb->d, &p1, &p2, &p3, cb); + surface[2] = (pt_2d){.x = p1, .y = p2, .z = p3}; + } else if(sf == 2 || sf == 3) { + project_to_cube(cb->x , cb->y + (sf==2)*cb->h, cb->z , &p1, &p2, &p3, cb); + surface[0] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x + cb->w, cb->y + (sf==2)*cb->h, cb->z , &p1, &p2, &p3, cb); + surface[1] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x , cb->y + (sf==2)*cb->h, cb->z + cb->d, &p1, &p2, &p3, cb); + surface[2] = (pt_2d){.x = p1, .y = p2, .z = p3}; + } else { + project_to_cube(cb->x , cb->y , cb->z + cb->d*(sf==4), &p1, &p2, &p3, cb); + surface[0] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x + cb->w, cb->y , cb->z + cb->d*(sf==4), &p1, &p2, &p3, cb); + surface[1] = (pt_2d){.x = p1, .y = p2, .z = p3}; + project_to_cube(cb->x , cb->y + cb->h, cb->z + cb->d*(sf==4), &p1, &p2, &p3, cb); + surface[2] = (pt_2d){.x = p1, .y = p2, .z = p3}; + } +} + +void getDirectors() { + directors[0] = (pt_2d){.x = surface[1].x - surface[0].x, .y = surface[1].y - surface[0].y, .z = surface[1].z - surface[0].z}; + directors[1] = (pt_2d){.x = surface[2].x - surface[0].x, .y = surface[2].y - surface[0].y, .z = surface[2].z - surface[0].z}; +} + +void getNormal() { + normal.x = directors[0].y*directors[1].z - directors[1].y*directors[0].z; + normal.y = -directors[0].z*directors[1].x + directors[1].z*directors[0].x; + normal.z = directors[0].x*directors[1].y - directors[1].x*directors[0].y; + double norm = sqrt(normal.x*normal.x + normal.y*normal.y + normal.z*normal.z); + normal.x /= norm; + normal.y /= norm; + normal.z /= norm; +} + +void updateF(cube_0* cb, double dtime) { + for(int d = 0; d < 6; d++) { + getSF(cb, d); + getDirectors(); + getNormal(); + if(d%2==1) { + normal.x *= -1.0; + normal.y *= -1.0; + normal.z *= -1.0; + } + pt_2d vt = (pt_2d){.x = camx-camvx*dtime - surface[0].x, .y = camy-camvy*dtime - surface[0].y, .z = camz-camvz*dtime - surface[0].z}; + pt_2d vtdt = (pt_2d){.x = camx - surface[0].x, .y = camy - surface[0].y, .z = camz - surface[0].z}; + if((dot3D(vt, normal) <= -min_dist && dot3D(vtdt, normal) > -min_dist) || (dot3D(vt, normal) >= min_dist && dot3D(vtdt, normal) < min_dist)) { + double normv = sqrt(camvx*camvx + camvy*camvy + camvz*camvz); + + double alpha = acos(dot3D(normal, (pt_2d){.x = camvx, .y = camvy, .z = camvz})/normv); + double beta = 3.1415926535 - 2*alpha; + double nu = sqrt(2)*normv*sqrt(1-cos(beta)); + + pt_2d u = (pt_2d){.x = normal.x*nu, .y = normal.y*nu, .z = normal.z*nu}; + + camvx += u.x; + camvy += u.y; + camvz += u.z; + } + } +} + bool is_colliding(float dtime) { for(int k = 0; k < current_room->map_size; k++) { double dist = distance_pt_cube_0_3d(camx, camy, camz, current_room->map[k]); if(dist <= min_dist) { + if(updateForces) { + updateF(current_room->map[k], (double)dtime); + } return true; } } for(int k = 0; k < current_room->tps_size; k++) { double dist = distance_pt_cube_0_3d(camx, camy, camz, current_room->tps[k]->hitbox); if(dist <= min_dist) { + if(updateForces) { + updateF(current_room->tps[k]->hitbox, (double)dtime); + } int old_chx = player_chx; int old_chy = player_chy; player_chx = current_room->tps[k]->dest_chx; @@ -106,6 +188,9 @@ bool is_colliding(float dtime) { for(int k = 0; k < current_room->ent_len; k++) { double dist = distance_pt_cube_0_3d(camx, camy, camz, current_room->ents[k]->pos); if(dist <= min_dist) { + if(updateForces) { + updateF(current_room->ents[k]->pos, (double)dtime); + } if(current_room->ents[k]->onHit != NULL) { (*current_room->ents[k]->onHit)(dtime, current_room->ents[k]->hitpoints, ¤t_room->ents[k]->damage, current_room->ents[k], &(*(current_room->ents[k]->pos))); if(*(current_room->ents[k]->hitpoints) <= 0) { @@ -122,45 +207,37 @@ bool is_colliding(float dtime) { } void movePlayerG(double dtime) { - camx += camvx*dtime; - noResetSpeed = false; - noFriction = false; - if(is_colliding(dtime)) { - camx -= camvx*dtime; - if(!noResetSpeed) { - camvx = 0.0; - } - } - if(!noFriction) { - camvx = camvx*(1-dtime*friction); - } + updateForces = true; + fx = 0.0; + fy = 0.0; + fz = 0.0; camvy -= gravity_factor*dtime; - camy += camvy*dtime; - noResetSpeed = false; - noFriction = false; - if(is_colliding(dtime)) { - camy -= camvy*dtime; - if(!noResetSpeed) { - camvy = 0.0; - } - } - if(!noFriction) { - camvy = camvy*(1-dtime*friction); - } - camz += camvz*dtime; - noResetSpeed = false; - noFriction = false; + double delx = camvx*dtime; + double dely = camvy*dtime; + double delz = camvz*dtime; + camx += delx; + camy += dely; + camz += delz; if(is_colliding(dtime)) { - camz -= camvz*dtime; - if(!noResetSpeed) { - camvz = 0.0; - } - } - if(!noFriction) { - camvz = camvz*(1-dtime*friction); + //camvx = 0.0; + //camvy = 0.0; + //camvz = 0.0; } + camx -= delx; + camy -= dely; + camz -= delz; + printf("%lf | %lf | %lf\n", fx, fy, fz); + + updateForces = false; + camvx += fx*dtime; + camvy += fy*dtime; + camvz += fz*dtime; + printf("%lf | %lf | %lf\n\n", camvx, camvy, camvz); + camx += camvx*dtime; + camy += camvy*dtime; + camz += camvz*dtime; } void teleport_on_edge() { diff --git a/src/structure.h b/src/structure.h index 4dcec48..e1c25ef 100644 --- a/src/structure.h +++ b/src/structure.h @@ -147,7 +147,10 @@ extern float rectDefault[18]; extern int triCount; -extern bool noResetSpeed; -extern bool noFriction; +extern bool updateForces; + +extern double fx; +extern double fy; +extern double fz; #endif \ No newline at end of file