-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding PhysicsObj Set* methods (#652)
* Adding PhysicsObj Set* methods * Renaming moved file * Adding get_* methods to PhysicsObj
- Loading branch information
1 parent
bc5b499
commit bab32fb
Showing
23 changed files
with
697 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,10 @@ public void set_heading(float degrees) | |
{ | ||
|
||
} | ||
|
||
public double get_heading() | ||
{ | ||
return -1; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,10 @@ public AnimFrame GetCurrAnimFrame() | |
{ | ||
return null; | ||
} | ||
|
||
public int GetCurrFrameNumber() | ||
{ | ||
return -1; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,9 @@ namespace ACE.Server.Physics.Common | |
{ | ||
public class ObjectMaint | ||
{ | ||
public void GotoLostCell(int cellID) | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
|
||
namespace ACE.Server.Physics.Common | ||
{ | ||
// probably should be moved outside the physics namespace | ||
// important class, ensure unit tests pass for this | ||
public class Random | ||
{ | ||
public static System.Random RNG; | ||
|
||
static Random() | ||
{ | ||
RNG = new System.Random(); | ||
} | ||
|
||
/// <summary> | ||
/// Returns a random number between min and max | ||
/// </summary> | ||
public static float RollDice(float min, float max) | ||
{ | ||
// todo: implement exactly the way AC handles it | ||
// inclusive/exclusive? | ||
return (float)(RNG.NextDouble() * (max - min) + min); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace ACE.Server.Physics.Hooks | ||
{ | ||
public class FPHook: PhysicsObjHook | ||
{ | ||
public float StartValue; | ||
public float EndValue; | ||
|
||
public FPHook(HookType type, double timeCreated, double delta, float startValue, float endValue, object userData) | ||
{ | ||
HookType = type; | ||
TimeCreated = timeCreated; | ||
InterpolationTime = delta; | ||
UserData = userData; | ||
StartValue = startValue; | ||
EndValue = endValue; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
|
||
namespace ACE.Server.Physics.Hooks | ||
{ | ||
[Flags] | ||
public enum HookType | ||
{ | ||
Setup = 0x1, | ||
MotionTable = 0x2, | ||
Velocity = 0x4, | ||
Acceleration = 0x8, | ||
Omega = 0x10, | ||
Parent = 0x20, | ||
Children = 0x40, | ||
ObjScale = 0x80, | ||
Friction = 0x100, | ||
Elasticity = 0x200, | ||
Timestamps = 0x400, | ||
Stable = 0x800, | ||
PETable = 0x1000, | ||
DefaultScript = 0x2000, | ||
DefaultScriptIntensity = 0x4000, | ||
Position = 0x8000, | ||
Movement = 0x10000, | ||
AnimFrameID = 0x20000, | ||
Translucency = 0x40000, | ||
}; | ||
public class PhysicsObjHook | ||
{ | ||
public HookType HookType; | ||
public double TimeCreated; | ||
public double InterpolationTime; | ||
public Object UserData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Numerics; | ||
|
||
namespace ACE.Server.Physics.Hooks | ||
{ | ||
public class VectorHook: PhysicsObjHook | ||
{ | ||
public Vector3 Start; | ||
public Vector3 End; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.