MCPcopy Create free account
hub / github.com/assaultcube/AC / setscope

Method setscope

source/src/weapon.cpp:1535–1543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1533}
1534
1535void sniperrifle::setscope(bool enable)
1536{
1537 if(this == owner->weaponsel && !reloading && owner->state == CS_ALIVE)
1538 {
1539 if(scoped == false && enable == true) scoped_since = lastmillis;
1540 if(enable != scoped) owner->scoping = enable;
1541 scoped = enable;
1542 }
1543}
1544
1545// carbine
1546

Callers 2

setscopeFunction · 0.80
CheckScopeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected