RTS: Trail
This commit is contained in:
@@ -22,6 +22,7 @@ MAP_Actor :: struct
|
||||
state: int
|
||||
open_paths: Array(MAP_Path)
|
||||
close_paths: Array(MAP_Path)
|
||||
tiles_visited: Array(V2I)
|
||||
history: Array(MAP_Path)
|
||||
|
||||
MAP_Path :: struct
|
||||
@@ -127,6 +128,8 @@ MAP_MoveTowardsTarget :: (s: *MAP_Actor)
|
||||
*tile &= ~MAP_TILE_ACTOR_IS_STANDING
|
||||
Assert((*tile & MAP_TILE_ACTOR_IS_STANDING) == 0)
|
||||
|
||||
Add(&s.tiles_visited, s.p)
|
||||
|
||||
step := s.history.data[s.history.len-2]
|
||||
s.p = step.p
|
||||
|
||||
|
||||
Reference in New Issue
Block a user