Open hendrikbez opened 9 months ago
the room is blacktooth19.xml by the way
by the way, can you @hendrikbez pass blacktooth18.xml without cheats? it looks like the diver robot there doesn't carry the thing above it (which is roughly related to #66 )
the following patch fixes the diver robot ... and the game mechanics at all
--- a/source/activities/Moving.cpp
+++ b/source/activities/Moving.cpp
@@ -154,12 +154,17 @@ bool Moving::move( behaviors::Behavior* behavior, Activity* activity, bool itFal
// if the item can move freely
if ( item->whichItemClass() == "free item" || item->whichItemClass() == "avatar item" )
{
- if ( /* not moving up or down, to not change the activity of items on elevator */
- ( *activity != activities::Activity::GoingUp && *activity != activities::Activity::GoingDown )
- || /* there’s a collision */ ! moved )
+ bool onElevator = ( *activity == activities::Activity::GoingUp || *activity == activities::Activity::GoingDown );
+ if ( /* don’t affect activity of items on elevator */ ! onElevator )
{
- // move adjacent items
- PropagateActivity::toAdjacentItems( *item, toItemsNearby );
+ if ( /* there’s a collision */ ! moved ) {
+ // move adjacent items
+ PropagateActivity::toAdjacentItems( *item, toItemsNearby );
+ }
+ else {
+ // maybe there’s something above
+ PropagateActivity::toItemsAbove( *item, toItemsNearby );
+ }
}
}
but... not including the problem mentioned in the original post 😥
Thank You
Hendrik
it really is quite unphysical, and I'm unsure how to solve it....
maybe make a conveyor drag things only when it takes at least a quarter (a third??) of the conveyor's width?..
... and if you wish to play within a room from the previous message, here's the patch
add-some-stuff-to-the-heels-initial-room.patch.zip
--- a/gamedata/map/blacktooth23heels.xml
+++ b/gamedata/map/blacktooth23heels.xml
@@ -62,6 +62,40 @@
</wall>
</walls>
<items>
+ <item x="5" y="3" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="5" y="4" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="6" y="3" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="6" y="4" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="7" y="3" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="7" y="4" z="0">
+ <kind>brick1</kind>
+ <class>griditem</class>
+ </item>
+ <item x="7" y="3" z="1">
+ <kind>stool</kind>
+ <behavior>behavior of thing able to move by pushing</behavior>
+ <class>freeitem</class>
+ </item>
+ <item x="7" y="4" z="1">
+ <kind>stool</kind>
+ <behavior>behavior of thing able to move by pushing</behavior>
+ <class>freeitem</class>
+ </item>
<item x="8" y="0" z="0">
<kind>vulcano</kind>
<orientation>none</orientation>
maybe make a conveyor drag things only when it takes at least a quarter (a third??) of the conveyor's width?..
I really thought about the complete redesign of all these activities and movements. So that it’s not “activity of moving southwest” but a velocity vector, which can be summed (or even premultiplied and summed) with another such vector, giving a complex motion.
Motion2D and Motion3D aren’t used yet in faaac400ef42dd64ba8d8c77e40121ede8b7c17b, but it looks like a nice go, isn’t it?
When I am on the wall, and start moving the items, it goes down before it reach the conveyer belt