Character code bugfixes

This commit is contained in:
Mathew Velasquez 2016-04-26 17:06:48 -04:00
parent 0c05d76a94
commit 3a2f722786
3 changed files with 5 additions and 11 deletions

View file

@ -45,7 +45,6 @@ class Game_Character
@through = false @through = false
@animation_id = 0 @animation_id = 0
@transparent = false @transparent = false
@original_direction = 2
@original_pattern = 0 @original_pattern = 0
@move_type = 0 @move_type = 0
@move_speed = 4 @move_speed = 4

View file

@ -161,7 +161,7 @@ class Game_Character
abs_sx = sx > 0 ? sx : -sx abs_sx = sx > 0 ? sx : -sx
abs_sy = sy > 0 ? sy : -sy abs_sy = sy > 0 ? sy : -sy
# If separated by 20 or more tiles matching up horizontally and vertically # If separated by 20 or more tiles matching up horizontally and vertically
if sx + sy >= 20 if abs_sx + abs_sy >= 20
# Random # Random
move_random move_random
return return
@ -326,11 +326,8 @@ class Game_Character
@tile_id = 0 @tile_id = 0
@character_name = command.parameters[0] @character_name = command.parameters[0]
@character_hue = command.parameters[1] @character_hue = command.parameters[1]
if @original_direction != command.parameters[2] @direction = command.parameters[2]
@direction = command.parameters[2] @prelock_direction = 0
@original_direction = @direction
@prelock_direction = 0
end
if @original_pattern != command.parameters[3] if @original_pattern != command.parameters[3]
@pattern = command.parameters[3] @pattern = command.parameters[3]
@original_pattern = @pattern @original_pattern = @pattern
@ -342,7 +339,7 @@ class Game_Character
when 44 # Play SE when 44 # Play SE
$game_system.se_play(command.parameters[0]) $game_system.se_play(command.parameters[0])
when 45 # Script when 45 # Script
result = eval(command.parameters[0]) eval(command.parameters[0])
end end
@move_route_index += 1 @move_route_index += 1
end end

View file

@ -11,8 +11,6 @@ class Game_Character
# turn_enabled : a flag permits direction change on that spot # turn_enabled : a flag permits direction change on that spot
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
def move_down(turn_enabled = true) def move_down(turn_enabled = true)
# Only emit footprint if already facing down
emit = @direction == 2
# Turn down # Turn down
if turn_enabled if turn_enabled
turn_down turn_down
@ -22,7 +20,7 @@ class Game_Character
# Turn down # Turn down
turn_down turn_down
# Emit footprint # Emit footprint
emit_footprint(2) if emit emit_footprint(2)
# Update coordinates # Update coordinates
@y += 1 @y += 1
# Increase steps # Increase steps