aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_steam/models
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2017-10-25 10:31:07 +0200
committerorwell96 <orwell@bleipb.de>2017-10-25 10:33:41 +0200
commitc67770833b772e438f81ac80f10f1c46bbeebcfa (patch)
tree446bdf2cf44f283dddfa8f52f2a3099b16b1cf64 /advtrains_train_steam/models
parentf228e2d30e0d712c6490fb84d4edfadeba8c4cd7 (diff)
downloadadvtrains-c67770833b772e438f81ac80f10f1c46bbeebcfa.tar.gz
advtrains-c67770833b772e438f81ac80f10f1c46bbeebcfa.tar.bz2
advtrains-c67770833b772e438f81ac80f10f1c46bbeebcfa.zip
Fix coupling and collisions in certain cases
If a train moved towards another train, and the other train's step was executed after the first one's, the trains did eventually not collide. Fix by moving the enter_node and collision check to step_b Also change some couple behavior
Diffstat (limited to 'advtrains_train_steam/models')
0 files changed, 0 insertions, 0 deletions
>, f32 pos_max_d, core::list<CollisionInfo> *collision_info); void move(f32 dtime, Map &map, f32 pos_max_d); void applyControl(float dtime); v3s16 getStandingNodePos(); private: // This is used for determining the sneaking range v3s16 m_sneak_node; // Whether the player is allowed to sneak bool m_sneak_node_exists; // Node below player, used to determine whether it has been removed, // and its old type v3s16 m_old_node_below; std::string m_old_node_below_type; // Whether recalculation of the sneak node is needed bool m_need_to_get_new_sneak_node; bool m_can_jump; }; #endif