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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user