git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1815 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-04-20 20:10:37 +00:00
parent e61b76b398
commit c46ad44ff7
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -289,12 +289,12 @@ void rendercursor(int x, int y, int w)
VARP(fov, 90, 100, 120);
VARP(scopefov, 5, 50, 50);
VARP(spectfov, 5, 50, 120);
VARP(spectfov, 5, 120, 120);
float dynfov()
{
if(player1->weaponsel->type == GUN_SNIPER && ((sniperrifle *)player1->weaponsel)->scoped) return (float)scopefov;
else if(player1->state == CS_SPECTATE) return (float)spectfov;
else if(player1->isspectating()) return (float)spectfov;
else return (float)fov;
}
+1
View File
@@ -850,6 +850,7 @@ 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; }
void sniperrifle::ondeselecting() { scoped = false; }
void sniperrifle::onownerdies() { scoped = false; }
void sniperrifle::renderhudmodel() { if(!scoped) weapon::renderhudmodel(); }
void sniperrifle::renderaimhelp(bool teamwarning) { if(scoped) drawscope(); if(teamwarning) drawcrosshair(teamwarning); }
+1 -1
View File
@@ -101,9 +101,9 @@ struct sniperrifle : gun
bool selectable();
void onselecting();
void ondeselecting();
void onownerdies();
void renderhudmodel();
void renderaimhelp(bool teamwarning);
void setscope(bool enable);
};