

If( intersectcylinder(from, to, bottom, top, d-> radius, dist) ) // FIXME if using 2 hitboxesīool intersect(entity *e, const vec &from, const vec &to, vec *end)
#ASSAULTCUBE WEAPONS MOD#
mid.mul(h*0.5).add(bottom) // this mod divides the hitbox in 2 Vec bottom(d-> o), top( sinf(y)*c, - cosf(y)*c, sinf(p)) /*, mid(top) */ įloat h = d-> eyeheight /*+ d->aboveeye */ // this mod makes the shots pass over the shoulders If( intersectsphere(from, to, d-> head, HEADSIZE, dist)) If(k + dd - 2*md + dist*( 2*(mn-nd) + dist*nn) > 0) return false If(inside = 0 & dist dd & md + nd > dd) return false Static inline bool intersectsphere( const vec &from, const vec &to, vec center, float radius, float &dist)

Static inline bool intersectbox( const vec &o, const vec &rad, const vec &from, const vec &to, vec *end) // if lineseg hits entity bounding box 0f wrange = SGCMrange break ĭefault: base = SGCCbase / 100. 0f wrange = SGCOrange break Ĭase 1: base = SGCMbase / 100. Void createrays( const vec &from, const vec &to) // create random spread of rays for the shotgunĬase 0: base = SGCObase / 100. Int ds // damage flag: 0:outer, 1:medium, 2:center

VARP(akimboendaction, 0, 3, 3) // 0: switch to knife, 1: stay with pistol (if has ammo), 2: switch to grenade (if possible), 3: switch to primary (if has ammo) - all fallback to previous one w/o ammo for target weapon.cpp: all shooting and effects code
