grenade launcher, crate: fix PictureTransformation

For the first, loading and shooting would reset it..
shapetextures
David Dormagen 2015-12-25 20:19:48 +01:00
parent 5ffc97f2f0
commit 802c85c8f8
2 changed files with 5 additions and 3 deletions

View File

@ -59,7 +59,7 @@ private func Close()
protected func Definition(def)
{
SetProperty("PictureTransformation", Trans_Mul(Trans_Translate(0,-3000,-5000), Trans_Rotate(-30,1,0,0), Trans_Rotate(30,0,1,0), Trans_Translate(1000,1,0)),def);
def.PictureTransformation = Trans_Mul(Trans_Translate(-500, -1500, -3000), Trans_Rotate(-30,1,0,0), Trans_Rotate(30,0,1,0));
}
public func IsTool() { return true; }

View File

@ -106,7 +106,8 @@ func ControlUseStart(object clonk, int x, int y)
// Callback from the clonk when loading is finished
public func FinishedLoading(object clonk)
{
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(500,1000,-000),Trans_Rotate(130,0,1,0),Trans_Rotate(20,0,0,1)));
// Change picture to indicate being loaded.
this.PictureTransformation = Trans_Mul(Trans_Translate(-3000, 3000, 4000),Trans_Rotate(-45,0,0,1),Trans_Rotate(130,0,1,0));
loaded = true;
if(holding) clonk->StartAim(this);
return holding; // false means stop here and reset the clonk
@ -164,7 +165,8 @@ private func FireWeapon(object clonk, int angle)
shot->SetController(clonk->GetController());
loaded = false;
SetProperty("PictureTransformation",Trans_Mul(Trans_Translate(1500,0,-1500),Trans_Rotate(170,0,1,0),Trans_Rotate(30,0,0,1)));
// Reset transformation to indicate empty grenade launcher.
this.PictureTransformation = this.Prototype.PictureTransformation;
Sound("Objects::Weapons::Musket::GunShoot?");