View Single Post
Old 10-11-14, 22:10   #995
Lwmte
Member
 
Lwmte's Avatar
 
Joined: Aug 2010
Posts: 1,810
Default

Quote:
Originally Posted by Gh0stBlade View Post
Anyway an interesting case of pushing blocks is when blocks are stacked ontop of each other. It looks like it doesn't work unfortunately. A good example of this is DECK.TR2 (SetLevel(10)).
Oh... This was actually expected, unfortunately... The reason is, original engines modified floordata for sector with pushable in it (and pushables themselves ignored floordata collison). In OpenTomb, there is no need in room heightmap modification, since any mesh can have "hard" collision. On the contrary, current push/pull method checks if Lara's position is valid ("flat") to next sector's height, and if not, refuses to make an action. There are two workarounds for this - check next sector flatness on the pushable's side, but this way we'll be able to push/pull from non-flat sectors (not sure if it should be considered a bug or feature). Another way is to check if there's a pushable right under Lara and subtract its height when comparing (but this method could be very tricky, as there could be many stacked pushables under Lara).

P.S.: I think that defining pushable for EACH entity in EACH level is too redundant - best way is to check specific entity IDs and assign "pushability" to them; also, note that TeslaRus made pushability a property of entity, rather than its function (as in original) - it means, you can assign pushability to entities with another function. Not sure if this is needed in original games, but it could be a nice trick for custom levels - like, you make animating pushable, then it triggers and does something else.

Last edited by Lwmte; 10-11-14 at 22:14.
Lwmte is offline   Reply With Quote