Corrigindo o bug de novas sprites.
Client~Side
Procure pela Public Sub EditorNpc_BltSprite() e mude ela toda para:
Procure pela Public Sub EditorNpc_BltSprite() e mude ela toda para:
Código:
Public Sub EditorNpc_BltSprite()
Dim Sprite As Long
Dim sRECT As DxVBLib.RECT
Dim dRECT As DxVBLib.RECT
Dim width As Long, height As Long
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Sprite = frmEditor_NPC.scrlSprite.Value
If Sprite < 1 Or Sprite > NumCharacters Then
frmEditor_NPC.picSprite.Cls
Exit Sub
End If
CharacterTimer(Sprite) = GetTickCount + SurfaceTimerMax
If DDS_Character(Sprite) Is Nothing Then
Call InitDDSurf("Characters\" & Sprite, DDSD_Character(Sprite), DDS_Character(Sprite))
End If
width = DDSD_Character(Sprite).lWidth / 4
height = DDSD_Character(Sprite).lHeight / 4
sRECT.top = 0
sRECT.Bottom = sRECT.top + height
sRECT.Left = 0
sRECT.Right = sRECT.Left + width
dRECT.top = 0
dRECT.Bottom = height
dRECT.Left = 0
dRECT.Right = width
Call Engine_BltToDC(DDS_Character(Sprite), sRECT, dRECT, frmEditor_NPC.picSprite)
' Error handler
Exit Sub
errorhandler:
HandleError "EditorNpc_BltSprite", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub