Opened 6 months ago

Last modified 3 weeks ago

#13177 new defect

TWINE: Tank is stuck

Reported by: vvs- Owned by: mgerhardy
Priority: high Component: Engine: TwinE
Version: Keywords:
Cc: Game: Little Big Adventure

Description

In Hamalayi Range scene 63 after capturing tank it can't leave this scene and become stuck. This makes it impossible to continue without cheating.

You can use the same savegame as in #13168

Attachments (3)

scummvm-lba-cd-00000.png (312.4 KB ) - added by vvs- 6 months ago.
script1.2.log (74.7 KB ) - added by mgerhardy 6 months ago.
added script dump for actor 1 (the tank)
Bildschirmfoto vom 2022-05-29 16-03-49.png (50.6 KB ) - added by mgerhardy 5 weeks ago.

Download all attachments as: .zip

Change History (18)

by vvs-, 6 months ago

Attachment: scummvm-lba-cd-00000.png added

comment:1 by mgerhardy, 6 months ago

Priority: normalhigh

by mgerhardy, 6 months ago

Attachment: script1.2.log added

added script dump for actor 1 (the tank)

comment:2 by mgerhardy, 6 months ago

Priority: highblocker

comment:3 by mgerhardy, 6 months ago

error must be here: Animations::processActorAnimations the if block with actor->_staticFlags.bComputeCollisionWithBricks

comment:4 by mgerhardy, 6 months ago

The problem is in the lines:

checkActorCollisionWithBricks(actor->_boudingBox.mins.x, actor->_boudingBox.mins.y, actor->_boudingBox.mins.z, 1);
checkActorCollisionWithBricks(actor->_boudingBox.maxs.x, actor->_boudingBox.mins.y, actor->_boudingBox.mins.z, 2);
checkActorCollisionWithBricks(actor->_boudingBox.maxs.x, actor->_boudingBox.mins.y, actor->_boudingBox.maxs.z, 4);
checkActorCollisionWithBricks(actor->_boudingBox.mins.x, actor->_boudingBox.mins.y, actor->_boudingBox.maxs.z, 8);

comment:5 by mgerhardy, 6 months ago

should be fixed in master with 3d5d5317a88b8e96b220ad65b0d930c93dd024bb

comment:6 by mgerhardy, 6 months ago

Owner: set to mgerhardy
Resolution: fixed
Status: newclosed

comment:7 by mgerhardy, 5 weeks ago

Resolution: fixed
Status: closednew

This fix introduced another issue in collision in e.g. scene 35 (the sokoban scene) - you can now move crates into the walls

comment:8 by mgerhardy, 5 weeks ago

Script of the tank (actor 1)

COMPORTMENT main 
  IF FLAG_GAME 78 == 1 
    SUICIDE 
  ELSE 
    SET_COMPORTMENT 1 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 1 
  ONEIF HIT_BY == 7 
    SET_TRACK 1 
    SET_COMPORTMENT_OBJ 8 2 
  ENDIF 
END_COMPORTMENT 
END

Script of the hero (actor 0)

COMPORTMENT main 
  IF FLAG_GAME 74 == 1 
    SET_COMPORTMENT 1 
  ELSE 
    SET_COMPORTMENT 3 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 1 
  ONEIF LIFE_POINT_OBJ 7 == 0 
    IF FLAG_GAME 78 == 0 
      SET_FLAG_GAME 73 0 
      SET_FLAG_GAME 72 0 
      SET_FLAG_GAME 74 0 
      SET_FLAG_GAME 75 1 
    ENDIF 
  ENDIF 
  IF COL == 1 
    IF CURRENT_TRACK_OBJ 7 == 107 
      SET_DIRMODE NO_MOVE 
      INVISIBLE 1 
      ANIM 0 
      SET_BEHAVIOUR NORMAL 
      SET_TRACK 0 
      CAM_FOLLOW 1 
      SET_TRACK_OBJ 1 0 
      SET_COMPORTMENT 2 
    ENDIF 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 2 
  IF CURRENT_TRACK_OBJ 1 == 100 
    SET_FLAG_GAME 78 1 
    IF FLAG_GAME 6 == 1 
      BODY 0 
    ELSE 
      BODY 1 
    ENDIF 
    POS_POINT 15 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 3 
END_COMPORTMENT 
END

Script of the helper (actor 7)

COMPORTMENT main 
  OR_IF FLAG_GAME 77 == 1 
  OR_IF FLAG_GAME 89 == 0 
  IF FLAG_GAME 74 == 0 
    SUICIDE 
  ELSE 
    SET_COMPORTMENT 1 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 1 
  IF ZONE_OBJ 0 == 0 
    IF ZONE == 0 
      SET_FLAG_GAME 73 1 
      SET_FLAG_GAME 72 0 
      SET_FLAG_GAME 74 0 
    ENDIF 
  ELSE 
    IF ZONE_OBJ 0 == 1 
      IF ZONE == 1 
        SET_FLAG_GAME 73 0 
        SET_FLAG_GAME 72 0 
        SET_FLAG_GAME 74 0 
      ENDIF 
    ELSE 
      SET_FLAG_GAME 73 0 
      SET_FLAG_GAME 72 0 
      SET_FLAG_GAME 74 1 
    ENDIF 
  ENDIF 
  SWIF DISTANCE 0 > 2500 
    SET_DIRMODE FOLLOW 0 
    ANIM 27 
  ENDIF 
  SWIF DISTANCE 0 < 2000 
    IF DISTANCE 4 < 6000 
      SET_DIRMODE FOLLOW 4 
      ANIM 144 
      SET_COMPORTMENT 2 
    ELSE 
      ANIM 0 
    ENDIF 
  ENDIF 
  IF FLAG_GAME 71 == 1 
    IF LIFE_POINT_OBJ 7 < 50 
      SET_LIFE_POINT_OBJ 7 50 
    ENDIF 
  ENDIF 
  ONEIF LIFE_POINT_OBJ 4 == 0 
    SET_DIRMODE NO_MOVE 
    IF LIFE_POINT_OBJ 2 > 0 
      IF ZONE == 0 
        SET_TRACK 10 
      ELSE 
        SET_TRACK 0 
      ENDIF 
    ENDIF 
    SET_COMPORTMENT 3 
  ENDIF 
  ONEIF ZONE == 3 
    IF FLAG_GAME 78 == 0 
      SET_DIRMODE NO_MOVE 
      IF LIFE_POINT_OBJ 5 > 0 
        SET_TRACK 3 
      ELSE 
        IF LIFE_POINT_OBJ 6 > 0 
          SET_TRACK 4 
        ENDIF 
      ENDIF 
      SET_COMPORTMENT 4 
    ENDIF 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 2 
  OR_IF DISTANCE 0 > 3000 
  IF LIFE_POINT_OBJ 4 == 0 
    SET_DIRMODE FOLLOW 0 
    ANIM 27 
    SET_COMPORTMENT 1 
  ENDIF 
  IF FLAG_GAME 71 == 1 
    IF LIFE_POINT_OBJ 7 < 50 
      SET_LIFE_POINT_OBJ 7 50 
    ENDIF 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 3 
  ONEIF CURRENT_TRACK == 100 
    SET_DIRMODE FOLLOW 2 
  ENDIF 
  ONEIF CURRENT_TRACK == 101 
    SET_DIRMODE FOLLOW 3 
  ENDIF 
  ONEIF CURRENT_TRACK == 110 
    SET_TRACK 0 
  ENDIF 
  ONEIF LIFE_POINT_OBJ 2 == 0 
    IF LIFE_POINT_OBJ 3 > 0 
      SET_DIRMODE NO_MOVE 
      SET_TRACK 1 
    ENDIF 
  ENDIF 
  IF LIFE_POINT_OBJ 2 == 0 
    IF LIFE_POINT_OBJ 3 == 0 
      SET_DIRMODE FOLLOW 0 
      SET_TRACK 2 
      SET_COMPORTMENT 1 
    ENDIF 
  ENDIF 
END_COMPORTMENT 
COMPORTMENT 4 
  ONEIF CURRENT_TRACK == 103 
    SET_DIRMODE FOLLOW 5 
  ENDIF 
  ONEIF CURRENT_TRACK == 104 
    SET_DIRMODE FOLLOW 6 
  ENDIF 
  ONEIF CURRENT_TRACK == 105 
    SET_TRACK_OBJ 1 2 
    MESSAGE 2 
    SET_DIRMODE FOLLOW 1 
  ENDIF 
  ONEIF CURRENT_TRACK == 108 
    EXPLODE_OBJ 1 
    EXPLODE_OBJ 1 
    EXPLODE_OBJ 1 
    EXPLODE_OBJ 1 
    EXPLODE_OBJ 1 
  ENDIF 
  ONEIF LIFE_POINT_OBJ 5 == 0 
    SET_DIRMODE NO_MOVE 
    IF LIFE_POINT_OBJ 6 > 0 
      SET_TRACK 4 
    ENDIF 
  ENDIF 
  IF LIFE_POINT_OBJ 5 == 0 
    ONEIF LIFE_POINT_OBJ 6 == 0 
      SET_DIRMODE NO_MOVE 
      SET_TRACK 5 
    ENDIF 
  ENDIF 
  ONEIF CURRENT_TRACK == 106 
    SET_DIRMODE NO_MOVE 
  ENDIF 
  ONEIF CURRENT_TRACK == 107 
    SET_DIRMODE FOLLOW 1 
  ENDIF 
  ONEIF COL == 1 
    SUICIDE 
  ENDIF 
END_COMPORTMENT 
END 
Last edited 5 weeks ago by mgerhardy (previous) (diff)

comment:9 by mgerhardy, 5 weeks ago

get the helper with debug commands

set_game_flag 77 0
set_game_flag 89 1
set_game_flag 74 1
change_scene 63
toggle_god_mode

force the track 2 for actor 1 (the tank) to start without playing the scene

change_scene 63
scene_actor 1
toggle_free_camera
set_track_obj 1 2
Last edited 5 weeks ago by mgerhardy (previous) (diff)

comment:10 by mgerhardy, 4 weeks ago

found a revision that worked for both test cases: 0a4460ba343fb394f2385559bab90b404140dd25

Last edited 4 weeks ago by mgerhardy (previous) (diff)

comment:12 by mgerhardy, 4 weeks ago

comment:13 by lotharsm, 4 weeks ago

Priority: blockerhigh

comment:14 by mgerhardy, 4 weeks ago

The tank is hanging on brickShape ShapeType::kStairsBottomLeft

comment:15 by vvs-, 3 weeks ago

Hmm... Now that you've said this, I remember that there is a bug where Twinsen would get stuck in a corners (doors, bricks). That happens quite often.

Note: See TracTickets for help on using tickets.