Fix Rocketship wall damage flash misinterpreted as model scaling
This commit is contained in:
1 parent
b5ef5b8b64
commit
62e908e26d
13 files changed
+255
-21
No files matched your search
@@ -28,7 +28,7 @@ public sealed class Rocketship
|
||||
public Vector3 CameraTarget { get; private set; }
|
||||
public Vector3 CompanionRoot=>Root+RocketOrientation.Rotate(new(0,10,-25),Rotation);
|
||||
public bool FireVisible { get; private set; }
|
||||
public Vector3 ShapeScale { get; private set; }=Vector3.One;
|
||||
public Vector4 ImpactColor { get; private set; }=Vector4.One;
|
||||
public bool ImpactActive { get; private set; }
|
||||
public float ImpactTime { get; private set; }
|
||||
public int Contacts { get; private set; }
|
||||
@@ -65,7 +65,7 @@ public sealed class Rocketship
|
||||
body=new(Actor.SourceGam!.Position,Vector3.Zero,Vector3.Zero,Vector3.Zero);
|
||||
Rotation=Actor.SourceGam.Rotation;destination=Rotation;
|
||||
Steering=default;Maneuver=default;verticalCommand=previousBank=ImpactTime=0;
|
||||
ShapeScale=Vector3.One;Contacts=BodySteps=FrameSteps=InputSteps=0;
|
||||
ImpactColor=Vector4.One;Contacts=BodySteps=FrameSteps=InputSteps=0;
|
||||
Actor.BodyEnabled=Actor.Visible=false;
|
||||
}
|
||||
|
||||
@@ -113,8 +113,9 @@ public sealed class Rocketship
|
||||
{
|
||||
double time=(double)ImpactTime+seconds;
|
||||
ImpactTime=(float)time;
|
||||
if(time>1){ImpactActive=false;ShapeScale=Vector3.One;}
|
||||
else {float pulse=(float)((Math.Sin(time*20)+1)*.5);ShapeScale=new(1,pulse,pulse);}
|
||||
//43E78B..43E7A7 writes material+4C..58 RGBA, not model scale.
|
||||
if(time>1){ImpactActive=false;ImpactColor=Vector4.One;}
|
||||
else {float pulse=(float)((Math.Sin(time*20)+1)*.5);ImpactColor=new(1,pulse,pulse,1);}
|
||||
}
|
||||
SyncActor();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user