aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAge
...
* Add selectionbox_color, crosshair_color, and crosshair_alpha optionsEsteban I. Ruiz Moreno2012-12-27
* Fix 'longjmp causes uninitialized stack frame' in cURLPilzAdam2012-12-26
* Initialize all member variables of LuaEntitySAOPerttu Ahola2012-12-23
* Fixed two typos in wireshark lua file.DannyDark2012-12-23
* Fix keycodes (#325)Ilya Zhuravlev2012-12-23
* Prefer shared cURL library instead of the static one.Ilya Zhuravlev2012-12-21
* Fixed u64 ambiguous symbol errorDannyDark2012-12-20
* Tweak CMake files for cURLsfan52012-12-18
* Add ability to change the itemstack in placenode callbacksPilzAdam2012-12-17
* Fix falling damage when not flyingPilzAdam2012-12-17
* Make m_media_fetch_threads to contain MediaFetchThread* instead of MediaFetch...Ilya Zhuravlev2012-12-17
* Fix hypen used as minus sign (manpages), fix spelling error (server.cpp)Ilya Zhuravlev2012-12-17
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
* Fix item entity's collision with nodeboxesjordan4ibanez2012-12-15
* Dont sneak while flyingPilzAdam2012-12-11
* Only fly through walls in noclip mode wich requires the noclip privilegePilzAdam2012-12-11
* Update READMEIlya Zhuravlev2012-12-07
* Bump version to 0.4.4Perttu Ahola2012-12-06
* Update GUI textsPerttu Ahola2012-12-06
* draw gui later. this fixes the hotbar disappearing while rendering to texture.Jürgen Doser2012-12-06
* fix screen flickering black when rendering to textureJürgen Doser2012-12-06
* Set proper field background colors in Irrlicht 1.8Perttu Ahola2012-12-06
* Raise default maximum render distance to 240Perttu Ahola2012-12-06
* Fix automagic render distance tunerPerttu Ahola2012-12-06
* Add #include guards to base64.hMatthew I2012-12-03
* Try to add a bit of topside brightness when not using shadersPerttu Ahola2012-12-02
* Tweak shader randomly a bitPerttu Ahola2012-12-02
* Default to preload_item_visuals=truePerttu Ahola2012-12-02
* Don't send player position from client to server if the player hasn't movedMirceaKitsune2012-12-02
* Fix minetest.get_node_drops(). It should always return list of item names, no...Ilya Zhuravlev2012-12-02
* Smooth day-night transitionsPerttu Ahola2012-12-02
* Const-correct util/serialize.hPerttu Ahola2012-12-02
* Handle day-night transition in shader and make light sources brighter when sh...Perttu Ahola2012-12-02
* Get rid of jordan4ibanez's insane digging animation speedPerttu Ahola2012-12-02
* Fix tile MaterialType to make sense and make lava surface be shader'd lower l...Perttu Ahola2012-12-02
* Install shaders properlyPerttu Ahola2012-12-02
* Remove accidental vim swap filePerttu Ahola2012-12-02
* Add enable_shaders to minetest.conf.examplePerttu Ahola2012-12-02
* Add checkboxes for shaders and on-demand item visual generationobneq2012-12-02
* Implement a global shader parameter passing system and useful shadersPerttu Ahola2012-12-02
* ShaderSource and silly example shadersKahrl2012-12-02
* Add setting preload_item_visualsPerttu Ahola2012-12-02
* On-demand item meshes and texturesPerttu Ahola2012-12-02
* Modify some client log message levelsPerttu Ahola2012-12-02
* New elements in formspec, item_image and item_image_button.RealBadAngel2012-12-01
* Only check attachment for nodes with group attached_nodePilzAdam2012-12-01
* Add the group attached_nodePilzAdam2012-12-01
* Merge support for anaglyph stereoPilzAdam2012-12-01
|\
| * Add anaglyph settings to minetest.conf.exampleMirceaKitsune2012-11-13
| * Default anaglyph to 0.1MirceaKitsune2012-11-13
opt">+ 1; z++) for(s16 x = oldpos_i.X - 1; x <= oldpos_i.X + 1; x++) { try{ // Object collides into walkable nodes MapNode n = map->getNode(v3s16(x,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; }