mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Fixes new game crash
This commit is contained in:
@@ -13,12 +13,10 @@ class Sprite_Hair < Sprite_Wearable
|
||||
crop_spritesheet(direction, current_frame, action)
|
||||
adjust_layer()
|
||||
set_sprite_position(@action, direction, current_frame)
|
||||
adjust_position_for_nonAnimated_hairstyles(current_frame)
|
||||
end
|
||||
|
||||
def crop_spritesheet(direction, current_frame, action)
|
||||
sprite_x = ((current_frame)) * @frameWidth
|
||||
sprite_x = 0 if @frameWidth == @wearableBitmap.width
|
||||
# Don't animate surf
|
||||
sprite_x = 0 if action == "surf"
|
||||
|
||||
@@ -26,10 +24,6 @@ class Sprite_Hair < Sprite_Wearable
|
||||
@sprite.src_rect.set(sprite_x, sprite_y, @frameWidth, @frameHeight)
|
||||
end
|
||||
|
||||
def adjust_position_for_nonAnimated_hairstyles(current_frame)
|
||||
return if @frameWidth != @wearableBitmap.width
|
||||
@sprite.y -= 2 if current_frame % 2 == 1
|
||||
end
|
||||
def set_sprite_position(action, direction, current_frame)
|
||||
@sprite.x = @player_sprite.x - @player_sprite.ox
|
||||
@sprite.y = @player_sprite.y - @player_sprite.oy
|
||||
|
||||
@@ -8,14 +8,15 @@ class Sprite_Player < Sprite_Character
|
||||
|
||||
hatFilename = ""
|
||||
hairFilename = ""
|
||||
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
|
||||
@hat = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,3)
|
||||
@hat2 = Sprite_Hat.new(self, hatFilename, @character_name, @viewport,2)
|
||||
@hair = Sprite_Hair.new(self, hairFilename, @character_name, @viewport)
|
||||
|
||||
@previous_skinTone = 0
|
||||
|
||||
@current_bitmap = nil
|
||||
@previous_action =nil
|
||||
echoln "init playa"
|
||||
getClothedPlayerSprite(true)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user