simplified crosshair setup - only default, teammate, scope crosshairs

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3457 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-08 21:02:47 +00:00
parent c86bec4250
commit 6f98fe644e
7 changed files with 52 additions and 25 deletions
+7 -4
View File
@@ -643,7 +643,7 @@ void weapon::onselecting()
}
void weapon::renderhudmodel() { renderhudmodel(owner->lastaction); }
void weapon::renderaimhelp(bool teamwarning) { drawcrosshair(owner, teamwarning, type); }
void weapon::renderaimhelp(bool teamwarning) { drawcrosshair(owner, teamwarning ? CROSSHAIR_TEAMMATE : CROSSHAIR_DEFAULT); }
int weapon::dynspread() { return info.spread; }
float weapon::dynrecoil() { return info.recoil; }
bool weapon::selectable() { return this != owner->weaponsel && owner->state == CS_ALIVE && !owner->weaponchanging; }
@@ -1029,9 +1029,12 @@ void sniperrifle::renderhudmodel() { if(!scoped) weapon::renderhudmodel(); }
void sniperrifle::renderaimhelp(bool teamwarning)
{
if(scoped) drawscope();
/*if(scoped || teamwarning) */
drawcrosshair(owner, teamwarning, type, NULL, 24.0f);
if(scoped)
{
drawscope();
drawcrosshair(owner, teamwarning ? CROSSHAIR_TEAMMATE : CROSSHAIR_SCOPE, NULL, 24.0f);
}
else weapon::renderaimhelp(teamwarning);
}
void sniperrifle::setscope(bool enable) { if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE) scoped = enable; }