diff --git a/source/src/serverevents.h b/source/src/serverevents.h index a2e1fa3c..6837b19c 100644 --- a/source/src/serverevents.h +++ b/source/src/serverevents.h @@ -114,6 +114,15 @@ void processevent(client *c, reloadevent &e) gs.ammo[e.gun] -= numbullets; int wait = e.millis - gs.lastshot; + /* + // actually the clients sends this by itself, but sanity checks should be made!! + // does this state get reset on spawn etc? + if(gs.scoped) // the state of this needs to be verified in a number of places! (flowtron:2010jul05) + { + gs.scoped = false; + sendf(-1, 1, "ri3", SV_SCOPE, c->clientnum, gs.scoped); + } + */ sendf(-1, 1, "ri3", SV_RELOAD, c->clientnum, e.gun); if(gs.gunwait[e.gun] && wait SCOPESETTLETIME ? 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::onselecting() { weapon::onselecting(); scoped = false; addmsg(SV_SCOPE, "ri2", lastmillis, 0); } +void sniperrifle::ondeselecting() { scoped = false; addmsg(SV_SCOPE, "ri2", lastmillis, 0); } +void sniperrifle::onownerdies() { scoped = false; addmsg(SV_SCOPE, "ri2", lastmillis, 0); } void sniperrifle::renderhudmodel() { if(!scoped) weapon::renderhudmodel(); } void sniperrifle::renderaimhelp(bool teamwarning)