Overviewmap 2 tutorial

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论Overviewmap 2 tutorial
发帖 回复
正序阅读 最近浏览的帖子最近浏览的版块
1个回复

Overviewmap 2 tutorial

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-25 0
1.) the client and the opengl screencoordinates are inverted in the y direction.

i fixed it like this: Code:

int cOverviewmap::clientopenglcalc(int number) // y axis correction
{
return (ScreenInfo.iHeight - number);
}

2.)we have to restore the viewport....

so basicly all you have to do is: Code:

glViewport(cvar.radar_x,clientopenglcalc(cvar.radar_y)-cvar.radar_size,cvar.radar_size,cvar.radar_size); // viewport is made here

// Render your ovmap
overview_redraw();

// we was using another viewport, this sets it back.
glViewport(0,0,ScreenInfo.iWidth,ScreenInfo.iHeight);

and here is the fixed radar draw function: Code:

void cOverviewmap::CalculateRadarPoint(float* origin, int * screenx, int * screeny)
{
float aim [3],newaim [3];

aim[0] = origin[0] - me.ent->origin[0];
aim[1] = origin[1] - me.ent->origin[1];
aim[2] = origin[2] - me.ent->origin[2];

VecRotateZ(aim, -mainViewAngles[1], newaim);

switch((int)cvar.radar)
{
case 2:
{
*screenx = (ScreenInfo.iWidth /2) - int( newaim[1]/cvar.zoom * m_OverviewData.zoom);
*screeny = (ScreenInfo.iHeight/2) - int( newaim[0]/cvar.zoom * m_OverviewData.zoom);
break;
}
case 3:
{
*screenx = (cvar.radar_x + (cvar.radar_size /2)) - int( newaim[1]/cvar.zoom * m_OverviewData.zoom);
*screeny = (cvar.radar_y + (cvar.radar_size /2)) - int( newaim[0]/cvar.zoom * m_OverviewData.zoom);
break;
}
default:
{
*screenx = (cvar.radar_x) - int( newaim[1]/cvar.zoom * m_OverviewData.zoom);
*screeny = (cvar.radar_y) - int( newaim[0]/cvar.zoom * m_OverviewData.zoom);
break;
}
}
}

密码被盗,请联系cscheat取回
maliukao

ZxID:1268376

等级: 上士
举报 只看该作者 沙发   发表于: 2007-10-13 0
ffffffffff
« 返回列表
发帖 回复