浏览代码

Fix 32 bits depth issues during combat.

Frank Zago 16 年之前
父节点
当前提交
bc506bbc77
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client/CCreatureAnimation.cpp

+ 1 - 1
client/CCreatureAnimation.cpp

@@ -294,7 +294,7 @@ inline void CCreatureAnimation::putPixel(
 {	
     if(palc!=0)
 	{
-		Uint8 * p = (Uint8*)dest->pixels + ftcp*3;
+		Uint8 * p = (Uint8*)dest->pixels + ftcp*dest->format->BytesPerPixel;
 		if(palc > 7) //normal color
 		{
 			p[0] = color.B;