-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
World fix and fireball test #187
Conversation
Source/ACE.Entity/Vector3.cs
Outdated
|
||
namespace ACE.Entity | ||
{ | ||
public class AceVector3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 private floats, that you can't get out once set? What's the point? What does this object give us that the existing Vector3 object doesn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add ability to get a real vector 3 but it's not what this was intended for but it could be added as a way to retrieve it through a protected function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add ability to get a real vector 3 but it's not what this was intended for but it could be added as a way to retrieve it through a protected function
Source/ACE/Factories/SpellFactory.cs
Outdated
/// <summary> | ||
/// creates a spell with velocity directly in front of the player's position provided | ||
/// </summary> | ||
public static ImmutableWorldObject CreateCastedSpell(ushort weenieClassId, Position newPosition, ObjectGuid objectid, AceVector3 velocity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spells are very much mutable. They have motion and do things, so use MutableObject.
float z = float.Parse(parameters[2], CultureInfo.InvariantCulture.NumberFormat); | ||
|
||
// we got to keep track because we going to send a effect.. | ||
AceVector3 velocity = new AceVector3(36f, 9.8f, -1.3f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do these float values represent? Document them please.
@@ -30,10 +30,10 @@ public class PhysicsData | |||
public float Friction; | |||
public float Elastcity; | |||
public uint AnimationFrame; | |||
public Position Acceleration; | |||
public AceVector3 Acceleration; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, we already had System.Numerics.Vector3. See previous comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.Numerics.vector3 does not write packet payloads in the correct order.
But I will add the ability to return a vector.
But AceVector follows the position class, although position is over loaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, makes sense. Just give us a way to get the values out after it's been created. We can let these vectors live longer than 1 send and just update the values they have in them. Also, physics engine will need to read them out at some point.
Source/ACE/Factories/SpellFactory.cs
Outdated
ImmutableWorldObject wo = new ImmutableWorldObject(ObjectType.None, objectid, "Ball of Death", weenieClassId, ObjectDescriptionFlag.None, weenie, newPosition); | ||
|
||
// flame bolt | ||
wo.GameData.Spell = (ushort)27; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a spells enum instead of hard-coding 27. This data existed in Decal before, so I'm sure we can get it now.
Source/ACE/Factories/SpellFactory.cs
Outdated
wo.PhysicsData.Velocity = velocity; | ||
wo.PhysicsData.Friction = (uint)1f; | ||
wo.PhysicsData.Elastcity = (uint)0; | ||
wo.PhysicsData.DefaultScript = (uint)90; // this needs a enum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, make an enum :p
Updated |
Removed some useless comments I noticed too.
|
Spells ! We have some fun spells.. I will work to improve it but this is worth it to submit it now as it should works in multiplayer for giggles.. |
Closing this, I found some issues with it. |
World Object Fixes + My test Spell firewall - sorta.. so I could test it some more.
New AceVector Object.