reverted sniper test scenario

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3478 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-11-09 22:20:03 +00:00
parent 20e2346879
commit 2441b1ca63
3 changed files with 5 additions and 7 deletions
+3 -6
View File
@@ -1020,6 +1020,7 @@ bool sniperrifle::reload()
return r;
}
int sniperrifle::dynspread() { return scoped ? 1 : info.spread; }
float sniperrifle::dynrecoil() { return scoped ? info.recoil / 3 : info.recoil; }
bool sniperrifle::selectable() { return weapon::selectable() && !m_noprimary && this == owner->primweap; }
void sniperrifle::onselecting() { weapon::onselecting(); scoped = false; }
@@ -1029,12 +1030,8 @@ void sniperrifle::renderhudmodel() { if(!scoped) weapon::renderhudmodel(); }
void sniperrifle::renderaimhelp(bool teamwarning)
{
if(scoped)
{
drawscope();
drawcrosshair(owner, teamwarning ? CROSSHAIR_TEAMMATE : CROSSHAIR_SCOPE, NULL, 24.0f);
}
else weapon::renderaimhelp(teamwarning);
if(scoped) drawscope();
if(scoped || teamwarning) drawcrosshair(owner, teamwarning ? CROSSHAIR_TEAMMATE : CROSSHAIR_SCOPE, NULL, 24.0f);
}
void sniperrifle::setscope(bool enable) { if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE) scoped = enable; }