aboutsummaryrefslogtreecommitdiff
path: root/doc/changelog.txt
Commit message (Collapse)AuthorAge
* Updated changelogPerttu Ahola2011-08-31
|
* Fixes a bug that made the server to deny non-empty passwords from players ↵Perttu Ahola2011-07-31
| | | | connecting the first time.
* updated changelogPerttu Ahola2011-07-31
|
* changelog update and disable motd by defaultPerttu Ahola2011-07-31
|
* Updated CMakeLists, changelog and example config for releasePerttu Ahola2011-07-31
|
* Updated version and changelogPerttu Ahola2011-07-04
|
* 0.2.20110602_0Perttu Ahola2011-06-02
|
* hopefully fixed the privilege problemsPerttu Ahola2011-05-29
| | | | | --HG-- extra : rebase_source : 9826d20176134a53ff232816a10407465d8c0f50
* changed version number to 0.2.20110529_0Perttu Ahola2011-05-29
| | | | | --HG-- extra : rebase_source : 9b05d4bfee9312aef4182fa6f63b4237368cec34
* invert_mouse config optionPerttu Ahola2011-05-29
| | | | | --HG-- extra : rebase_source : 2695ad71185244cefbcf6e3e28ba1ab5e54c882f
* player passwords and privileges in world/auth.txtPerttu Ahola2011-05-29
| | | | | --HG-- extra : rebase_source : 7260636295d9068fbeeddf4143c89f2b8a91446c
* and the changelogPerttu Ahola2011-05-21
|
* updated changelogPerttu Ahola2011-05-21
|
* add recent major changes to changelogPerttu Ahola2011-05-19
|
* changelog updatePerttu Ahola2011-04-29
|
* updated changelogPerttu Ahola2011-04-29
|
* Optimized smooth lighting calculation codePerttu Ahola2011-04-24
|
* updated menu a bit, and some other small fixesPerttu Ahola2011-04-24
|
* Added a setting for disabling smooth lighting. Updated changelog.Perttu Ahola2011-04-24
|
* updated changelogPerttu Ahola2011-04-23
|
* fixingPerttu Ahola2011-04-12
|
* updated changelog and versionPerttu Ahola2011-04-10
|
* updated changelogPerttu Ahola2011-04-06
|
* changelog updatePerttu Ahola2011-04-05
|
* changelog updatePerttu Ahola2011-04-05
|
* updated changelog a bitPerttu Ahola2011-04-05
|
* updated changelogPerttu Ahola2011-02-17
|
* updated changelogPerttu Ahola2011-02-15
|
* Ctrl+C handling on POSIX, some commands for server and other tweakingPerttu Ahola2011-02-15
|
* changelog updatePerttu Ahola2011-02-14
|
* added sneaking/crouching and changelogPerttu Ahola2011-02-14
span>y,z)); if(gamedef->getNodeDefManager()->get(n).walkable == false) continue; } catch(InvalidPositionException &e) { // Doing nothing here will block the object from // walking over map borders } core::aabbox3d<f32> nodebox = getNodeBox(v3s16(x,y,z), BS); /* See if the object is touching ground. Object touches ground if object's minimum Y is near node's maximum Y and object's X-Z-area overlaps with the node's X-Z-area. Use 0.15*BS so that it is easier to get on a node. */ if( //fabs(nodebox.MaxEdge.Y-box.MinEdge.Y) < d fabs(nodebox.MaxEdge.Y-box.MinEdge.Y) < 0.15*BS && nodebox.MaxEdge.X-d > box.MinEdge.X && nodebox.MinEdge.X+d < box.MaxEdge.X && nodebox.MaxEdge.Z-d > box.MinEdge.Z && nodebox.MinEdge.Z+d < box.MaxEdge.Z ){ result.touching_ground = true; } // If object doesn't intersect with node, ignore node. if(box.intersectsWithBox(nodebox) == false) continue; /* Go through every axis */ v3f dirs[3] = { v3f(0,0,1), // back-front v3f(0,1,0), // top-bottom v3f(1,0,0), // right-left }; for(u16 i=0; i<3; i++) { /* Calculate values along the axis */ f32 nodemax = nodebox.MaxEdge.dotProduct(dirs[i]); f32 nodemin = nodebox.MinEdge.dotProduct(dirs[i]); f32 objectmax = box.MaxEdge.dotProduct(dirs[i]); f32 objectmin = box.MinEdge.dotProduct(dirs[i]); f32 objectmax_old = oldbox.MaxEdge.dotProduct(dirs[i]); f32 objectmin_old = oldbox.MinEdge.dotProduct(dirs[i]); /* Check collision for the axis. Collision happens when object is going through a surface. */ bool negative_axis_collides = (nodemax > objectmin && nodemax <= objectmin_old + d && speed_f.dotProduct(dirs[i]) < 0); bool positive_axis_collides = (nodemin < objectmax && nodemin >= objectmax_old - d && speed_f.dotProduct(dirs[i]) > 0); bool main_axis_collides = negative_axis_collides || positive_axis_collides; /* Check overlap of object and node in other axes */ bool other_axes_overlap = true; for(u16 j=0; j<3; j++) { if(j == i) continue; f32 nodemax = nodebox.MaxEdge.dotProduct(dirs[j]); f32 nodemin = nodebox.MinEdge.dotProduct(dirs[j]); f32 objectmax = box.MaxEdge.dotProduct(dirs[j]); f32 objectmin = box.MinEdge.dotProduct(dirs[j]); if(!(nodemax - d > objectmin && nodemin + d < objectmax)) { other_axes_overlap = false; break; } } /* If this is a collision, revert the pos_f in the main direction. */ if(other_axes_overlap && main_axis_collides) { speed_f -= speed_f.dotProduct(dirs[i]) * dirs[i]; pos_f -= pos_f.dotProduct(dirs[i]) * dirs[i]; pos_f += oldpos_f.dotProduct(dirs[i]) * dirs[i]; } } } // xyz return result; } collisionMoveResult collisionMovePrecise(Map *map, IGameDef *gamedef, f32 pos_max_d, const core::aabbox3d<f32> &box_0, f32 dtime, v3f &pos_f, v3f &speed_f) { collisionMoveResult final_result; // Maximum time increment (for collision detection etc) // time = distance / speed f32 dtime_max_increment = pos_max_d / speed_f.getLength(); // Maximum time increment is 10ms or lower if(dtime_max_increment > 0.01) dtime_max_increment = 0.01; // Don't allow overly huge dtime if(dtime > 2.0) dtime = 2.0; f32 dtime_downcount = dtime; u32 loopcount = 0; do { loopcount++; f32 dtime_part; if(dtime_downcount > dtime_max_increment) { dtime_part = dtime_max_increment; dtime_downcount -= dtime_part; } else { dtime_part = dtime_downcount; /* Setting this to 0 (no -=dtime_part) disables an infinite loop when dtime_part is so small that dtime_downcount -= dtime_part does nothing */ dtime_downcount = 0; } collisionMoveResult result = collisionMoveSimple(map, gamedef, pos_max_d, box_0, dtime_part, pos_f, speed_f); if(result.touching_ground) final_result.touching_ground = true; } while(dtime_downcount > 0.001); return final_result; }