forked from Mirrors/openclonk
cannon: fix possible nil pointer access
In boomshire, the cannons are automatically filled with boompacks (and then fired). That means that there is no Clonk to be passed.objectmenu
parent
36489145b6
commit
9e563e6d8c
|
@ -249,7 +249,8 @@ protected func DoFire(object iammo, object clonk, int angle)
|
|||
iammo->SetR(r / angPrec);
|
||||
iammo->SetRDir(-4 + Random(9));
|
||||
iammo->LaunchProjectile(r, 17, Fire_Velocity, 0,0, angPrec);
|
||||
iammo->SetController(clonk->GetController());
|
||||
if (clonk)
|
||||
iammo->SetController(clonk->GetController());
|
||||
iammo->~Fuse();
|
||||
|
||||
//Particles
|
||||
|
|
Loading…
Reference in New Issue