Fix size calculation on laser shot entity - closes #104

Need to set collisionRadius on entity to get render pass culling to work
May be a few other purely visual entities that have similar problems.
This commit is contained in:
cim 2014-08-03 21:28:22 +01:00
parent e40fc68afc
commit fc591c9895

View File

@ -99,7 +99,7 @@ static OOTexture *sShotTexture2 = nil;
[self setOrientation:quaternion_multiply(q,q0)]; [self setOrientation:quaternion_multiply(q,q0)];
[self setOwner:ship]; [self setOwner:ship];
_range = [srcEntity weaponRange]; [self setRange:[srcEntity weaponRange]];
_lifetime = kLaserDuration; _lifetime = kLaserDuration;
_color[0] = kLaserRed/3.0; _color[0] = kLaserRed/3.0;
@ -146,6 +146,7 @@ static OOTexture *sShotTexture2 = nil;
- (void) setRange:(GLfloat)range - (void) setRange:(GLfloat)range
{ {
_range = range; _range = range;
[self setCollisionRadius:range];
} }